# clone the project
git clone https://github.com/Joabesv/beautiful-api.git
# install deps
pnpm i
# Populate the .env file with your secrets
cp .env.example .env
# Init Docker-compose
docker-compose up -d
# Migrate your schema
pnpm prisma migrate dev --name
# Finally start the server in watch mode
pnpm start:dev
- Fastify - Web server
- Prisma - Database ORM
- Zod - Request and response validation
- Swagger - API docs
- TypeScript - Types & other cool stuff
- Insomnia - Make API requests
- Prisma studio - View data
- PostreSQL or MySQL - Database
- Code editor - Edit your code
- Create a user
- Login
- List users
- Create a product
- List products
- Authentication
- Request & response validation
- Swagger docs
- Vitest - Test framework
- fastify.inject - Inject HTTP requests
- faker-js - Generate test data
- ts-mock-imports - Mock imports (do not recommend)
- How to test an API end-to-end
- How to inject http requests to your Fastify application (amazing feature)
- How to mock function calls
- How to test with a test database (this one i need to understand more)