{"id":22646039,"url":"https://github.com/vunamhung/fastify-boilerplate","last_synced_at":"2025-06-17T23:39:08.934Z","repository":{"id":116050438,"uuid":"297774801","full_name":"vunamhung/fastify-boilerplate","owner":"vunamhung","description":"Fastify + Typescript","archived":false,"fork":false,"pushed_at":"2025-04-26T09:32:51.000Z","size":1287,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-26T10:30:03.208Z","etag":null,"topics":["fastify","mongodb","mongoose","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/vunamhung.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":"2020-09-22T21:19:56.000Z","updated_at":"2024-06-25T07:16:28.000Z","dependencies_parsed_at":"2023-10-14T10:19:43.642Z","dependency_job_id":"3fdb0fc8-0a96-43a5-9013-8e0ba05ffd75","html_url":"https://github.com/vunamhung/fastify-boilerplate","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/vunamhung/fastify-boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vunamhung%2Ffastify-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vunamhung%2Ffastify-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vunamhung%2Ffastify-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vunamhung%2Ffastify-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vunamhung","download_url":"https://codeload.github.com/vunamhung/fastify-boilerplate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vunamhung%2Ffastify-boilerplate/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260458895,"owners_count":23012505,"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","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":["fastify","mongodb","mongoose","typescript"],"created_at":"2024-12-09T06:08:36.003Z","updated_at":"2025-06-17T23:39:03.925Z","avatar_url":"https://github.com/vunamhung.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Getting Started\n\nFirst, run the development server:\n\n```bash\nnpm dev\n```\n\n## Manual deploy to server\n\n```bash\nnpm deploy\n```\n\n## Run use pm2\n\n### Start pm2 cluster\n\n```bash\npm2 start ./dist/index.js --name fastify -i 3\n```\n\n### Reload pm2 cluster\n\n```bash\npm2 reload admin_api\n```\n\n## API Rules\n\nURI formats\n\n- Forward slash separator (/) must be used to indicate a hierarchical\n  relationship\n- A trailing forward slash (/) should not be included in URIs\n- Hyphens (-) should be used to improve the readability of URIs\n- Underscores (\\_) should not be used in URIs\n- Prefer all lowercase letters in a URI path\n- Do not include file extensions\n\nResource archetypes\n\n- Document\n- Collection\n- Stores\n- Controller\n\nURI path\n\n- Use singular nouns for document names\n- Use plural nouns for collections and stores\n- As controller names represent an action, use a verb or verb phrase for controller resources\n- Do not use CRUD function names in URIs\n\nURI query\n\n- Use the query to filter collections or stores\n- Use the query to paginate collection or store results\n\nRequest methods\n\n- Don't tunnel to other requests with the GET and POST methods\n- Use the GET method to retrieve a representation of a resource\n- Use the HEAD method to retrieve response headers\n- Use the PUT method to update and insert a stored resource\n- Use the PUT method to update mutable resources\n- Use the POST method to create a new resource in a collection\n- Use the POST method for controller's execution\n- Use the DELETE method to remove a resource from its parent\n- Use the OPTIONS method to retrieve metadata\n\nResponse status codes\n\n- 200: (“OK”) must not be used to communicate errors in the response\n  body\n- 201: (“Created”) must be used to indicate successful resource creation\n- 202: (“Accepted”) must be used to indicate successful start of an\n  asynchronous action\n- 204: (“No Content”) should be used when the response body is\n  intentionally empty\n- 301: (“Moved Permanently”) should be used to relocate resources\n- 303: (“See Other”) should be used to refer the client to a different URI\n- 304: (“Not Modified”) should be used to preserve bandwidth\n- 307: (“Temporary Redirect”) should be used to tell clients to resubmit\n  the request to another URI\n- 400: (“Bad Request”) may be used to indicate nonspecific failure\n- 401: (“Unauthorized”) must be used when there is a problem with the\n  client’s credentials\n- 403: (“Forbidden”) should be used to forbid access regardless of\n  authorization state\n- 404: (“Not Found”) must be used when a client’s URI cannot be mapped to a resource\n- 405: (“Method Not Allowed”) must be used when the HTTP method is\n  not supported\n- 406: (“Not Acceptable”) must be used when the requested media type\n  cannot be served\n- 409: (“Conflict”) should be used to indicate a violation of resource state\n- 500: (“Internal Server Error”) should be used to indicate API\n  malfunction\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvunamhung%2Ffastify-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvunamhung%2Ffastify-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvunamhung%2Ffastify-boilerplate/lists"}