AkhilBisht-oops/Route-Optimizer
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Β | Β | |||
Β | Β | |||
Β | Β | |||
Β | Β | |||
Repository files navigation
# π Route Optimizer - Delhi Transit Companion A modern, high-performance web application designed to optimize travel across Delhi's vast transit network. Whether you're navigating the Delhi Metro or DTC bus routes, Route Optimizer provides real-time insights, fare comparisons, and optimal pathfinding. --- ## π Live Demo π https://route-optimizer-teal.vercel.app/ --- ## β¨ Key Features - **π Multi-Mode Route Search**: Find the most efficient path between any two locations in Delhi using Metro and Bus networks. - **π Real-Time Network Comparison**: Compare travel time, fare, and reliability between Metro and DTC buses. - **π Station Crowd Monitoring**: View live crowd levels and peak hour indicators for major metro stations. - **π° Smart Fare Calculator**: Estimate trip costs including interchange penalties and discounts. - **πΊοΈ Interactive Live Map**: Visualize your route with real-time station highlights and line indicators. - **π Secure Admin Dashboard**: Managed station data and system configurations with OAuth-powered authentication (Google, GitHub, Microsoft). - **π Premium Dark Mode UI**: A sleek, glassmorphic interface designed for clarity and visual excellence. --- ## π οΈ Tech Stack ### Frontend - **Core**: React 19 (Vite) - **Styling**: Tailwind CSS 4, Lucide Icons, FontAwesome - **Maps**: Leaflet & React-Leaflet - **Charts**: Recharts (for crowd analytics) - **Routing**: React Router 7 - **State Management**: Context API ### Backend - **Runtime**: Node.js with Express 5 - **Database**: MongoDB (Mongoose) - **Security**: Helmet, CORS, Bcrypt.js, Express Validator - **Authentication**: Passport.js (Google, GitHub, Microsoft OAuth 2.0) - **Logging**: Morgan --- ## π Getting Started ### 1. Clone the Repository ```bash git clone https://github.com/AkhilBisht-oops/Route-Optimizer.git cd Route-Optimizer ``` ### 2. Backend Setup ```bash cd backend npm install ``` Create a `.env` file in the `backend` directory: ```env PORT=5000 MONGODB_URI=your_mongodb_uri JWT_SECRET=your_jwt_secret CLIENT_URL=http://localhost:5173 GOOGLE_CLIENT_ID=... GOOGLE_CLIENT_SECRET=... GITHUB_CLIENT_ID=... GITHUB_CLIENT_SECRET=... ``` ### 3. Frontend Setup ```bash cd ../frontend npm install ``` Create a `.env` file in the `frontend` directory: ```env VITE_API_URL=http://localhost:5000/api ``` ### 4. Seed Database Populate your database with sample Delhi transit data: ```bash cd ../backend node seed.js # Seeds routes node createStations.js # Extracts stations from routes ``` ### 5. Run the Application **Start Backend:** ```bash cd backend npm run dev ``` **Start Frontend:** ```bash cd frontend npm run dev ``` --- ## π Project Structure ```text βββ backend/ β βββ config/ # Database & Passport configuration β βββ controllers/ # API request handlers β βββ models/ # Mongoose schemas β βββ routes/ # API endpoints β βββ seed.js # Database seeding script β βββ server.js # Entry point βββ frontend/ β βββ src/ β β βββ components/ # Modular UI components β β βββ context/ # Auth & State context β β βββ utils/ # Route search logic & helpers β β βββ App.jsx # Main application hub βββ README.md # You are here ``` --- *Built with β€οΈ for Delhi Commuters.*