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 π¨: gabrielbarth.dev@gmail.com.
Made with β₯ by Gabriel Barth