A web application for tracking and managing bus routes, schedules, and providing real-time feedback. Built with Node.js, Express, PostgreSQL, and Google Maps integration.
- πΊοΈ Real-time bus route visualization using Google Maps
- π Secure authentication (Local & Google OAuth2)
- π± Responsive design with Tailwind CSS
- π Interactive stop details and timings
- π Bus capacity tracking
- β User feedback system
- π¦ Live bus status updates
Before running the application, make sure you have the following installed:
- Node.js (v14 or higher)
- PostgreSQL
- npm (Node Package Manager)
- Go Maps.pro API key
Create a .env
file in the root directory with the following variables:
DB_USER=your_db_user
DB_HOST=your_db_host
DB_NAME=your_db_name
DB_PASSWORD=your_db_password
DB_PORT=5432
SESSION_SECRET=your_session_secret
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
PORT=3000
- Go to the GoMaps.pro
- Create a new project or select an existing one
- Enable the following APIs:
- Maps JavaScript API
- Places API (if needed)
- Directions API (if needed)
- Geocoding API (if needed)
- Create (API key)
- Add restrictions to your API key:
- Application restrictions (HTTP referrers)
- API restrictions (select only the APIs you need)
- Replace the API key in your code:
<script src="https://maps.gomaps.pro/maps/api/js?key=YOUR_API_KEY&callback=initMap" async defer></script>
- Create a PostgreSQL database
- Create a users table with the following structure:
CREATE TABLE users (
id SERIAL PRIMARY KEY,
full_name VARCHAR(100),
email VARCHAR(100) UNIQUE NOT NULL,
password VARCHAR(100) NOT NULL
);
- Clone the repository:
git clone https://github.com/ahamed-ali-git/BusRouteGuide.git
cd BusRouteGuide
- Install dependencies:
npm install
- Start the server:
nodemon index.js
- Access the application at
http://localhost:3000
The application supports two authentication methods:
- Local authentication with email and password
- Google OAuth2 authentication
- Real-time location tracking
- Interactive route map
- Stop-wise timings
- Capacity monitoring
- Secure login/registration
- Route visualization
- Quick feedback system with Formspree
- Star ratings
This project is licensed under the MIT License - see the LICENSE file for details.
- Go Maps.pro API for route visualization
- Tailwind CSS for styling
- Font Awesome for icons
- Express.js community