Badawi Aminu Muhammed

Badawi Aminu Muhammed

Data Analyst • Business Intelligence Expert • Research Scientist

← Back to Projects

Operations-Management-System-Built-with-Python-Streamlit

A robust inventory and staff management system built for Medhal Nigeria Limited.
The system allows role-based access (Admin, Store, Account), tracking of stock in/out,
history, and staff records with a clean, navigable sidebar interface.

🔹 Features

🔹 Logic & Workflow

  1. Login System

    • Users assigned roles (Admin, Store, Account)
    • Session-state based authentication
    • Secure access to role-specific pages
  2. Inventory Management

    • Stock In: Add items to inventory
    • Stock Out: Deduct items from inventory
    • Stock History: Track all transactions
  3. Staff Management

    • Add, view, and edit staff details
    • Link staff actions to inventory changes
  4. Database Integration

    • Centralized PostgreSQL/MySQL database
    • Tables: users, stock_in, stock_out, staff, history
    • DB connection handled in db.py
  5. Rerun / State Handling

    • Session state manages logged-in users
    • st.stop() used to trigger safe rerun on login/logout

🔹 Requirements

🔹 Screenshots & Demo

Login Page
Login Screenshot

Dashboard / Stock Management
Dashboard Screenshot

Report Generator
Report Screenshot

Staff Records
Staff Screenshot

History Records
History Screenshot

Setup & Run Instructions

Clone the repository and set up virtual environemnt

git clone https://github.com/e-badawy/superstore_offline.git
python -m venv .venv
# Windows
.venv\Scripts\activate
# macOS/Linux
source .venv/bin/activate
pip install -r requirements.txt

Set up MySQL database

Update database connection

host='localhost'
user='root'
password='your_password'
database='oms_db'

Create initial users

INSERT INTO users (username, password, role) VALUES ('admin', '123', 'Admin');
INSERT INTO users (username, password, role) VALUES ('store', '123', 'Store');
INSERT INTO users (username, password, role) VALUES ('account', '123', 'Account');

Run the Streamlit app

streamlit run app.py

Access the app


🔹 Project Structure

superstore_offline/
│
├─ app.py                 # Main Streamlit app
├─ db.py                  # Database connection & queries
├─ requirements.txt       # Python dependencies
├─ db_setup.sql           # SQL tables creation
├─ images/                # Screenshots and GIFs
└─ other_modules/         # Optional helper scripts


Complete workflow including setup for MySQL, running in VSCode, creating users, and app workflow.