/Maintenance-Tracker

Maintenance Tracker App is an application that provides users with the ability to reach out to operations or repairs department regarding repair or maintenance requests and monitor the status of their request

Primary LanguageJavaScript

Maintenance Tracker Application

Build Status Coverage Status Maintainability Test Coverage

Application - Description

Maintenance Tracker App is an application that provides users with the ability to reach out to operations or repairs department regarding repair or maintenance requests and monitor the status of their request.

Table of Content

Features

Maintenance-Tracker consist of the following features:

Roles

  • Users can register into Maintenance-Tracker
  • Users can log into Maintenance-Tracker
  • Users can view all Their requests in Maintenance-Tracker
  • Users can create their requests in Maintenance-Tracker
  • Users can update their requests in Maintenance-Tracker
  • Admin can view all requests in Maintenance-Tracker
  • Admin can approve any request in Maintenance-Tracker
  • Admin can disapprove any request in Maintenance-Tracker
  • Admin can resolve any request in Maintenance-Tracker
  • Users can only see their request

Authentication

  • Every user is authenticated during login or signup
  • Maintenance-Tracker makes use of json web token during authentication
  • Every endpoint is secured except the signup or login endpoint
  • Maintenance-Tracker recognises admin upon login as admin data is preseeded into database
  • Users cant access the admin endpoints

Technology

Maintenance-Tracker makes use of modern technologies. The core ones are:

  • ECMAScript 6: Also known as ES2015, this is a version of Javascript with next-generation features like arrow functions, generators, enhanced object literals, spread operators and more. The ES2015 is used in many areas of this project. See this link for details.
  • NodeJS: Node.js is an open-source, cross-platform JavaScript run-time environment for executing JavaScript code on the server-side. See this link for details.
  • ExressJS: ExpressJS, is a web application framework for Node.js, It is designed for building web applications and APIs. see this link.
  • Postgresql : Postgresql is an advanced open source Object-Relational Model (ORM) database.
  • Major codes are written using the Airbnb javascript style guide, see this link for details.

Pre-installation

1. Make sure you have nodeJs installed. Go to [this link](https://nodejs.org/en) to get the latest version of node
2. Make sure you have postgres installed, an open source relational database, you can download and read more about it via [this link](https://https://www.postgresql.org/download/)

Installation

  1. Clone the repository:
https://github.com/augustineezinwa/Maintenance-Tracker
  1. Navigate into the cloned repository:
cd Maintenance-Tracker
  1. Install dependencies.
npm install
  1. Start the application
npm start
  1. Install postman to test all endpoints

Testing

  • to test run npm test

API End Points

http verbEndpointsAction
POST /auth/signup creates a new user
POST /auth/login logins an existing user into Maintnenace-Tracker
POST /users/requests creates a new Request
PUT /users/requests/:requestId Updates a request
GET /users/requests Gets all requests
GET /users/requests/:requestId Gets a request by Id
GET /requests Admin Route: Gets all requests in Maintenance
GET /requests/:requestId Admin Route: Gets a particular request by Id
PUT /requests/:requestId/approve Admin Route: Approves a request
PUT /requests/:requestId/disapprove Admin Route: Disapproves a request
PUT /requests/:requestId/resolve Admin Route: Resolves a request

Project is rapidly in progress...