GithubHelp home page GithubHelp logo

unicodelp's Introduction

Project Management System

Tasks for Unicode learning period

Project Structure

.
├── .gitignore              -> Git ignore file for node_modules and vscode configs
├── config/                 -> Configuration settings of MongoDB and JWT
├── models/                 -> Contains DB models
├── public/                 -> Contains css, js, etc for frontend
├── routes/                 -> Files exporting respective routers for each endpoint
├── tests/                  -> Mocha and Chai scripts for api testing
├── uploads/                -> Storage location for all uploaded files
├── views/                  -> Contains the templates for jade(pug)
├── app.js                  -> Connects to DB, Sets up express app with routers, middlewares etc and exports it
├── authenticate.js         -> Assigns passports strategies, sets up JWT, exports verification functions
├── index.js                -> starts the server, file to be run for starting the app
└── package.json            -> Npm package.json file

Usage

npm start

Endpoints

All root endpoints have their separate router in ./routes folder

Endpoints Description Methods
/ The default page (just for redirects) GET
/users Endpoint for the users registered on the website GET
/users/:userId Details of specified user GET PUT DELETE
/users/signup Endpoint for registeration (returns JWT) POST
/users/login Endpoint for logging in (returns JWT) POST
/users/logout At present just redirects to /. Can be used to invalidate/blacklist JWT GET
/employees List of users currently employeed. GET POST DELETE
/employees/:employeeId Details of specified employee GET PUT DELETE
/projects List of all projects in database GET POST DELETE
/projects/:projectId Details of specified project GET PUT DELETE
/customers List of all customers in database GET POST DELETE
/customers/:customerId Details of specified customer GET PUT DELETE
/projects List of all projects in database GET POST DELETE
/uploads/uploadFile Endpoint for uploading files POST
/uploads/viewFiles List of all files on the server for viewing GET
/uploads/getFile/:filename Download a specific file by its filename GET

All routes except /,/users/signup and /users/login require authentication

Testing

npm run test

Testing is done with mocha and chai and covers all the endpoints with all the methods

PS: Since most of the routes are protected and a few require admin access that can only be set from the database, you are required to create an entry for a user, employee, project and a customer and supply their ObjectId's to the respective test files

unicodelp's People

Contributors

jazibdawre avatar raj2729 avatar

Watchers

James Cloos avatar  avatar

Forkers

raj2729

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.