GatorPath is a web application that visualizes and compares the performance of Dijkstra's algorithm and A* search for finding the shortest path on the University of Florida campus.
This interface allows you to enter a start and end location, and it will run both algorithms simultaneously, showing you the nodes each algorithm visits in real-time.
The project is organized into two main folders:
GatorPath/
βββ backend/ # Node.js/Express server for pathfinding logic
βββ frontend/ # React (Vite) client for the map interface
To run this application, you will need two separate terminal windows open: one for the backend server and one for the frontend client.
Make sure you have Node.js (which includes npm) installed on your machine.
The backend is responsible for loading the graph data (nodes.csv, edges.csv) and running the pathfinding algorithms when the frontend requests a route.
# 1. Navigate to the backend directory
cd GatorPath/backend
# 2. Install the necessary dependencies
npm install
# 3. Start the server
npm startThe terminal should show that the server is loading the nodes and edges and then listening on http://localhost:3001.
The frontend provides the map interface and user controls.
# 1. In a new terminal, navigate to the frontend directory
cd GatorPath/frontend
# 2. Install the necessary dependencies
npm install
# 3. Start the development server
npm run devThis command will typically open the application automatically in your default browser (usually at http://localhost:5173).
Once both the backend and frontend are running:
- Open the application in your browser (e.g.,
http://localhost:5173). - Type a starting location (e.g., "Beaty Towers") into the Start box.
- Type a destination (e.g., "Ben Hill Griffin Stadium") into the End box.
- Click the Find Route button.
- Watch the real-time visualization as both algorithms search for the path and see the final results appear in the sidebar.