{"id":19647766,"url":"https://github.com/juanitosebastian/drinks-app","last_synced_at":"2026-04-13T03:03:44.123Z","repository":{"id":140493252,"uuid":"607651346","full_name":"JuanitoSebastian/Drinks-App","owner":"JuanitoSebastian","description":"A coding assignment for a job application","archived":false,"fork":false,"pushed_at":"2023-02-28T12:48:45.000Z","size":123,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-28T22:48:58.135Z","etag":null,"topics":["docker","docker-compose","express","nginx","react","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/JuanitoSebastian.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}},"created_at":"2023-02-28T12:09:03.000Z","updated_at":"2023-02-28T18:55:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"b13c7062-f014-4193-9351-4d883bb1dcc6","html_url":"https://github.com/JuanitoSebastian/Drinks-App","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JuanitoSebastian/Drinks-App","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuanitoSebastian%2FDrinks-App","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuanitoSebastian%2FDrinks-App/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuanitoSebastian%2FDrinks-App/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuanitoSebastian%2FDrinks-App/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JuanitoSebastian","download_url":"https://codeload.github.com/JuanitoSebastian/Drinks-App/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuanitoSebastian%2FDrinks-App/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275231606,"owners_count":25428220,"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","status":"online","status_checked_at":"2025-09-15T02:00:09.272Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["docker","docker-compose","express","nginx","react","typescript"],"created_at":"2024-11-11T14:45:47.711Z","updated_at":"2026-04-13T03:03:44.061Z","avatar_url":"https://github.com/JuanitoSebastian.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ☕️ Drinks App\nA small web application for saving your favorite coffees and teas. The front end is a Typescript React (Vite) and the back end is Typescript Express. \n\n## 🏃 Running a production build\nYou have to have [docker and docker-compose installed](https://docs.docker.com/compose/install/) for running the application.\n1. Clone the repository by running `git clone https://github.com/JuanitoSebastian/Drinks-App.git`\n2. Open terminal at the root of the repository and run `docker compose up`\n3. The application launches at `localhost:80`\n\n## 🛸 Running tests\nThe application features integration tests for the back end created with jest and supertest. You have to have [docker and docker-compose installed](https://docs.docker.com/compose/install/) for running tests.\n1. Clone the repository by running `git clone https://github.com/JuanitoSebastian/Drinks-App.git`\n2. Open terminal at the root of the repository and run `docker-compose --file test.docker-compose.yml up`\n\n## 📡 API endpoints\n\n### Fetch many drinks\n```\nGET /api/drinks?type={{type}}\u0026search={{search}}\n```\n| Parameter | Type   | Required? | Description                                       |\n|-----------|--------|-----------|---------------------------------------------------|\n| type      | enum   | no        | Type of drink. Enum values: **coffee** or **tea** |\n| search    | string | no        | Search by name of drink.                          |\n\n**Example response**\n```\n{\n    \"data\": [\n        {\n            \"id\": \"912045b0-b5db-11ed-ac2e-4df5eed4e12c\",\n            \"type\": \"tea\",\n            \"name\": \"Dreamy Mountains\",\n            \"price\": 2.2,\n            \"roast\": 2,\n            \"weight\": 500\n        },\n        {\n            \"id\": \"939c1b20-b5db-11ed-ac2e-4df5eed4e12c\",\n            \"type\": \"coffee\",\n            \"name\": \"Lucaffe Mamma Lucia\",\n            \"price\": 22.9,\n            \"roast\": 4,\n            \"weight\": 500\n        }\n    ]\n}\n```\n\n### Create new drink\n```\nPOST /api/drinks\n```\nEndpoint for creating new drinks. Successful creation returns the created Drink.\n- name: string\n- type: enum, supported values coffee and tea\n- price: number\n- roast: number, integer from 1 to 5\n- weight: number, weight in grams\n\n**Example request body**\n\n```\n{\n    \"name\": \"MokaSirs Intenso\",\n    \"type\": \"coffee\",\n    \"price\": 7,\n    \"roast\": 5,\n    \"weight\": 1000\n}\n```\n**Example response**\n\n```\n{\n    \"data\": {\n        \"id\": \"37ffd620-b730-11ed-ab99-c938791196c1\",\n        \"name\": \"MokaSirs Intenso\",\n        \"type\": \"coffee\",\n        \"price\": 7,\n        \"roast\": 5,\n        \"weight\": 1000\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuanitosebastian%2Fdrinks-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuanitosebastian%2Fdrinks-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuanitosebastian%2Fdrinks-app/lists"}