/ProjectManagmentBackEnd

Backend Repository for Project Management Application

Primary LanguageJavaScriptMIT LicenseMIT

ProjectManagmentBackEnd

MIT License

This is a backend server for a project management application. User's will be able to sign up for an account, add projects that they are currently working on with added notes about the project.

Author: Adrian Huebner LinkedIn

Deployed Backend Link: Check back later for this
Frontend Code Repository: Repo

Setup On Your Machine

Initial Setup on Machine

  1. Above the list of files on repositories main page, click on the Code button
  2. Under the clone with HTTPS click the button that looks like a click board
  3. Open your computers terminal
  4. Change the directory that you are in, to the one that you want the repository to live
  5. type git clone into your terminal and then paste the link to the repository after
  6. Press Enter on your machine and let it do all the work it needs
  7. Run cd <project name> in your terminal and run npm i to install all the dependencies the project requires

ENV requirements

Generating secret keys from helper file:

-Once the project is cloned and installed onto your local machine:

  • Run this in your terminal: nodemon ./src/helperFiles/keyGenerators.js

PORT=add port number here  
SECRET=addrandomsecret  
MONGODB_URI=link to mongo database here

How To Run

How to use HTTP Pie in the Terminal to Run Routes

Authorization Routes

    http POST :3000/signup email=<add email here> username=<add username here> password=<add password here>  
    http POST :3000/login username=<created username here> password=<password created here>

Project Routes

    // checkback later for this

Endpoints

Authorization Endpoints

POST /signup - Creates a new user

Required Parameters:

Request Body (JSON):

  • email - String (required)
  • username - String (required)
  • password - String (required)

POST /signup - Allows an user to sign into their account

Required Parameters:

Request Body (JSON):

  • username - String
  • password - String

Project Endpoints

Testing

Run the following: npm test

  • This will run all the tests in the test folder
  • To get only user tests run npm test userModel.test.js

Will get user and project routes all testing at 100%

Data Model

DataModel

Sources

Alexandre Sanlim's README on Badges
YouTube Video: How to Add Reset Password
Joi Documentation
Joi Implemenation Video