{"id":25534541,"url":"https://github.com/teresaromero/restaurants-api","last_synced_at":"2026-05-15T20:03:30.104Z","repository":{"id":277674884,"uuid":"932725846","full_name":"teresaromero/restaurants-api","owner":"teresaromero","description":"Take home assessment, develop of a restaurant api","archived":false,"fork":false,"pushed_at":"2025-02-27T11:28:07.000Z","size":195,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-19T07:57:52.249Z","etag":null,"topics":["prisma","sqlite","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":false,"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/teresaromero.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-02-14T12:05:49.000Z","updated_at":"2025-03-15T10:09:10.000Z","dependencies_parsed_at":"2025-02-15T11:24:07.094Z","dependency_job_id":"6eb6b0d9-33ac-4576-a458-8ec8a8f96d04","html_url":"https://github.com/teresaromero/restaurants-api","commit_stats":null,"previous_names":["teresaromero/restaurants-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/teresaromero/restaurants-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teresaromero%2Frestaurants-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teresaromero%2Frestaurants-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teresaromero%2Frestaurants-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teresaromero%2Frestaurants-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teresaromero","download_url":"https://codeload.github.com/teresaromero/restaurants-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teresaromero%2Frestaurants-api/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267622800,"owners_count":24117061,"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-07-29T02:00:12.549Z","response_time":2574,"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":["prisma","sqlite","typescript"],"created_at":"2025-02-20T03:19:54.675Z","updated_at":"2026-05-15T20:03:25.072Z","avatar_url":"https://github.com/teresaromero.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Restaurants API\n\n[![Build and Test](https://github.com/teresaromero/restaurants-api/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/teresaromero/restaurants-api/actions/workflows/build-and-test.yml)\n\nRestaurants API serves restaurants information.\n\n- Admins can add, edit and delete restaurants.\n- Users can add reviews to the restaurants and save them as favourite.\n\n## How to run the project\n\nClone the project and install dependencies\n\n```bash\n    git clone https://github.com/teresaromero/restaurants-api.git \u0026\u0026 cd restaurants-api \u0026\u0026 yarn install\n```\n\nThe project uses a SQLite Database, a Prisma ORM is use for integration with the server. To run locally make sure you follow this steps:\n\n1. Set up the DATABASE_URL environment variable to point to the SQLite file:\n\n```bash\n    export DATABASE_URL=file:./db/dev.db\n```\n\n2. Set the required environment variables at a `.env` file, for example:\n\n```bash\nexport JWT_SECRET=yousecret\nexport JWT_EXPIRES_IN=secondstoexpire\nexport HASH_SALT=hashnumber\n```\n\n(you can use the same `.env` file for database and app environments)\n\n3. Generate Prisma Client \u0026 Migrations\n\nPrisma ORM generates the client within node_modules with the provided schema. For the app to work the Client should be generated.\n\n```bash\n    yarn prisma:generate\n```\n\nOnce the dependency for PrismaClient has been created, the database has to be initialized.\nRun migrations so the database schema is aligned with the prisma schema and the client.\n\n```bash\n    yarn prisma:migrate:deploy\n```\n\nOnce you have the database setup, you can inspect it by using Prisma Studio\n\n```bash\n    yarn prisma:studio\n```\n\n**_prisma will use the DATABASE_URL on the .env file defined for all the commands_**\n\n3. Run the server\n\n```bash\n    yarn dev\n```\n\nData models can be consulted at Prisma schema [here](./prisma/schema.prisma)\n\n## SwaggerUI and OpenAPI Spec\n\nAn OpenAPI spec is available [here](./openapi.yaml).\n\nHowever, in development mode, there is a SwaggerUI available to test the API. Once the server is running you can access `http://localhost:${PORT}/docs`.\n\n## Roadmap, missing features\n\n- Implement routes for admin statistics of: number of users, reviews, restaurants.\n- Deployment flow\n- E2E automation with Bruno CLI in Github\n- Implement session management and refresh token for auth\n- Migrate to Postgres\n\n## Architecture diagram\n\nDiagrams available at [here](https://excalidraw.com/#json=hFj3XTSj_eVfnsZ5_74ue,krk3BNxrwEArPayhA8Iu8w)\n\nImprovements over current design:\n\n- Replace SQLite with Postgres: replication of data and more eficient queries\n- Use Redis Cache: distributed cache to support listing of restaurants and reviews initially\n- Add monitoring and logging to be able to know what is happening in the system, potential breaking points or issues or decide which request needs better performance\n- Implement a queue system to ingest the reviews creation (potentially the more loaded create flow)\n- Use Kubernetes for orchestration of the containers and scale horizontally using a load balancer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteresaromero%2Frestaurants-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteresaromero%2Frestaurants-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteresaromero%2Frestaurants-api/lists"}