https://github.com/leandrolimadeveloper/desafio-solid-ignite
Desafio 1 - SOLID - Rocketseat
https://github.com/leandrolimadeveloper/desafio-solid-ignite
Last synced: 3 months ago
JSON representation
Desafio 1 - SOLID - Rocketseat
- Host: GitHub
- URL: https://github.com/leandrolimadeveloper/desafio-solid-ignite
- Owner: leandrolimadeveloper
- Created: 2023-02-16T16:33:53.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-27T14:25:24.000Z (about 2 years ago)
- Last Synced: 2025-01-14T03:32:21.886Z (4 months ago)
- Language: TypeScript
- Size: 277 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Desafio SOLID - Ignite
## Sobre
Resolução dos desafios 01 e 02 acerca do assunto SOLID, e documentação feita com Swagger :rocket: :purple_heart:### Desafio 1
Criar uma aplicação de cadastro e listagem de usuários utilizando os conceitos de SOLID aprendidos.### Desafio 2
Documentar as rotas utiliando o Swagger.## :white_check_mark: Requisitos
### Rotas da aplicação
- [x] POST /users
- [x] PATCH /users/:user_id/admin
- [x] GET /users/:user_id
- [x] GET /users/:user_id### Específicação dos testes
#### Teste do model
- [x] Should be able to create an user with all props#### Testes do repositório
- [x] Should be able to create new users
- [x] Should be able to list all users
- [x] Should be able to find user by ID
- [x] Should be able to find user by e-mail address
- [x] Should be able to turn an user as admin##### Testes de useCases
- [x] Should be able to create new users
- [x] Should not be able to create new users when email is already taken
- [x] Should be able to turn an user as admin
- [x] Should not be able to turn a non existing user as admin
- [x] Should be able to get user profile by ID
- [x] Should not be able to show profile of a non existing user
- [x] Should be able to list all users
- [x] Should not be able to a non admin user get list of all users
- [x] Should not be able to a non existing user get list of all users## :computer: Instalação e uso ##
```bash
# Clonar repositório
$ git clone https://github.com/leandrolimadeveloper/Desafio-SOLID-Ignite# Acessar diretório
$ cd Desafio-SOLID-Ignite# Instalação de dependências
$ npm i# Executar aplicação
$ npm run dev```
O servidor inciará na porta 3333.
Para acessar a aplicação: ```http://localhost:3333```
Para acessar a documentação: ```http://localhost:3333/api-docs```