Giter Site home page Giter Site logo

backend-gobarber's Introduction

GoBarber

GoBarber (backend)


Backend (node.js) project of barber shop scheduling app ๐Ÿ’ˆ, developed during GoStack10 bootcamp.

๐Ÿ’ป Web version here
๐Ÿ“ฑ Mobile version here

๐Ÿ”Ž Overview

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.

๐Ÿ”ง Some used tools

Insomnia

Allows testing API routes.

GoBarber

Postbird

Cross-platform PostgreSQL GUI client, written in JavaScript.

GoBarber

Sentry

Allows gebugging Node apps and prevent crashes across your entire stack.

GoBarber

Mailtrap

Allows inspect and debug your email samples before delivering them to your customers.

GoBarber

๐Ÿ”— Project dependencies

โ˜‘๏ธ 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

Development libs:

โ˜‘๏ธ 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

๐Ÿ’ป Running on your machine

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.

  1. Clone this repo using https://github.com/gabrielbarth/backend-goBarber.git.
  2. Move to the appropriate directory: cd backend-goBarber.
  3. Run yarn to install dependencies.
  4. Copy the .env.example file and rename it to just .env.
  5. Add all the values for the environment variables on .env file.
  6. Run yarn start and yarn queue to run the servers at http://localhost:3000.

๐Ÿ’ก ๐Ÿค Contributing

Please feel free to contributing and submitting pull requests.

๐Ÿ™ Acknowledgments

  • Rocketseat team
  • Rocketseat community

๐Ÿค” Any question?

Contact me on my social medias:
LinkedIn
Instagram
YouTube
Discord (gabrielbarth1#0492)
Or send me an email ๐Ÿ“จ: [email protected].

Made with โ™ฅ by Gabriel Barth

backend-gobarber's People

Contributors

gabrielbarth avatar

Watchers

James Cloos avatar  avatar

backend-gobarber's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.