{"id":22485005,"url":"https://github.com/pinceladasdaweb/docker-fastify-restful-api","last_synced_at":"2026-04-04T19:54:30.456Z","repository":{"id":41988369,"uuid":"332480746","full_name":"pinceladasdaweb/docker-fastify-restful-api","owner":"pinceladasdaweb","description":"Node.js RESTful API boilerplate using Traefik, Docker, Docker Compose, Fastify, JWT and Mongodb","archived":false,"fork":false,"pushed_at":"2026-03-25T21:01:39.000Z","size":6332,"stargazers_count":87,"open_issues_count":1,"forks_count":24,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-03-26T00:20:53.362Z","etag":null,"topics":["docker","fastify","jwt","mongodb","sonarqube","sonarqube-dashboard","traefik"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"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/pinceladasdaweb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-01-24T15:14:07.000Z","updated_at":"2026-03-19T18:17:20.000Z","dependencies_parsed_at":"2026-01-20T15:02:29.263Z","dependency_job_id":null,"html_url":"https://github.com/pinceladasdaweb/docker-fastify-restful-api","commit_stats":null,"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"purl":"pkg:github/pinceladasdaweb/docker-fastify-restful-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinceladasdaweb%2Fdocker-fastify-restful-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinceladasdaweb%2Fdocker-fastify-restful-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinceladasdaweb%2Fdocker-fastify-restful-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinceladasdaweb%2Fdocker-fastify-restful-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pinceladasdaweb","download_url":"https://codeload.github.com/pinceladasdaweb/docker-fastify-restful-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinceladasdaweb%2Fdocker-fastify-restful-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31411351,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T19:29:44.979Z","status":"ssl_error","status_checked_at":"2026-04-04T19:29:11.535Z","response_time":60,"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":["docker","fastify","jwt","mongodb","sonarqube","sonarqube-dashboard","traefik"],"created_at":"2024-12-06T17:11:53.077Z","updated_at":"2026-04-04T19:54:30.432Z","avatar_url":"https://github.com/pinceladasdaweb.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Docker Fastify RESTful API\n\nNode.js RESTful API boilerplate using Traefik, Docker, Docker Compose, Fastify, JWT and Mongodb.\n\n## Requirements\n1. Node.js \u003e= 16\n2. Docker\n3. Docker compose\n\n## Getting started\n\nInstall packages using docker:\n\n```sh\ndocker run --rm -it \\\n-v ${PWD}:/usr/src/app \\\n-w /usr/src/app \\\nnode:16-alpine npm i\n```\n\nWindows users should switch the PWD variable to your current directory. Alternatively, you can run npm install as follows:\n\n```sh\ndocker-compose run --rm api npm install\n```\n\nOr if you have node installed in your system, install using npm:\n\n```sh\nnpm install\n```\n\n## Configuration\n\n1. Rename the .env.example file to .env and fill variables. The Postgres variables are required for Sonarqube. The SENTRY_DSN variable is not obligatory.\n\n2. Edit your hosts file with:\n  \u003e127.0.0.1 fastify.localhost\n  \u003e\n  \u003e127.0.0.1 sonarqube.localhost\n\n## Run\n\nIn the root of project, run:\n\n```sh\ndocker-compose up\n```\n\n## API Request\n\n| Endpoint                           | HTTP Method             | Description             |\n| ---------------------------------- | :---------------------: | :---------------------: |\n| `/api/v1`                          | `GET`                   | `Healthcheck`           |\n| `/api/v1/users/register`           | `POST`                  | `Adds a new user`       |\n| `/api/v1/users/auth`               | `POST`                  | `Authenticate user`     |\n| `/api/v1/movies`                   | `GET`                   | `List all movies`       |\n| `/api/v1/movies/:id`               | `GET`                   | `Get movie`             |\n| `/api/v1/movies`                   | `POST`                  | `Adds a new movie`      |\n| `/api/v1/movies/:id`               | `PATCH`                 | `Update a movie`        |\n| `/api/v1/movies/:id`               | `DELETE`                | `Delete a movie`        |\n\n\n## Test API locally using curl\n\n- #### Healthcheck\n\n`Request`\n```bash\ncurl -i --request GET 'http://fastify.localhost/api/v1'\n```\n\n`Response`\n```bash\n{\n  \"message\": \"Fastify API is on fire\"\n}\n```\n\n## Insominia Collection\n\nI exported Insomnia [`collection/data`](insomnia_2021-02-07.json) for so you can test all the endpoints.\n\n## Sonarqube dashboard\n\nTo access Sonarqube dashboard, simple access in your browser:\n\n```sh\nhttp://sonarqube.localhost\n```\n\n![](/sonarqube.png)\n\n[Follow the guide](SONARQUBE.md) to learn more about the settings and how to run Sonar code analysis.\n\n## Traefik dashboard\n\nTo access Traefik dashboard, simple access in your browser:\n\n```sh\nhttp://localhost:8080\n```\n\n![](/traefik.png)\n\n## Infrastructure model\n\n![Infrastructure model](.infragenie/infrastructure_model.png)\n\nHappy coding!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinceladasdaweb%2Fdocker-fastify-restful-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpinceladasdaweb%2Fdocker-fastify-restful-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinceladasdaweb%2Fdocker-fastify-restful-api/lists"}