GithubHelp home page GithubHelp logo

laplacexd / pan Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 0.0 883 KB

Pan - An Inventory Management System made with MERN Stack

Home Page: https://pan-laplace.vercel.app

License: MIT License

JavaScript 88.75% HTML 0.13% CSS 11.12%
express mysql2 nodejs reactjs redis json-as-xlsx vite xlsx formik-yup react-query css-module javascript

pan's Introduction

Pan

Last Update Activity

Pan is an inventory management system made for Pan. This system was made with the use of MySQL, React, Express, and Node.js.

Functionalities

  • Generate reports, such as:
    • Inventory Report, which contains the beginning and ending stocks, the number of goods sold, and the gross profit of each product within a month.
    • Sales Report contains the top performing, least performing, and various statistics of the different products in the system.
    • Supplier Stock Report, which contains the 'stock in' of the different suppliers within a month.
    • Employee Details Report
    • Daily Sales Report
  • Manage company resources such as employees, products, stocks, and suppliers.
  • Track, manage, and place orders based on the available products, and stocks in the system.
  • Filter data within the system.
  • Role-based authorization on different functionalities.
  • Authentication using JWT tokens.

Setup

  1. Clone this project to your local machine.
  2. Import pan_db.sql into your local MySQL database, and run your MySQL database.
  3. Create a Redis instance locally or through Redis Labs.
  4. Create a SendGrid account.
  5. Create .env files in the client directory and server directory.

    The environment variables should contain the following:

# server/.env should contain the following variables

SENDGRID_API_KEY  = <<your sendgrid api key here>>
REDIS_HOST        = <<your redis host here>>
REDIS_USERNAME    = <<your redis user name>>
REDIS_PASSWORD    = <<your redis password>>
REDIS_PORT        = <<your redis port>>

# client/.env should contain the following variables

VITE_SERVER_URL   = http://localhost:3000/api/v1
  1. Run the following script in a terminal.
npm i
npm run dev
  1. You should be able to login through the login portal using the following credentials.

Employee

email: [email protected]
password: pan@employee123!

Manager

email: [email protected]
password: pan@manager123!
  1. ...
  2. Profit!

Contributing

Unfortunately, we are not accepting pull requests, since this is a one-time project. However, feel free to fork this project, and improve on it!

Authors and Acknowledgement

License

MIT

pan's People

Contributors

jaosherlyr avatar laplacexd avatar n-e-t-a-n avatar sciyon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pan's Issues

Order Issues

  • Must validate if stock is enough for Product Purchase
  • Must validate the array passed as a body for the request, it shouldn't allow an empty array
  • Must validate whether the passed value for the product_id of details is valid
  • Create Views for the SQL queries

Product and Stock Validation

  • Employees should only be able to edit stock, and products they created

**NOTE: ** Ignore this for now, since this takes quite some time to implement.

Employee Issue

  • date_employed should not be editable if the editor is an employee

Employee Update Validation

Employees when editing their details should not get an email already exists error if the email belongs to their account

Product Issues

  • Should return the amount available in stock when product is GET, as well as the category name of the product
  • Should also return category name of the product

Reports Module

  • Look into the implementation of reports, most of these are just GET requests in an endpoint such as /api/v1/reports/:name
  • Make use of VIEWS in SQL to generate the data for the reports beforehand, probably store the views in a separate file like pan_db_vw.sql
  • Look into this package on converting javascript objects to XSLX

Stock Issues

  • Stock should validate product_id, and supplier_id if they exist in the database

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.