{"id":29259010,"url":"https://github.com/mithildabhi/cafe-api-web-app","last_synced_at":"2026-04-30T16:33:23.389Z","repository":{"id":302451216,"uuid":"1004057993","full_name":"mithildabhi/Cafe-API-Web-App","owner":"mithildabhi","description":"Cafe API is a Flask app to add, view, search, update, and delete cafes using a web form or JSON API.","archived":false,"fork":false,"pushed_at":"2025-07-02T12:13:46.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-30T16:33:18.664Z","etag":null,"topics":["flask","html","json","python"],"latest_commit_sha":null,"homepage":"https://restful-api-cafe.vercel.app/","language":"HTML","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/mithildabhi.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-06-18T04:02:31.000Z","updated_at":"2025-07-02T12:17:03.000Z","dependencies_parsed_at":"2025-07-02T13:28:07.225Z","dependency_job_id":"290fedd8-eb55-4b97-86c5-3e907d9cd302","html_url":"https://github.com/mithildabhi/Cafe-API-Web-App","commit_stats":null,"previous_names":["mithildabhi/cafe-api-web-app"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mithildabhi/Cafe-API-Web-App","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mithildabhi%2FCafe-API-Web-App","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mithildabhi%2FCafe-API-Web-App/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mithildabhi%2FCafe-API-Web-App/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mithildabhi%2FCafe-API-Web-App/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mithildabhi","download_url":"https://codeload.github.com/mithildabhi/Cafe-API-Web-App/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mithildabhi%2FCafe-API-Web-App/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32470879,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["flask","html","json","python"],"created_at":"2025-07-04T06:13:41.893Z","updated_at":"2026-04-30T16:33:23.367Z","avatar_url":"https://github.com/mithildabhi.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"Cafe API Web App\n================\n\n📖 Project Description:\n-----------------------\nCafe API is a simple Flask-based web app that lets users manage a list of cafes. You can view all cafes, search by location, add new cafes using a form, update coffee prices, and delete cafes using an API key. It's a great starter project for learning REST APIs, Flask, and database integration with SQLAlchemy.\n\n-----------------------------\n🛠️ Features:\n-----------------------------\n- Get a random cafe\n- Get all cafes\n- Search cafes by location\n- Add new cafes via form or POST request\n- Update the coffee price\n- Delete a cafe using API key\n\n-----------------------------\n📁 Project Structure:\n-----------------------------\n```\n- main.py            --\u003e Main Flask application\n- templates/\n  ├── index.html     --\u003e Homepage listing API endpoints\n  └── add_cafe.html  --\u003e Form to add new cafes\n- cafes.db           --\u003e SQLite database (auto-created)\n```\n-----------------------------\n📡 API Endpoints:\n-----------------------------\n```\nGET     /random                     -\u003e Get a random cafe\nGET     /all                        -\u003e Get all cafes\nGET     /search?loc=\u003clocation\u003e      -\u003e Search for cafes by location\nGET     /all/\u003cint:id\u003e               -\u003e Get a cafe by its ID\nPOST    /add                        -\u003e Add a new cafe (via form or POST data)\nPATCH   /update-price/\u003cid\u003e?new_price=\u003cprice\u003e    -\u003e Update cafe price\nDELETE  /report-closed/\u003cid\u003e?api-key=YOUR_API_KEY -\u003e Delete a cafe (requires API key)\n```\n```\n🔑 Default API key: mithildabhi_api_key\n```\n-----------------------------\n🌐 Web Interface:\n-----------------------------\n- Home:\n```\nhttp://localhost:5000/\n```\n- Add Cafe:\n```\nhttp://localhost:5000/add\n```\n-----------------------------\n▶️ Getting Started:\n-----------------------------\n1. Clone the repository\n```\n   git clone https://github.com/yourusername/cafe-api.git\n   cd cafe-api\n```\n2. Install dependencies\n```\n   pip install flask flask_sqlalchemy\n```\n3. Run the server\n```\n   python main.py\n```\n4. Open your browser and go to http://localhost:5000/\n\n-----------------------------\n📌 Notes:\n-----------------------------\n- Database is created automatically if it doesn't exist.\n- Can be tested using browser or tools like Postman/Insomnia.\n- JSON responses follow consistent structure.\n\n-----------------------------\n👨‍💻 Author:\n-----------------------------\nCreated by Mithil Dabhi\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmithildabhi%2Fcafe-api-web-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmithildabhi%2Fcafe-api-web-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmithildabhi%2Fcafe-api-web-app/lists"}