Skip to content

API for ONG registration to register pets for responsible adoption

License

Notifications You must be signed in to change notification settings

diego64/api-find-a-friend

Repository files navigation

Node Logo

Developed with the software and tools below.

Node Fastify Prisma Zod Vitest

📍 Overview

This API aims to serve applications with the objective of registering NGOs and PETs so that they can be adopted.

The application has the following rules.

🔌 Application rules

  • It should be possible to register as an ORG
  • It should be possible to log in as an ORG
  • It should 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 should be possible to view details of a pet for adoption

📦 Business rules

  • To list pets, we must inform the city
  • An ORG must 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, besides the city, are optional
  • For an ORG to access the application as an admin, it must be logged in

🗂️ Repository Structure

└── find-a-friend
    ├── .img.shields.io
    ├── prisma
        └── migrations
        └── vitest-environment-prisma
    ├── src
      └── @types
      └── env
      └── http
      └── lib
      └── repositories
      └── tests
      └── use-cases
      └── utils
    ├── app
    ├── server
    ├── .env.example
    ├── .eslintignore
    ├── .eslintrc.json
    ├── docker-compose.yml
    ├── LICENSE

⚙️ Installation

From source

  1. Clone the repository:
$ git clone https://github.com/diego64/api-find-a-friend
  1. Change to the project directory:
$ cd api-find-a-friend
  1. Install the dependencies:
$ npm install
  1. Install the database:
$ docker compose up -d
  1. Generate the migrantios:
$ npx prisma migrate dev
  1. Start the application:
$ npm run start:dev

🧪 Tests

Run the functional tests using the command below:

$ npm run test

Run E2E tests using the command below:

$ npm run test:e2e

📄 License

This project is protected by the MIT License.

💻 Reference

This project is part of the Node.Js specialization program of the company Rockeseat through the Ignite program, which has undergone a content update since 2022 to the current moment.

This challenge aims to test the SOLID knowledge learned in the third chapter of the program. Since this project aimed at developing tests, there was no criterion for the organization and structure of the code, but rather the length of the proposed requirements and the development of unit and E2E tests.

About

API for ONG registration to register pets for responsible adoption

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published