Skip to content

Latest commit

 

History

History
64 lines (55 loc) · 2.5 KB

README.md

File metadata and controls

64 lines (55 loc) · 2.5 KB

DMS

Coverage Status

Document Managemet System

Document management system is a simple API used to track, manage and store documents.

Development

The application was developed with NodeJs while using Express for routing. The Postgres database was used with sequelize as the ORM

Installation

Make sure that you have NodeJs and Postgres installed

  1. Clone the repository
git@github.com:puritybirir/CP2-DMS.git

  1. Navigate to the directory.
  2. Install the project dependencies using
npm install

  1. Run tests
npm test

  1. create an environment file that will be read by the project everytime it starts up by running and set the secret key and salt rounds
SECRET="coolSecret"
SALTROUNDS=10

API ENDPOINTS

Users

Request Endpoint Description
POST /users/login Logs a user in.
POST /users/logout Logs a user out.
POST /users Creates a new user.
GET /users Find matching instances of user.
GET /users/?limit={integer}&offset={integer} Pagination for users.
GET /users/:id Find user.
PUT /users/:id Update user attributes.
DELETE /users/:id Delete user.
GET /search/users/?q={username} Search for a user.
POST /documents Creates a new document instance.
GET /documents Find matching instances of document.
GET /documents/?limit={integer}&offset={integer}} Pagination for docs.
GET /documents/:id Find document.
PUT /documents/:id Update document attributes.
DELETE /documents/:id Delete document.
GET /users/:id/documents Find all documents belonging to the user.
GET /search/documents/?q={doctitle}} Search for a doc.
POST /role Creates a new role
GET /roles/:id Finds one specific role
UPDATE /roles/:id Updates a role
GET /roles Lists all the roles
DELETE /roles/:id Deletes a specific role by id.