🇺🇸
Backend aplication that allows delivery management. It was developed for GoStack10 bootcamp challanges 02 and 03.
🇧🇷
Aplicação backend para permitir gestão de encomendas, desenvolvido durante os desafios 02 e 03 do bootcamp GoStack10.
🇺🇸
This application allows:
- admins authentication (users who manage the platform);
- create, update and delete recipients, deliverymen and deliveries;
- list deliveries by deliveryman (finished, pending and canceled deliveries);
- images upload for deliveryman avatar and for delivery signature (that proves its execution);
- create and solve (delete) deliveries problems (such as losses, damages, each others).
🇧🇷
A aplicação permite:
- autenticação de administradores (responsáveis por toda gestão do app);
- cadastro, atualização e remoção de destinatários, entregadores e encomendas;
- listagem de encomendas por entregador (entregas finalizadas, pendentes e canceladas);
- upload de imagens para o usuário e para assinatura de entrega da encomenda;
- cadastro e remoção de problemas com encomendas (como perdas, danos, etc).
✔️ sucrase // allows super-fast development builds and ES6 import/export modules
✔️ sentry/node // exception handling in production mode
✔️ bcryptjs // generate hash though user password
✔️ date-fns // node library to handle data
✔️ dotenv // load environment variables in application paths
✔️ express // basically allows create backend application
✔️ express-async-errors // allows express capture errors that happens inside async functions
✔️ express-handlebars // allows build semantic templates
✔️ jsonwebtoken // allows generate jwt token for users
✔️ multer // allows file uploads in application
✔️ nodemailer // allow easy email sending
✔️ nodemailer-express-handlebars // allows build semantic templates with nodemailer
✔️ path // provides utilities for working with file and directory paths
✔️ pg // allows use postgrees database
✔️ pg-hstore // allows use postgrees database too
✔️ sequelize // ORM Node.js for SQL databases (postgress in this case)
✔️ youch // pretty error reporting for Node.js
✔️ yup // treats validations
Development dependencies:
✔️ eslint // analyzes your code to quickly find problems
✔️ nodemon // allows automatically restarting app
✔️ prettier // code formatter, makes code prettier
✔️ sequellize-cli // sequelize client - ORM for SQL databases
✔️ sucrase // allows ES6 import/export modules
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
This project considers usage of tree databases: Postgres and Redis. So it was used Docker to simplify the process
# Install a Redis image
docker run --name redisfastfeet -p 6379:6379 -d -t redis:alpine
# Install a Posgres image
docker run --name fastfeet -e POSTGRES_PASSWORD=fastfeet -p 5432:5432 -d postgres
(Note: login and password is equals to 'fastfeet')
# Run Redis
docker start redisfastfeet
# Run Postgres
docker start fastfeet
Now follow the bellow steps to run project on your machine:
1. Clone this repo using git clone https://github.com/gabrielbarth/fastfeet-backend.git
.
2. Move to the appropriate directory: cd fastfeet-backend
.
3. Run yarn
to install dependencies.
4. Now you need set the required informations on .env file (see the example).
5. After that, send the migrations to database: yarn sequelize db:migrate
and yarn sequelize db:seed:all
6. Run yarn queue
and yarn dev
to run the app on port http://localhost:3333
.
7. Now you can test using some tool like Insomnia or even installing mobile and web projects.
Please feel free to contributing and submitting pull requests.
- Rocketseat team
- Rocketseat community
Contact me on my social medias:
LinkedIn
Instagram
YouTube
Discord (gabrielbarth1#0492)
Or send me an email 📨: [email protected].
Made with ♥ by Gabriel Barth