This project is a campus navigation system implemented in Go, designed as a data structures course project. It uses the Gin framework and Redis, with a focus on graph usage and the implementation of Dijkstra's algorithm for shortest path finding.
The Campus Navigation Project is designed to help students and visitors navigate a campus efficiently. The system utilizes graph data structures to represent the campus layout and implements Dijkstra's algorithm to find the shortest path between locations.
- Graph Representation: Models the campus using graph data structures.
- Shortest Path Calculation: Implements Dijkstra's algorithm to find the shortest path between two points.
- Redis Integration: Uses Redis for caching and fast data retrieval.
- RESTful API: Provides a RESTful API to interact with the navigation system.
- Backend: Go, Gin framework
- Database: Redis
- Algorithm: Dijkstra's algorithm for shortest path
-
Clone the repository:
git clone https://github.com/ShawnJeffersonWang/CampusGuide.git cd CampusGuide
-
Ensure you have Go and Redis installed on your system.
-
Install the necessary Go dependencies:
go mod tidy
-
Start Redis server if it is not already running:
redis-server
-
Run the application:
go run main.go
Once the application is running, you can access the API endpoints to interact with the navigation system.
- Get Shortest Path:
/api/shortest-path?start={start}&end={end}
Contributions are welcome! Please fork this repository and submit pull requests with your changes.
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Create a new Pull Request.
This project is licensed under the Apache 2.0 License. See the LICENSE file for details.