{"id":29313750,"url":"https://github.com/alirafay265/comsatsmaps","last_synced_at":"2026-05-07T17:36:12.814Z","repository":{"id":302854869,"uuid":"1013722727","full_name":"alirafay265/COMSATSmaps","owner":"alirafay265","description":"A fully interactive and intelligent web-based navigation platform for COMSATS Lahore Campus with backend built with C++. It computes the shortest or simplest walking path between campus buildings using advanced graph algorithms: Dijkstra and BFS.","archived":false,"fork":false,"pushed_at":"2025-07-04T11:39:23.000Z","size":52,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-04T12:47:30.501Z","etag":null,"topics":["api","backend","cpp","express","js","maps","web"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alirafay265.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-04T11:05:42.000Z","updated_at":"2025-07-04T11:55:40.000Z","dependencies_parsed_at":"2025-07-04T13:33:28.031Z","dependency_job_id":"1b7e9197-931a-4280-a921-051765a82d76","html_url":"https://github.com/alirafay265/COMSATSmaps","commit_stats":null,"previous_names":["alirafay265/comsatsmaps"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alirafay265/COMSATSmaps","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alirafay265%2FCOMSATSmaps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alirafay265%2FCOMSATSmaps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alirafay265%2FCOMSATSmaps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alirafay265%2FCOMSATSmaps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alirafay265","download_url":"https://codeload.github.com/alirafay265/COMSATSmaps/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alirafay265%2FCOMSATSmaps/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264057650,"owners_count":23550755,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","backend","cpp","express","js","maps","web"],"created_at":"2025-07-07T10:12:44.816Z","updated_at":"2026-05-07T17:36:12.769Z","avatar_url":"https://github.com/alirafay265.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🧭 COMSATS Lahore - Smart Campus Navigation System\n\nA fully interactive and intelligent web-based navigation platform for **COMSATS Lahore Campus**. It computes the shortest or simplest walking path between campus buildings using advanced graph algorithms: **Dijkstra** and **BFS**.\n\n---\n\n## 📁 Project Structure\n\n```\n\nCOMSATSmaps\n├── index.html               # Frontend UI (interactive map and controls)\n├── navigation.cpp           # C++ engine (handles pathfinding logic)\n├── server.js                # Express backend server\n├── Proposal.docx            # Word file (project proposal)\n├── LICENSE                  # MIT License\n└── README.md                # This file\n\n````\n\n---\n\n## 🚀 How to Run This Project\n\n### ✅ Prerequisites\n\n- [Node.js](https://nodejs.org/en/) (v14+ recommended)\n- `g++` compiler for C++ (e.g., via MinGW or GCC)\n\n---\n\n### 🔧 Setup Instructions\n\n#### 1️⃣ Compile the C++ Navigation Engine\n```bash\ng++ -o navigation_engine navigation.cpp\n````\n\nThis creates `navigation_engine.exe` which is required for the backend to function.\n\n\u003e 💡 If you're on Mac/Linux, you may need to make it executable with `chmod +x navigation_engine` and tweak the server.js file accordingly (ask ChatGPT).\n\n---\n\n#### 2️⃣ Install Node.js Dependencies\n\n```bash\nnpm install express cors\n```\n\n---\n\n#### 3️⃣ Run the Backend Server\n\n```bash\nnode server.js\n```\n\nThe server starts at: [http://localhost:3000](http://localhost:3000)\n\n---\n\n#### 4️⃣ Access the Frontend\n\nOpen your browser and visit:\n\n```\nhttp://localhost:3000\n```\n\nUse the dropdown to select **source** and **destination** along with the **alogrithm**, and click **Find Route**.\n\n---\n\n## 📷 Screenshots\n\n![image](https://github.com/user-attachments/assets/9cb9ea31-be07-4336-8e81-741142ad84b8)\n\n![image](https://github.com/user-attachments/assets/7a4124f2-5658-40ae-94f5-6307579e4d8f)\n\n![image](https://github.com/user-attachments/assets/2e1a88cd-c529-47c5-8d3c-dbcc3118b7a2)\n\n\n## 🌐 API Overview\n\n| Method | Endpoint         | Description                         |\n| ------ | ---------------- | ----------------------------------- |\n| `GET`  | `/api/health`    | Check backend + C++ engine status   |\n| `GET`  | `/api/locations` | Get all campus locations            |\n| `POST` | `/api/navigate`  | Get best path between two buildings |\n\n### 🔄 Example POST Request to `/api/navigate`\n\n```json\n{\n  \"source\": \"N Block\",\n  \"destination\": \"K Block\",\n  \"algorithm\": \"dijkstra\"\n}\n```\n\n---\n\n## ⚙️ Algorithms Supported\n\n* **Dijkstra's Algorithm:** Finds the **shortest distance**\n* **BFS (Breadth-First Search):** Finds path with **least number of steps**\n\n---\n\n## 🧠 How It Works\n\n1. User selects source, destination, and algorithm from the frontend.\n2. Backend receives the request and invokes the compiled `navigation_engine.exe`.\n3. The C++ program calculates the path and returns JSON.\n4. The result is rendered on the interactive campus map.\n\n---\n\n## 💡 Fun Fact:\n\nThe university actually implemented some of these paths in the campus after we made this project.\n\n## 👥 Contributors\n\n* 👨‍💻 [alirafay265](https://github.com/alirafay265)\n* 👨‍💻 [iambillx](https://github.com/iambillx)\n\n## 📝 License\n\nThis project is for **educational and academic purposes only**.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falirafay265%2Fcomsatsmaps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falirafay265%2Fcomsatsmaps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falirafay265%2Fcomsatsmaps/lists"}