https://github.com/fernando-medeiros/dboard-auth-nest-api
https://github.com/fernando-medeiros/dboard-auth-nest-api
api-rest backend backend-auth nestjs prisma swagger tyepscript
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/fernando-medeiros/dboard-auth-nest-api
- Owner: Fernando-Medeiros
- Created: 2023-05-25T03:31:57.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-09-11T21:15:49.000Z (over 1 year ago)
- Last Synced: 2025-02-11T17:16:43.273Z (4 months ago)
- Topics: api-rest, backend, backend-auth, nestjs, prisma, swagger, tyepscript
- Language: TypeScript
- Homepage:
- Size: 826 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: docs/README.md
Awesome Lists containing this project
README
# Dashboard-Auth-Backend-RestAPI







## Dependências
| Ferramenta / Pacote | Versão | Opcional |
| :------------------ | :-----------: | :------: |
| Docker Desktop | ^4 | |
| Docker Compose | ^2 | x |
| VsCode | ^1.8 | x |
| Node | ^18 | |
| Yarn ou Npm | ^1.22 ou ^9.8 | |## Funcionalidades
| route | get | post | patch | delete |
| :-------- | :---------: | :----------------: | :---------------: | :--------: |
| auth | | [ token, refresh ] | | |
| customers | [ findOne ] | [ register ] | [ update ] | [ remove ] |
| passwords | | [ recover ] | [ update, reset ] | |## Instalação
Copie o template do env para .env
```sh
cp env-example .env
```Instale as dependências do [package.json](../package.json)
```sh
yarn install && yarn build
```## Variáveis de ambiente
```sh
PORT=3000
NODE_ENV=devDATABASE_URL="postgresql://postgres:docker@localhost:5432/DEVELOPMENT?schema=public"
CORS_ORIGIN=http://localhost:5173
URL_RESET_PASSWORD=http://localhost:5173/password/resetRATE_LIMITER_MAX_REQUEST=100
RATE_LIMITER_DURATION=10 # Set MinutesJWT_SECRET=001001001001
JWT_EXPIRATION=3h
JWT_EXPIRATION_RECOVER=5m
ENCRYPT_JWT_SECRET=1001001001001[email protected]
NODEMAILER_PASS=password
NODEMAILER_HOST=smtp.gmail.com
NODEMAILER_PORT=465
```## Docker
```sh
# Para subir o container
docker compose up -d
```## Prisma
```sh
yarn prisma generate # atualizar o prisma.schema
yarn prisma db push # subir o schema para o banco de dados
yarn prisma studio # visualizar os dados
```## Servidor
```sh
yarn start # production - [node dist/src/main]
yarn start:dev # watch - [nest start --watch]
```[http://localhost:3000/](http://localhost:3000/)
## Testes
```sh
yarn test # unit tests
yarn test:e2e # e2e tests
```## Licença
Nest is [MIT licensed](LICENSE).
## Endpoints

