Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/diego64/api-find-a-friend
API for ONG registration to register pets for responsible adoption
https://github.com/diego64/api-find-a-friend
docker fastify nodejs postgresql prisma vitets
Last synced: 26 days ago
JSON representation
API for ONG registration to register pets for responsible adoption
- Host: GitHub
- URL: https://github.com/diego64/api-find-a-friend
- Owner: diego64
- License: mit
- Created: 2024-08-24T18:02:32.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-08-25T15:36:53.000Z (2 months ago)
- Last Synced: 2024-09-28T11:22:15.917Z (about 1 month ago)
- Topics: docker, fastify, nodejs, postgresql, prisma, vitets
- Language: TypeScript
- Homepage:
- Size: 126 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Developed with the software and tools below.
## ๐ 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
- [x] It should be possible to register as an ORG
- [x] It should be possible to log in as an ORG
- [x] It should be possible to register a pet
- [x] It should be possible to list all pets available for adoption in a city
- [x] It should be possible to filter pets by their characteristics
- [x] It should be possible to view details of a pet for adoption### ๐ฆ Business rules
- [x] To list pets, we must inform the city
- [x] An ORG must have an address and a WhatsApp number
- [x] A pet must be linked to an ORG
- [x] The user who wants to adopt will contact the ORG via WhatsApp
- [x] All filters, besides the city, are optional
- [x] For an ORG to access the application as an admin, it must be logged in---
## ๐๏ธ Repository Structure
```sh
โโโ 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:
>
> ```console
> $ git clone https://github.com/diego64/api-find-a-friend
> ```
>
> 2. Change to the project directory:
> ```console
> $ cd api-find-a-friend
> ```
>
> 3. Install the dependencies:
> ```console
> $ npm install
> ```
> 4. Install the database:
> ```console
> $ docker compose up -d
> ```
> 5. Generate the migrantios:
> ```console
> $ npx prisma migrate dev
> ```
> 6. Start the application:
> ```console
> $ npm run start:dev
> ```### ๐งช Tests
> Run the functional tests using the command below:
> ```console
> $ npm run test
> ```
> Run E2E tests using the command below:
> ```console
> $ 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.