OptPath is a fullstack web application that visualizes and compares classical graph traversal and shortest path algorithms on a weighted graph network. Users can select source and destination nodes, choose a pathfinding algorithm, and observe the computed route through graph animations and corresponding metrics.
Live Demo: https://optpath.onrender.com
GitHub Repository: https://github.com/k-o-c-o/OptPath
OptPath was developed to demonstrate the behavior and performance of commonly used graph traversal and pathfinding algorithms. The application provides an interactive environment where users can visualize route computation, compare algorithm outputs, and analyze traversal statistics.
- Interactive weighted graph visualization
- Realtime path tracing animation
- Weighted edge representation
- Dynamic graph highlighting
- Runtime measurement
- Total path cost calculation
- Nodes traversed analysis
- Time and space complexity display
| Algorithm | Purpose | Time Complexity | Space Complexity |
|---|---|---|---|
| Breadth First Search (BFS) | Finds shortest path in terms of number of edges | O(V + E) | O(V) |
| Depth First Search (DFS) | Explores graph depth first before backtracking | O(V + E) | O(V) |
| Dijkstra's Algorithm | Finds minimum cost path in a weighted graph | O((V + E) log V) | O(V) |
| A* Search | Heuristic guided shortest path search | O((V + E) log V) | O(V) |
- HTML5
- CSS3
- JavaScript
- SVG Graphics
- Node.js
- Express.js
- Git
- GitHub
- Render
OptPath/
│
├── backend/
│ ├── algorithms/
│ │ ├── astar.js
│ │ ├── bfs.js
│ │ ├── dfs.js
│ │ └── dijkstra.js
│ │
│ ├── generateGraph.js
│ ├── graph.js
│ ├── package.json
│ ├── package-lock.json
│ └── server.js
│
├── frontend/
│ ├── index.html
│ ├── script.js
│ └── style.css
│
├── .gitignore
└── README.md
- 24 node weighted graph network
- 57 weighted edges including diagonal connections
- 4 pathfinding algorithms implemented
- Path visualization and performance analysis
Clone the repository:
git clone https://github.com/k-o-c-o/OptPath.gitNavigate to the backend directory:
cd OptPath/backendInstall dependencies:
npm installStart the server:
npm startOpen the application in your browser:
http://localhost:5000
- Random maze generation
- Bellman-Ford Algorithm
- Floyd-Warshall Algorithm
- Priority queue optimization for improved scalability on larger graph datasets
Naina Edwin
B.Tech in Computer and Communication Engineering Manipal Institute of Technology
GitHub: https://github.com/k-o-c-o




