GithubHelp home page GithubHelp logo

abir-tx / scms-backend Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 3.0 214 KB

Smart supply chain management system (Web version) for Bangladesh specifically with both API and Frontent in NextJS and NestJS

Home Page: https://documenter.getpostman.com/view/21420955/2s9YXk3gYw

License: GNU General Public License v2.0

JavaScript 1.89% TypeScript 98.11%
api frontend supply-chain-management

scms-backend's Introduction

Supply Chain Management System Backend (API)

Smart supply chain management system for Bangladesh specifically. The project includes:

  • API Backend in NESTJS
  • Frontend in NEXTJS
  • Database using Postgres

I am leaving the project & so from now on the project is open for contributions. If you want to contribute, please open an issue first and then create a pull request. I will review the pull request and merge it if it is good.

Description

The project targets to create a REST API for a Smart Supply Chain Management System. The API is built using NestJS and PostgreSQL.

Notes

  • The authentication has been disabled willingly for the purpose of making it work with the frontend as the frontend is kinda incomplete. So the API is not secure at the moment. It is recommended to enable authentication before deploying it to production. Can be enabled in this file logistics/logistics.controller.ts by adding @UseGuards(SessionGuard) to the routes.

  • In order to run the API, you need to have a PostgreSQL database running. The database configuration can be found in the .env file. If the file does not exist, create one and add the told variables in the Configuring the database section below. The database has to be created manually. The tables will be created automatically by the API.

  • The project is not fully complete so there might be some bugs. If you find any, please open an issue or contribute as I am leaving this project for now.

Documentation

Click Here to view the full API Documentation

Frontend

The frontend is built using NextJS. The frontend is not included in this repository. It is a separate repository.

You can visit the frontend repository here

Installation

npm install

Running the app

# development
npm run start

# watch mode
npm run start:dev

# production mode
npm run start:prod

Configuring the database

A .env file in the root has to be created with the following variables:

PG_HOST=WRITE_HERE
PG_PORT=WRITE_HERE
PG_USER=WRITE_HERE
PG_PASSWORD=WRITE_HERE
PG_DATABASE=WRITE_HERE

Database UML Diagram

SCMS-Database-Diagram

Test

# unit tests
npm run test

# e2e tests
npm run test:e2e

# test coverage
npm run test:cov

Test Using Curl

Take any API route and use curl to test it. For example:

curl -X GET localhost:3000/logistics/shipments | jq .

I have used jq to format the output. You need to install it first.

License

Nest is MIT licensed.

scms-backend's People

Contributors

abir-tx avatar

Stargazers

 avatar

Watchers

 avatar

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.