{"id":14969211,"url":"https://github.com/tomdoestech/fastify-prisma-rest-api","last_synced_at":"2025-04-13T10:57:38.970Z","repository":{"id":42180313,"uuid":"464021024","full_name":"TomDoesTech/fastify-prisma-rest-api","owner":"TomDoesTech","description":null,"archived":false,"fork":false,"pushed_at":"2022-12-11T21:13:46.000Z","size":102,"stargazers_count":214,"open_issues_count":1,"forks_count":62,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-27T02:11:37.011Z","etag":null,"topics":["authentication","fastify","nodejs","prisma","tutorial","typescript"],"latest_commit_sha":null,"homepage":"https://youtu.be/LMoMHP44-xM","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/TomDoesTech.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}},"created_at":"2022-02-27T02:51:00.000Z","updated_at":"2025-03-26T22:14:39.000Z","dependencies_parsed_at":"2023-01-27T07:00:37.921Z","dependency_job_id":null,"html_url":"https://github.com/TomDoesTech/fastify-prisma-rest-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomDoesTech%2Ffastify-prisma-rest-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomDoesTech%2Ffastify-prisma-rest-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomDoesTech%2Ffastify-prisma-rest-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomDoesTech%2Ffastify-prisma-rest-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TomDoesTech","download_url":"https://codeload.github.com/TomDoesTech/fastify-prisma-rest-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248703194,"owners_count":21148117,"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":["authentication","fastify","nodejs","prisma","tutorial","typescript"],"created_at":"2024-09-24T13:41:22.246Z","updated_at":"2025-04-13T10:57:38.952Z","avatar_url":"https://github.com/TomDoesTech.png","language":"TypeScript","readme":"# Build a REST API with Fastify \u0026 Prisma\n\nVideo: https://youtu.be/LMoMHP44-xM\n\n## What are we using?\n* Fastify - Web server\n* Prisma - Database ORM\n* Zod - Request and response validation\n* Swagger - API docs\n* TypeScript - Types \u0026 other cool stuff\n\n## What you will need\n* [Postman](https://www.postman.com/) - Make API requests\n* [Prisma studio](https://www.prisma.io/studio) - View data\n* [PostreSQL or MySQL](https://github.com/tomanagle/awesome-docker-compose) - Database\n* [Code editor](https://code.visualstudio.com/) - Edit your code\n\n## Features\n* Create a user\n* Login\n* List users\n* Create a product\n* List products\n* Authentication\n* Request \u0026 response validation\n* Swagger docs\n\n## Video structure\n1. Demonstration\n2. Code walk-through\n3. Bootstrap application\n    * Setup Prisma\n    * Create Fastify instance\n4. Create user\n    * Hash password\n5. List users\n6. Login\n    * fastify-jwt setup\n7. Create product\n8. List products\n\n# Testing\n## What are we testing with?\n* [Node Tap](https://node-tap.org/) - Test framework\n* [fastify.inject](https://www.fastify.io/docs/latest/Guides/Testing/#benefits-of-using-fastifyinject) - Inject HTTP requests\n* [faker-js](@faker-js/faker) - Generate test data\n* [ts-mock-imports](https://www.npmjs.com/package/ts-mock-imports) - Mock imports\n\n## What will I learn?\n* How to test your API end-to-end\n* How to inject http requests to your Fastify application\n* How to mock function calls\n* How to test with a test database\n\n## Where can I learn more about testing Fastify?\n* [Unit Test Patterns And Strategies](https://github.com/knockaway/unit-test-patterns-and-strategies)\n* [Node Tap documentation](https://node-tap.org/docs/getting-started/)\n* [Fastify documentation](https://www.fastify.io/docs/latest/Guides/Testing/)\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomdoestech%2Ffastify-prisma-rest-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomdoestech%2Ffastify-prisma-rest-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomdoestech%2Ffastify-prisma-rest-api/lists"}