Skip to content

Indore Route Pathfinder is a full-stack web application that helps users plan the most efficient routes across Indore. It allows dynamic location creation, connects places with custom distance and cost, and finds the shortest/cheapest path using Dijkstra’s algorithm. Built with React, Node.js, Express, and MongoDB. Deployed with Vercel and Render.

Notifications You must be signed in to change notification settings

harshitsingh4321/Indore-Route-Pathfinder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

🚦 Indore Route Pathfinder

React Node.js MongoDB

A simple web application to plan routes between stations in Indore using Dijkstra's Algorithm

🚀 Live Demo


✨ What it does

  • 📍 Add Stations: Create new stations/locations
  • 🔗 Connect Stations: Link stations with distance and cost
  • 🧭 Find Routes: Calculate shortest path by distance OR cheapest path by cost
  • 📊 View All: See all stations and connections in one place

🛠️ Tech Stack

  • Frontend: React.js, Tailwind CSS
  • Backend: Node.js, Express.js
  • Database: MongoDB
  • Algorithm: Dijkstra's Shortest Path

🏃‍♂️ Quick Start

1. Clone & Install

git clone https://github.com/harshitsingh4321/indore-route-planner.git
cd indore-route-planner

# Backend
cd backend && npm install

# Frontend  
cd ../frontend && npm install

2. Setup Environment

Create .env in backend folder:

MONGO_URI=your_mongodb_connection_string
PORT=5000

3. Run Application

# Start backend (Terminal 1)
cd backend && npm run dev

# Start frontend (Terminal 2)  
cd frontend && npm run dev

Open http://localhost:3000 🎉


🎯 How to Use

  1. Add Stations: Enter station name and click "Add Station"
  2. Connect Stations: Select two stations, enter distance (km) and cost (₹), click "Add Connection"
  3. Find Route: Choose start/end stations, select "Distance" or "Cost" optimization, click "Find Route"
  4. View Results: See the optimal path with total distance and cost

📁 Project Structure

indore-route-planner/
├── frontend/          # React app
│   ├── src/
│   │   └── App.jsx    # Main component
│   └── package.json
├── backend/           # Express API
│   ├── models/        # MongoDB schemas  
│   ├── routes/        # API routes
│   ├── utils/         # Dijkstra algorithm
│   └── server.js      # Main server
└── README.md

🔌 API Endpoints

GET    /api/stations     # Get all stations
POST   /api/stations     # Add new station
GET    /api/connections  # Get all connections  
POST   /api/connections  # Add new connection
POST   /api/route        # Calculate optimal route

🧮 Algorithm

Uses Dijkstra's Algorithm to find:

  • Shortest Distance: Minimum total kilometers
  • Cheapest Cost: Minimum total rupees

🚀 Deployment


🤝 Contributing

  1. Fork the repository
  2. Create feature branch: git checkout -b feature-name
  3. Commit changes: git commit -m 'Add feature'
  4. Push branch: git push origin feature-name
  5. Open Pull Request

📬 Contact

Made by Harshit Singh


📄 License

MIT License - feel free to use this project!

About

Indore Route Pathfinder is a full-stack web application that helps users plan the most efficient routes across Indore. It allows dynamic location creation, connects places with custom distance and cost, and finds the shortest/cheapest path using Dijkstra’s algorithm. Built with React, Node.js, Express, and MongoDB. Deployed with Vercel and Render.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published