{"id":20321466,"url":"https://github.com/jagthefriend/backend-developer-assignment","last_synced_at":"2026-04-17T18:04:47.142Z","repository":{"id":250108144,"uuid":"833471433","full_name":"JagTheFriend/Backend-Developer-Assignment","owner":"JagTheFriend","description":"This is a basic backend service to manage retreat data for a fictional wellness retreat platform built with Flask and SQLAlchemy.","archived":false,"fork":false,"pushed_at":"2024-07-27T05:56:51.000Z","size":168,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-04T09:43:58.596Z","etag":null,"topics":["assignment","flask","flask-api","flask-sqlalchemy","python3"],"latest_commit_sha":null,"homepage":"https://backend-developer-assignment.up.railway.app/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JagTheFriend.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2024-07-25T06:02:50.000Z","updated_at":"2024-07-27T05:56:53.000Z","dependencies_parsed_at":"2024-07-25T08:25:20.478Z","dependency_job_id":"1633e29d-45ec-4129-aafa-5a429149d028","html_url":"https://github.com/JagTheFriend/Backend-Developer-Assignment","commit_stats":null,"previous_names":["jagthefriend/backend-developer-assignment"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JagTheFriend/Backend-Developer-Assignment","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JagTheFriend%2FBackend-Developer-Assignment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JagTheFriend%2FBackend-Developer-Assignment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JagTheFriend%2FBackend-Developer-Assignment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JagTheFriend%2FBackend-Developer-Assignment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JagTheFriend","download_url":"https://codeload.github.com/JagTheFriend/Backend-Developer-Assignment/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JagTheFriend%2FBackend-Developer-Assignment/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31939807,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T17:29:20.459Z","status":"ssl_error","status_checked_at":"2026-04-17T17:28:47.801Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["assignment","flask","flask-api","flask-sqlalchemy","python3"],"created_at":"2024-11-14T19:15:23.520Z","updated_at":"2026-04-17T18:04:47.119Z","avatar_url":"https://github.com/JagTheFriend.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Backend Developer Assignment\n\n## Description\n\nThis is a basic backend service to manage retreat data for a fictional wellness retreat platform built with Flask and SQLAlchemy.\n\n## Using the API\n\n### Retreats\n\nFetch all retreats:\n\n```bash\ncurl -X GET http://localhost:5000/retreats\n```\n\nFilter retreats by tag:\n\n```bash\ncurl -X GET http://localhost:5000/retreats?filter=Stress\n```\n\nFilter retreats by title:\n\n```bash\ncurl -X GET http://localhost:5000/retreatstitle=Yoga%20Event%2019\n```\n\nFilter retreats by type:\n\n```bash\ncurl -X GET http://localhost:5000/retreats?type=Signature\n```\n\nFilter retreats by duration:\n\n```bash\ncurl -X GET http://localhost:5000/retreats?duration=3\n```\n\nFilter retreats by location:\n\n```bash\ncurl -X GET http://localhost:5000/retreats?location=Mumbai\n```\n\nSearch retreats:\n\n```bash\ncurl -X GET http://localhost:5000/retreats?search=Fitness\n```\n\nPagination Example:\n\n```bash\ncurl -X GET http://localhost:5000/retreats?page=2\u0026limit=3\n```\n\n### Booking for a retreat\n\nCreate a booking:\n\n```bash\ncurl -X POST -H \"Content-type: application/json\" -d '{\n    \"user_id\": \"1232\",\n    \"user_name\": \"Jag\",\n    \"user_email\": \"JagTheFriend12@gmail.com\",\n    \"user_phone\": \"445678\",\n    \"retreat_id\": \"1232\",\n    \"retreat_title\": \"Hello\",\n    \"retreat_location\": \"Pune\",\n    \"retreat_price\": \"250\",\n    \"retreat_duration\": \"3\",\n    \"payment_details\": \"details\",\n    \"booking_date\": \"1233\"\n}' 'http://localhost:5000/book'\n```\n\nDelete a booking:\n\n```bash\ncurl -X DELETE http://localhost:5000/book/delete?id=1234\n```\n\n#### Business Logic\n\n- It allows user to book multiple retreats\n- It doesn't allow user to double book the same retreat\n\n## Tech Stack\n\n- [Flask](https://flask.palletsprojects.com/en/3.0.x/): To run the web application (API)\n- [SQLAlchemy](https://flask-sqlalchemy.palletsprojects.com/en/3.1.x/): To interact with the database\n- [PostgreSQL](https://www.postgresql.org/): Database in use\n\n## Running the application\n\n### Docker\n\nTo simply run the application, you can use the following command:\n\n```bash\ndocker compose up\n```\n\nThis will start the application on port 5000.\\\nYou can access the application by navigating to \u003chttp://localhost:5000\u003e in your web browser.\n\n### Manually\n\n1. Clone the repository\n2. Run `pip install poetry`\n3. Install the dependencies `poetry install`\n4. Run the application `python main.py`\n\nYou can access the application by navigating to \u003chttp://localhost:5000\u003e in your web browser.\n\n### Replit\n\n[![Run on Replit](https://replit.com/badge/github/jagtah/backend-developer-assignment)](https://replit.com/@JagTheFriend/Backend-Developer-Assignment)\n\n## Testing\n\nYou can run the tests using the following command:\n\n```bash\npython -m unittest test/__init__.py\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjagthefriend%2Fbackend-developer-assignment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjagthefriend%2Fbackend-developer-assignment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjagthefriend%2Fbackend-developer-assignment/lists"}