Skip to content

Commit

Permalink
chore: add docker compose on readme instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
felipe committed Dec 6, 2023
1 parent add6b96 commit 6550a3c
Showing 1 changed file with 16 additions and 33 deletions.
49 changes: 16 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

This project is a Gym Management System designed to provide essential functionalities for gym users and administrators. It covers a range of features, including user registration, authentication, profile retrieval, check-in history, searching for nearby gyms, checking in at gyms, and registering new gyms.

## Functional
## Functional

1. User Management:

Expand Down Expand Up @@ -39,7 +39,7 @@ Ensure you have the following tools installed:
Node.js
PostgreSQL

1. Clone the repository:
1. Clone the repositor:

```
git clone https://github.com/Feelpe/fastify-gym-solid
Expand All @@ -59,45 +59,28 @@ npm install

4. Create a .env file based on the provided .env.example and fill in the required credentials.

5. Run database migrations:
JWT_SECRET=any-secret

```
npx prisma db push
```
DATABASE_URL="database-url"

6. Start the application:
If you want to use Docker just run the following command

```
npm run dev
docker compose up
```

The application will be available at http://localhost:3000.

## RFs (Requisitos funcionais)
And use the URl already set on .env.example

- [x] Deve ser possível se cadastrar;
- [x] Deve ser possível se autenticar;
- [x] Deve ser possível obter o perfil de um usuário logado;
- [x] Deve ser possível obter o número de check-ins realizados pelo usuário logado;
- [x] Deve ser possível o usuário obter seu histórico de check-ins;
- [x] Deve ser possível o usuário buscar academias próximas (até 10km);
- [x] Deve ser possível Deve ser possível o usuário buscar academias pelo nome;
- [x] Deve ser possível o usuário realizar check-in em uma academia;
- [x] Deve ser possível validar o check-in de um usuário;
- [x] Deve ser possível cadastrar uma academia;
5. Run database migrations:

## RNs (Regras de negócio)
```
npx prisma migrate dev
```

- [x] O usuário não deve poder se cadastrar com um e-mail duplicado;
- [X] O usuário não pode fazer 2 check-ins no mesmo dia;
- [X] O usuário não pode fazer check-in se não estiver perto (100m) da academia;
- [x] O check-in só pode ser validade até 20 minutos após criado;
- [x] O check-in só pode ser validado por administradores;
- [x] A academia só pode ser cadastrada por administradores;
6. Start the application:

## RNFs (Requisitos não-funcionais)
```
npm run dev
```

- [x] A senha do usuário precisa estar criptografado;
- [x] Os dados da aplicação precisa estar persistido em um banco PostgreSQL;
- [x] Todas as listas de dados precisam estar paginadas com 20 itens por página;
- [x] O usuário deve ser identificados por um JWT (JSON Web Token);
The application will be available at <http://localhost:3000>.

0 comments on commit 6550a3c

Please sign in to comment.