Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/diego64/api-from-academy
API whose main objective is to serve WEB applications focused on gyms so that owners can register their gyms and users can mark their presence always within a limit of 10 meters
https://github.com/diego64/api-from-academy
docker fastify nodejs postgresql prisma-orm solid vitest zod
Last synced: 26 days ago
JSON representation
API whose main objective is to serve WEB applications focused on gyms so that owners can register their gyms and users can mark their presence always within a limit of 10 meters
- Host: GitHub
- URL: https://github.com/diego64/api-from-academy
- Owner: diego64
- License: mit
- Created: 2024-07-22T20:11:59.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-08-25T00:23:18.000Z (2 months ago)
- Last Synced: 2024-09-28T11:22:38.742Z (about 1 month ago)
- Topics: docker, fastify, nodejs, postgresql, prisma-orm, solid, vitest, zod
- Language: TypeScript
- Homepage:
- Size: 509 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Developed with the software and tools below.
## ๐ Overview
The application aims to be an API that allows the user to schedule their day at the gym and a gym to register its unit. Remembering that you need to have `Node.js` and `docker` installed on your machine.
The application has the following rules.
### ๐ RFs (Functional Requirements)
- [x] It must be possible to register;
- [x] It must be possible to authenticate;
- [x] It must be possible to obtain the profile of a logged-in user;
- [x] It must be possible to obtain the number of check-ins performed by the logged-in user;
- [x] The user must be able to obtain his/her check-in history;
- [x] The user must be able to search for nearby gyms (up to 10km);
- [x] The user must be able to search for gyms by name;
- [x] The user must be able to check-in at a gym;
- [x] It must be possible to validate a user's check-in;
- [x] It must be possible to register a gym;### ๐ฆ RNs (Business Rules)
- [x] The user must not be able to register with a duplicate email;
- [x] The user cannot check-in twice on the same day; - [x] The user cannot check in if he/she is not close (100m) to the gym;
- [x] The check-in can only be validated up to 20 minutes after being created;
- [x] The check-in can only be validated by administrators;
- [x] The gym can only be registered by administrators;### ๐งฉ NFRs (Non-functional Requirements)
- [x] The user's password must be encrypted;
- [x] The application data must be persisted in a PostgreSQL database;
- [x] All data lists must be paginated with 20 items per page;
- [x] The user must be identified by a JWT (JSON Web Token);---
## ๐๏ธ Repository Structure
```sh
โโโ api-from-academy
โโโ .img.shields.io
โโโ prisma
โโโ src
โโโ .env.example
โโโ .eslintignore
โโโ .eslintrc.json
โโโ docker-compose.yml
โโโ LICENSE
```---
### โ๏ธ Installation
From
source
> 1. Clone the repository:
>
> ```console
> $ git clone https://github.com/diego64/api-from-academy
> ```
>
> 2. Change to the project directory:
> ```console
> $ cd api-from-academy
> ```
>
> 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.
---