GithubHelp home page GithubHelp logo

garage97's Introduction

simplified-inventory-management-assistant

A web app for managing inventory

Project Setup

Needed software

  • Python 3.8.5
  • npm
  • VSCode
  • Draw.io Integration :VSCode Extension

Install node modules

npm install

Install pipenv on your system

pip install pipenv

Install packages (including dev)

cd sima_web_api
pipenv install --dev

Run this instruction to install the packages (including dev packages) associated with the project

Install all packages (no dev packages)

cd sima_web_api
pipenv install

Run this to install all the packages without the dev packages

Create a MySQL database instance

CREATE DATABASE database_name;

Add environment variables in the root of the project folder

touch .flaskenv .env

Add these lines to the .flaskenv file

FLASK_APP=run.py
FLASK_ENV=development
FLASK_RUN_PORT=9000

Add these lines to the .env file. Replace username, password and database_name with their respective values

MYSQL_USERNAME = username
MYSQL_PASSWORD = password
MYSQL_SERVER = localhost
MYSQL_DATABASE_NAME = database_name
SECRET_KEY=generated_key

SECRET_KEY can be generated using

import secrets
secrets.token_hex(32)

Perform database migrations

cd sima_web_api/
flask db init
flask db stamp head
flask db migrate
flask db upgrade

Start the api

npm run api

Start the react web app

npm run start

garage97's People

Contributors

barnes-joseph avatar yeboah326 avatar lhegend avatar samueltheophilus avatar osaeaddo avatar kofibiney avatar kjvbedzra avatar josephofori avatar prymehat avatar joo-wee avatar

Stargazers

 avatar Jonas Ababio avatar  avatar  avatar  avatar

Watchers

Jeph Yankey avatar  avatar  avatar

garage97's Issues

Create new stock

Create new stock in an existing stock list
Data format is a list of individual stocks
Same as new sale in an existing sale

StockList Data

date_created
total quantity
stock_list_id
total_price

CORS

  • Work on the CORS for react-flask

Status Codes

  • Use appropriate status codes for various API endpoints

Status Codes

  • Use appropriate status codes for various API endpoints

Create Stock section of the API

Tasks

  • Create stock model
  • Create stockList model

API Endpoints to create
Stock

  • Get stock by id
  • Get all stock
  • Create new stock
  • Update stock by id
  • Delete stock by id
  • Delete all stock

StockList

  • Get stockList by id
  • Get all stockList
  • Create new stockList
  • Update stockList by id
  • Delete stockList by id
  • Delete all stockList

Work on user based APIs

  • Create endpoints for user login
  • Create endpoint to create new users
  • Create endpoint to get user by id
  • Create endpoint to get all users
  • Create endpoint to update user info
  • Create endpoint to delete user

Fix react hooks errors

The following error is shown in the terminal
Line 42:7: React Hook useEffect has a missing dependency: 'fetchData'. Either include it or remove the dependency array react-hooks/exhaustive-deps

Report EndPoints

Create end points for retrieving the various data for the generating the report

Create endpoint to send report data

Send business data through endpoint

  • Total sales made
  • Total stock made
  • Profit/Loss Made
  • Sales and Stock made per product

Send product data through endpoint

  • Total Sales Made
  • Total Stock Made
  • Stock remaining
  • Profit/Loss made
  • All sales
  • All stock

Create Product Section of the API

Tasks

  • Create product model

API Endpoints to work on

  • Get all products
  • Get product by id
  • Create new product
  • Delete product by id
  • Update product by id

Create page to display the generated reports

  • Design report with XD (Business, Product)
  • Design the report page in react (Business, Product)
  • Retrieve data from endpoint and display it
  • Pass url to report endpoint to generate PDF

Create Sale section of the API

Tasks

  • Create sale model
  • Create saleList model

API Endpoints to create
Sale

  • Get sale by id
  • Get all sale
  • Create new sale
  • Update sale by id
  • Delete sale by id
  • Delete all sale

SaleList

  • Get all saleList
  • Get saleList by id
  • Create new saleList
  • Update saleList by id
  • Delete saleList by id
  • Delete all saleList

Work on business APIs

  • Create business model
  • Get all businesses
  • Get business by Id
  • Create new business
  • Update business info
  • Delete businesses
  • Delete business by id

Query Parameters

Create query parameters for retrieving the stocklists and salelists 10 at a time

Split files

  • Split various components into folders
  • Split index.css into small manageable files

Delete product

Fix Delete product not deleting due to referential integrity error

Storing images

Storing profile picture in database
Endpoints for retrieving picture for frontend

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.