Skip to content

A api focused on pet adoption logic, created using Nodejs + Typescript + Fastify + SOLID principles

Notifications You must be signed in to change notification settings

samirelhassann/find-a-friend-api

Repository files navigation

find-a-friend-api

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

Language and Tools

nodejs typescript

Additional Libraries

  • fastify
  • prisma
  • zod
  • vitest

Installation

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

Usage

create a .env file following the values on .env.example, after that run:

yarn dev

Test

Unit tests:

yarn test

Application Rules

  • 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

Business rules

  • 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

About

A api focused on pet adoption logic, created using Nodejs + Typescript + Fastify + SOLID principles

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published