An API for animal's organizations to register their accounts and post their little furry friends (or not) for adoption!
- Create a new organization
- Authenticate your account
- Create new pets for adoption
- Search pets by city & characteristics
- Node.js
- Typescript
- Fastify
- Prisma
- Zod
- Docker (PostgreSQL)
- Vitest
- Supertest
git clone *projet-url*
cd *projects-directory*
npm install
*Reminder: Docker software must be installed previously.
docker compose up -d
- It must be possible to register a pet.
- It must be possible to list all pets available for adoption in a city.
- It must 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 organization.
- It must be possible to log in as an organization.
- To list pets, it is mandatory to provide the city.
- An ORG must have an address and a WhatsApp number.
- A pet must be linked to an ORG.
- All filters, besides the city, are optional.
- For an ORG to access the application as an admin, it needs to be logged in.
POST /organization
Body Data | Type | Description |
---|---|---|
name |
string |
Mandatory. Organization's name |
name_responsible |
string |
Mandatory. Organization's responsible person name |
email |
string |
Mandatory. Organization's email. |
password |
string |
Mandatory. Organization's password. |
address |
string |
Mandatory. Organization's address. |
city |
string |
Mandatory. Organization's city. |
postal_code |
string |
Mandatory. Organization's postal_code. |
image |
string |
Optional. Organization's image. |
whatsapp |
string |
Mandatory. Organization's whatsapp. |
POST /authenticate
Body Data | Type | Description |
---|---|---|
email |
string |
Mandatory. Organization's email. |
password |
string |
Mandatory. Organization's password. |
POST /pets
Body Data | Type | Description |
---|---|---|
name |
string |
Mandatory. Pet's name. |
about |
string |
Mandatory. Pet's description. |
age |
string |
Mandatory. Pet's age description. |
energy |
number |
Mandatory. Pet's energy level. |
independent |
string |
Mandatory. Pet's independency description. |
environment |
string |
Mandatory. Pet's environment adaptability (small places, etc). |
city |
string |
Mandatory. Pet's city (must be same as Organization that's creating pet). |
type |
string |
Mandatory. Pet's type (dog, cat, bird, etc). |
requirements |
string |
Mandatory. Pet's requirements for adoption. |
photo |
string |
Mandatory. Pet's photo. |
GET /pets/city
Query Params | Type | Description |
---|---|---|
query |
string |
Mandatory. Query parameter, in this case is the city. |
page |
number |
Optional. Page with pets information. |
GET /pets
Body Data | Type | Description |
---|---|---|
city |
string |
Mandatory. City to look up pets. |
age |
string |
Optional. Pet's age. |
energy |
string |
Optional. Pet's energy level. |
type |
string |
Optional. Pet's type. |
independent |
string |
Optional. Pet's independent description. |
environment |
string |
Optional. Pet's environment description. |
- Improved unit & integration testing abilities
- Better understanding of working with layers in application
- SOLIDs principles of dependencies inversion & single responsibilities
- Docker basic concepts practiced
- Build test environment