Skip to content

Repository files navigation

Stocsus

The global parts' shortage is creating significant challenges for Tharsus as a manufacturer. Frequently having to manually search individual websites to check for stock and pricing on components has forced productivity to reduce. Increasing delays are prolonging product manufacturing timelines at Tharsus.

We have developed a stock checker and price comparison web application that enables employees of Tharsus to quickly search a range of websites for a list of parts that are available to satisfy their quantity required, hence eliminating the current long and tedious process.

Github Repository: https://github.com/newcastleuniversity-computing/stocsus

Setting up & Installation

Please install python using the link below if you don't already have it on your system

Install Python

Check python version is 3.10 or above

python --version

Set up virtual environment

python -m venv stocsus

Use package manager to install dependencies

pip install -r requirements.txt

Tell flask where to find your application and set environment variable to development

set FlASK_APP=app.py
set FLASK_ENV=development

Running the flask application

python -m flask run

Database

This application is currently using a MySQL database hosted on AWS. If you would like to use a different database then please update the SQLALCHEMY link in app.py. Then in order to reinitialize the database, please run the following in the console.

from database.models import init_db
init_db()

Using the search page(communicates with Octopart)

Example part number = CFR50J2K2

Testing the application in the terminal

In order to test the application, enter the below command into the terminal

pytest

Usage

To utilise the user features use the register function and from there you will be directed to the login page where you will re-enter the details used to register, in order to validate, and after you will arrive at the search page. From here you can walk through the application by navigating via the tabs.

Although, to use the admin functions go to the login tab and use the credentials from models.py in order to gain appropriate access.

About

Stocsus Project Repo, created for the team at Tharsus

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages