{"id":27624284,"url":"https://github.com/potakaaa/tftf_edge_api","last_synced_at":"2025-07-14T21:38:32.251Z","repository":{"id":288801128,"uuid":"969216996","full_name":"potakaaa/TFTF_Edge_api","owner":"potakaaa","description":"TFTFEdge API is a FastAPI-powered web service designed to calculate the most efficient jeepney routes in Cagayan de Oro using geographic coordinates and transfer range. This API integrates a C++ algorithm for route calculation, delivering real-time route data in a flexible, scalable format.","archived":false,"fork":false,"pushed_at":"2025-04-19T16:56:29.000Z","size":430,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-19T19:49:26.575Z","etag":null,"topics":["algorithm","cpp","minimum-transfer","network","pathfinding"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/potakaaa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-04-19T16:49:40.000Z","updated_at":"2025-04-19T16:56:31.000Z","dependencies_parsed_at":"2025-04-19T19:49:29.974Z","dependency_job_id":"4006e119-a6d9-435c-88f2-27d77c4f90df","html_url":"https://github.com/potakaaa/TFTF_Edge_api","commit_stats":null,"previous_names":["potakaaa/tftf_edge_api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/potakaaa%2FTFTF_Edge_api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/potakaaa%2FTFTF_Edge_api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/potakaaa%2FTFTF_Edge_api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/potakaaa%2FTFTF_Edge_api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/potakaaa","download_url":"https://codeload.github.com/potakaaa/TFTF_Edge_api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250424024,"owners_count":21428286,"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":["algorithm","cpp","minimum-transfer","network","pathfinding"],"created_at":"2025-04-23T11:27:38.631Z","updated_at":"2025-04-23T11:27:39.421Z","avatar_url":"https://github.com/potakaaa.png","language":"Python","readme":"# TFTFEdge API 🚏\n\nWelcome to **TFTFEdge API**, a cutting-edge API designed to help you navigate the jeepney routes of Cagayan de Oro (and other cities with jeepney networks). This tool allows developers to easily integrate real-time route suggestions based on user inputs such as starting and destination points, transfer range, and time of travel.\n\nWith TFTFEdge, you can empower your applications to recommend optimized jeepney routes, helping commuters navigate through their cities efficiently!\n\n---\n\n## 🚀 Features\n- **Route Calculation:** Efficient route finding based on user-specified start and destination points.\n- **GeoJSON Integration:** Loads real-time route data from GeoJSON files for flexibility in different cities.\n- **Transfer Cost \u0026 Time Optimization:** Provides recommendations with calculated transfer costs and estimated times.\n\n---\n\n## 🛠️ Technologies Used\n- **FastAPI** for creating a fast, modern web API.\n- **Python Subprocess** to communicate with C++ route algorithms.\n- **GeoJSON** for flexible and easy-to-manage route data.\n- **C++** for route pathfinding algorithm implementation.\n\n---\n\n## 📦 Installation \u0026 Setup\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/yourusername/TFTFEdge.git\n   cd TFTFEdge\n   ```\n\n2. Install dependencies (make sure to use a virtual environment):\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n3. Make sure your C++ algorithm (`algo`) is compiled and available in the project directory.\n\n4. Run the FastAPI server:\n   ```bash\n   uvicorn main:app --reload\n   ```\n\n5. Access the API at [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs).\n\n---\n\n## 🛤️ Sample Route Query\n\n### Example Request:\n```bash\nGET /api/routes?fromLat=8.50881\u0026fromLong=124.64827\u0026fromName=Bonbon\u0026toLat=8.51133\u0026toLong=124.62429\u0026toName=Westbound Bulua Terminal\u0026transMeter=100.5\u0026hour=10\n```\n\n### Sample Response:\n```json\n{\n  \"From\": {\n    \"Lattitude\": 8.50881,\n    \"Longitude\": 124.64827,\n    \"Origin Name\": \"Bonbon\"\n  },\n  \"Routes\": [\n    {\n      \"Route ID\": 7,\n      \"Route Name\": \"Bonbon (R1) – Cogon Public Market\",\n      \"Transfer Cost\": 0.0,\n      \"Entry Coordinate\": [8.50881, 124.64827],\n      \"Exit Coordinate\": [8.47759, 124.64866]\n    },\n    {\n      \"Route ID\": 7,\n      \"Route Name\": \"Bulua (R4) – Cogon Public Market\",\n      \"Transfer Cost\": 0.0,\n      \"Entry Coordinate\": [8.47759, 124.64866],\n      \"Exit Coordinate\": [8.47759, 124.64866]\n    },\n    {\n      \"Route ID\": 7,\n      \"Route Name\": \"Bulua (R4) – Cogon Public Market\",\n      \"Transfer Cost\": 0.0,\n      \"Entry Coordinate\": [8.47759, 124.64866],\n      \"Exit Coordinate\": [8.51133, 124.62429]\n    }\n  ],\n  \"To\": {\n    \"Destination Name\": \"Westbound Bulua Terminal\",\n    \"Lattitude\": 8.51133,\n    \"Longitude\": 124.62429\n  },\n  \"Transfer Range\": 100.5\n}\n```\n\n---\n\n## 🌍 Contributing\n\nWe welcome contributions! If you find bugs or have ideas for improvements, feel free to open an issue or submit a pull request.\n\n---\n\n## 📄 License\n\nThis project is licensed under the MIT License.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpotakaaa%2Ftftf_edge_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpotakaaa%2Ftftf_edge_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpotakaaa%2Ftftf_edge_api/lists"}