๐ŸธDrink Master App

๐Ÿ‘‹ Welcome to the app!

Our app is more than just a collection of drinks - its a designed to be your own digital cocktail maker! This app will allow you to easily find and add your favorite cocktail recipes and create your own unique ones.

Tech Stack

The project builds RESTful APIs using Node.js, Express and Mongoose

nodejs mongodb

Manual Installation

Installing Node and NPM

This project depends on Nodejs and Node Package Manager (NPM). Before continuing, you must download and install Node (the download includes NPM) from https://nodejs.com/en/download.

Clone the repo:

git clone https://github.com/R3enox/backend-drink-master.git
cd backend-drink-master

Install the dependencies:

npm install

Set the environment variables:

cp .env.example .env
# open .env and modify the environment variables

Commands

Running in development:

npm start
# or
npm run dev

Environment Variables

The environment variables can be found and modified in the .env file.

# App name
APP_NAME = # default App Name

# Host
DB_HOST = mongodb://127.0.0.1:27017/database_name
FRONTEND = 
BACK = 
# Port
PORT = 3000

# JWT
ACCESS_SECRET_KEY =
REFRESH_SECRET_KEY =

# Cloudinary
CLOUDINARY_NAME = 
CLOUDINARY_API_KEY = 
CLOUDINARY_API_SECRET =

# Email delivery
MAILTRAP_USER = 
MAILTRAP_PASSWORD = 

Project Structure

 |--controllers\    # Controllers
 |--helpers\        # Help functions
 |--middlewares\    # Custom express middlewares
 |--models\         # Mongoose models
 |--routes\         # Routes
 |--app.js          # Express
 |--server.js       # Database connection

Authentication

Security: the refresh + access token scheme is used. A reliable mechanism for controlling users' "sensitive information".

The authentication system used in this project is Auth2 ./controllers/authController.js, which contains the logic to redirect the user to the Auth2 login page, manage the JWT token after a successful callback, and handle the installation and retrieval of the token from the storage. This token is then used by our (./routes/api/drinks.js) and passed as an authorization header for requests to our backend.

Link to Swagger API documentation

Swagger Docs

Link to Frontend Repo

To start using our app, go to the link and sign up for the system. Once you have successfully logged in, enjoy the app's features ๐Ÿ˜Ž

๐Ÿ˜Ž Our Fullstack Web Developer Team