A api focused on pet adoption logic, created using Nodejs + Typescript + Fastify + SOLID principles
This is a project used for study purposes only • Samir El Hassan
- fastify
- prisma
- zod
- vitest
Install all the packages
yarn install
start the postgres sql
docker compose up -d
Generate the prisma typescript and generate the local database
yarn prisma generate && yarn prisma migrate dev
create a .env file following the values on .env.example, after that run:
yarn dev
Unit tests:
yarn test
- It must be possible to register a pet
- It should be possible to list all pets available for adoption in a city
- It should be possible to filter pets by their characteristics
- It must be possible to view details of a pet for adoption
- It must be possible to register as an ORG
- Must be able to login as an ORG
- To list the pets, we must inform the city
- An ORG needs to have an address and a WhatsApp number
- A pet must be linked to an ORG
- The user who wants to adopt will contact the ORG via WhatsApp
- All filters other than city are optional
- For an ORG to access the application as admin, it needs to be logged in