/PMS

Primary LanguageJavaScript

Parcel Management System

This is a simple implementation of a Parcel Management System built on top of React and NodeJS. The client folder represents the frontend while the server folder represents the backend.

To run the applications, NodeJS and npm need to be installed.

Quick start

1. Frontend:

cd client
Run npm install to install dependencies
Create an .env file by renaming the .env.example file
Run npm start to start the application

2. Backend API:

The backend API utilizes MongoDB for data storage. MongoDB is thus required for the functioning of the API.

cd server
Run npm install to install dependencies
Create an .env file by renaming the .env.example file
Run npm start to start the application

The following routes are available in the API. ####Authentication POST : API_URL/auth/login
After login, enable Authorization by passing the access token provided to the Authorization tab to allow subsequent requests.

####Registration POST :API_URL/auth/register

####Parcel Management GET : API_URL/parcels
GET : API_URL/parcels/{parcelId}
POST : API_URL/parcels
PUT : API_URL/parcels/{parcelId}
DELETE : API_URL/parcels/{parcelId}
####User Management GET : API_URL/users
GET : API_URL/users/{userId}
POST : API_URL/users
PUT : API_URL/users/{userId}
DELETE : API_URL/parcels/{parcelId}

Database setup

To install the database collections, navigate to the db folder in the root directory and run
sudo mongoimport --db pms --collection parcels --file parcels.json
sudo mongoimport --db pms --collection users --file users.json

Afterwards login to the application using the following credentials:
email : johndoe@example.com
password : 123456789