Document Management System: The system manages documents, users and user roles. Each document defines access rights; the document defines which roles can access it.
This is a system (API) that manages documents with users and user roles. Each document defines access rights; the document defines which roles can access it. Also, each document specifies the date it was published. It is built with NodeJS, Express and Postgres as it’s database.
Source code employs ES6 syntax traspiled down to ES5 using Babel.
A created user will have a role: admin, regular.
Regular, rated/restricted Users can:
i.e. public, private or role
.role
.public
and role
access level documents of other regular users.In addition to the general user functions, an admin user can:
admin
and regular
Documents:
Documents can be created and must have:
private, public or role
Authentication:
Users are authenticated and validated using JSON web token (JWT).
By generating a token on registration and login, API endpoints and documents are protected from unauthorised access.
Requests to protected routes are validated using the generated token.
This application was developed using NodeJs with express for routing. Postgres was used for persisting data with Sequelize as ORM.
The frontend was built with the react and redux framework.
sequelize db:migrate
.sequelize db:seed
to seed initial data into your DB.$ npm start
Here’s the collection of routes. They can be checked out on Postman
It should be noted that the endpoints for roles here are only available to the Admin.
ISC
Copyright (c) 2017 Chinedu Ofor