Skip to content

Latest commit

 

History

History
232 lines (172 loc) · 9.68 KB

README-en.md

File metadata and controls

232 lines (172 loc) · 9.68 KB

Portuguese Version

🚧 ⚠️ In Progress... ⚠️ 🚧

Reprographic System - Back-end

Introduction

Welcome, this project is part of our Course Conclusion Work (TCC) of the technical course of Development of systems of the SENAI Suiço-Brasileira Paulo Ernesto Tolle School.

Index

About the project

This application was requested by the coordinator of the Senai Suiço-Brasileira school, in order to control the prints made by the different sectors of the school (teachers, employees, etc.), thus being able to better manage costs and waste.

📌 Resources used in this project:

Runtime environment

Language

ORM

Data base

Framework

Documentation

Project dependencies:

  • Express 4.17.1 - It is a framework for Node.js that provides minimal resources for building web servers.
  • Nodemon 2.0.13 - To restart the server whenever there is a change.
  • Jsonwebtoken 8.5.1 - To protect private routes.
  • Bcrypt 5.0.1 - To Encrypt user passwords before saving to bank.
  • Crypto 1.0.1 - Used to create a random Token that will be transformed into a string.
  • Cors 2.8.5 - It is a mechanism used by browsers to share resources between different sources
  • Multer 1.4.2 - It is a node.js middleware to handle multipart, which is mainly used to upload files.
  • Nodemailer 6.6.3 - Used to send e-mails.
  • MariaDB 2.5.4 - It's the database we use.
  • Dotenv 10.0.0 - Used to place environment variables (sensitive data).

▶️ How to start the application:

Pre-requisites

  • Before you start, you will need to have installed on your machine the following tools: Git, Node.js.

  • Besides, it's good to have an editor to work with the code as: VSCode.

Configuring

  1. Clone or download this repository to your machine.

  2. Install the project dependencies, with the npm install or yarn install command if you have yarn installed

  3. The .env.sample file is used to configure all the environment variables you need, such as information about your database. Change all the information so that the application works properly.

# DataBase
DB_HOST=
DB_PORT=
DB_USER=
DB_PASSWORD=
DB_DATABASE=
DB_DIALECT=

# Mailer
# example: hotmail
MAILER_SERVICE= 
MAILER_USER=
MAILER_PASS=
# Email that requests / reprography evaluations will be sent
MAILER_COMPANY_EMAIL=
# Front-end Host and Port that will be sent in password recovery email
# example: http://localhost:3002
MAILER_HOST_PORT= 

# JWT 
JWT_SECRET_KEY=
HEADER_KEY=
SALT_ROUNDS=

# First Account in application
ADMIN_EMAIL=
ADMIN_PASS=
  1. Remember to rename this file to .env to be able to run the application

Starting the server

Important: Before you start the application, first create the database that you entered in DB_DATABASE in the configuration file of the environment variables.

Run the command below to start Nodejs and connect to the database:

# To start normally -> will run the "start" script of package.json.
$ npm run start

# To start in development mode (requires nodemon) -> will run the package.json "dev" script.
$ npm run dev

If you prefer Yarn:

# To start normally -> will run the "start" script of package.json.
$ yarn start

# To start in development mode (requires nodemon) -> will run the package.json "dev" script.
$ yarn dev

⚡ Wait for the API to run and the API will be running at the URL: http://localhost:3002


And so you will have your application running locally.

📄 Documentation:

⚡ Tests

😯 How to contribute to with the project

  1. Do a fork of the project.
  2. Create a new branch with your changes: git checkout -b my-feature
  3. Save the changes and create a commit message telling you what you've done: git commit -m "feature: My new feature"
  4. Submit your changes: git push origin my-feature

If you have any questions check out this guide on how to contribute to GitHub

🚀 Developers :octocat:

Imagem do perfil de Lucca
Lucca
❄️TechLead❄️
Imagem do perfil de Ṕatrick
Patrick
❄️⛄❄️
Imagem do perfil de Daniel
Daniel Santos
❄️⛄❄️
Imagem do perfil de Oséias
Oseias Farias Jesus
❄️⛄❄️
Imagem do perfil de João
João Otávio
❄️⛄❄️
Imagem do perfil de Tiago
Tiago Soares
❄️⛄❄️

📝 License

This project is under the MIT license.