O projeto Store Manager representa a parcela backend de um gerenciador de loja. Esse projeto foi desenvolvido para fins de estudo e tinha foco em solidificar o conhecimento backend utilizando o paradigma funcional, banco de dados relacionais utilizando o MySQL e testes.
The Store Manager project represents the backend portion of a store management system. This project was developed for study purposes and aimed to solidify backend knowledge using the functional paradigm, relational databases using MySQL, and testing.
No Navegador / On Browser ("http://localhost:3000/api-docs"):
GET /api-docs
Qualquer / Any:
- ✅ Desenvolver o backend de um gerenciador de loja / Develope the backend for a store management system;
- ✅ Desenvolvimento utilizando o paradigma funcional / Develop using functional paradigm;
- ✅ Desenvolver utilizando a arquitetura MSC(Model-Service-Controller) / Develop using the MVC (Model-Service-Controller) architecture;
- ✅ Implementar banco de dados / Database implementation;
- ✅ Desenvolver rotas de vendas e produtos / Develop sales and products routes
- ✅ Documentar aplicação / Document application
- ✅ Reforçar segurança com práticas como Helmet e Rate-Limit / Enhance security through practices such as Helmet and Rate-Limit;
- ✅ Cobrir no mínimo 100% por testes / Cover at least 100% with tests;
- ✅ Configurar Docker para execução do software / Configure Docker for software execution.
No terminal / On terminal:
git clone git@github.com:IgorMarinhoArgollo/store-manager.git
- node.js
- MySQL
No terminal / On terminal:
npm install
Crie o arquivo .env na pasta raiz contendo as seguintes chaves (vide exemplo a seguir) / Create the .env file in the root folder containing the following keys (see the example below):
# Nome do host do MySQL / MySQL host's name
MYSQL_HOST=localhost
# Usuário MySQL Local / Local MySQL User
MYSQL_USER=root
# Senha MySQL local / Local MySQL Password
MYSQL_PASSWORD=12345678
# Nome do DB / DB's Name
MYSQL_DATABASE=StoreManager
# Porta da aplicação / Application port
PORT=3000
# Dispensável, caso rodando localmente / Not needed for running locally
DB_PORT=3308
No terminal / On terminal:
# cria o DB / create DB
npm run migration
# popula o DB / populate DB
npm run seed
# inicia a aplicação / start application
npm run dev
- Docker
- Docker-compose
Crie o arquivo .env na pasta raiz contendo as seguintes chaves (vide exemplo a seguir) / Create the .env file in the root folder containing the following keys (see the example below):
# Nome do container / Container's name
MYSQL_HOST=db
# Usuário padrão durante a criação do container do DB / Default user for DB creation on container
MYSQL_USER=admin
# Qualquer valor (apenas para o mysql não acusar warning) / Any value (only for mysql not pointing warning)
MYSQL_PASSWORD=123
# Nome do DB / DB's Name
MYSQL_DATABASE=StoreManager
# Porta da aplicação / Application port
PORT=3000
# Porta do Container do DB / DB Container's Port
DB_PORT=3308
No terminal / On terminal:
docker-compose up
Igor Marinho Argollo