A wee React application that helps you find your nearest bus stops and train stations by entering a UK postcode.
- Postcode Search: Enter any valid UK postcode to find nearby transport stops
- Transport Types: Shows both bus stops (🚌) and train stations (🚆)
- Distance Information: Displays how far each stop is from your location
- Service Information: Lists the bus routes or train services available
- Google Maps Integration: Direct links to view each stop on Google Maps
- Responsive Design: Works on desktop and mobile devices
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Start the API server (in a separate terminal):
node server.js
-
Open your browser and go to
http://localhost:5173
- Postcode Geocoding: Uses the postcodes.io API to convert postcodes to coordinates
- Transport Data: Currently uses mock data for transport stops (see TODO below)
- Frontend: React app with modern, responsive UI
- Backend: Express server handling API requests
- Include more transport types, if applicable (trams, underground, etc.)
- Add filtering by transport type
- Implement distance-based sorting
- Add optional automatic geolocation feature
- Filter results to include at least one train station
- Frontend: React 19, Vite
- Backend: Express.js, Node.js
- APIs: postcodes.io (geocoding), transportapi.com (UK public transport information)
- Styling: CSS3 with responsive design
GET /api/stops?postcode={postcode}- Returns nearby transport stops
MIT License
Built with the help of Cursor (powered by OpenAI GPT-4).