Backend (node.js) project of barber shop scheduling app ๐, developed during GoStack10 bootcamp.
This application allows:
- users authentication (barbers on web version and clients on mobile version);
- create and update users;
- create, list and removing appointments;
- notification of new appointments;
- e-mail notifications about cancelled appointments.
Allows testing API routes.
Cross-platform PostgreSQL GUI client, written in JavaScript.
Allows gebugging Node apps and prevent crashes across your entire stack.
Allows inspect and debug your email samples before delivering them to your customers.
โ๏ธ sentry/node // exception handling in production mode
โ๏ธ bcryptjs ย // generate hash though user password
โ๏ธ date-fns ย // node library to handle data
โ๏ธ bee-queue ย // job/task queue for Node.js, backed by Redis
โ๏ธ cors ย // node.js package to enable CORS with various option
โ๏ธ dotenv ย // load environment variables in application paths
โ๏ธ express ย // basically allows create backend application
โ๏ธ mongoose ย // elegant mongodb object modeling for node.js
โ๏ธ 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 ย // treat validations
โ๏ธ 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
Consider the steps below to run this API on your machine:
First step: You'll need three docker containers running: redis, mongo and other to postgress.
This commands can create these docker containers:
docker run --name redisbarber -p 6379:6379 -d -t redis:alpine
;docker run --name mongobarber -p 27017:27017 -d -t mongo
;docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 -d postgres
;
Some tips about docker:
docker ps
- list all docker containers (in execution).docker ps -a
- list all docker containers (in execution or not).docker stop <container-name>
- stops container execution.docker start <container-name>
- starts container execution (required whenever you restart your machine).docker logs <container-name>
- shows container log (used in errors case).
Second step: Clone this repository on your machine and do necessary configurations.
- Clone this repo using
https://github.com/gabrielbarth/backend-goBarber.git
. - Move to the appropriate directory:
cd backend-goBarber
. - Run
yarn
to install dependencies. - Copy the
.env.example
file and rename it to just.env
. - Add all the values for the environment variables on .env file.
- Run
yarn start
andyarn queue
to run the servers athttp://localhost:3000
.
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