Skip to content

AkhilBisht-oops/Route-Optimizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

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.*

Releases

No releases published

Packages

 
 
 

Contributors

Languages