Skip to content

calibusopierce/TWM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

73 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“ฆ TWM โ€” Tradewell Management System

TWM (Tradewell Management System) is an internal enterprise web application developed to streamline and centralize operations across multiple departments including Human Resources, Logistics, Sales, Uniform Inventory, and User Access Control.

The system is built using PHP and Microsoft SQL Server and is designed for real-world business workflows such as applicant processing, trucking coordination, fuel monitoring, inventory tracking, purchasing, and offline mobile sales synchronization.


๐Ÿš€ System Overview

Category Technology
๐Ÿ”ง Backend PHP
๐Ÿ—„๏ธ Database Microsoft SQL Server (sqlsrv)
๐ŸŒ Environment XAMPP / Apache
๐Ÿ” Authentication Session-based Auth + RBAC
๐Ÿ“ฆ Architecture Modular PHP System

๐Ÿงฉ Core Modules

๐Ÿ‘ฅ Human Resources (HR)

Human resource management and applicant processing tools.

Features

  • Job application management
  • Applicant status tracking
  • Interview scheduling
  • Applicant evaluation workflow
  • Employee management
  • Employee profile picture uploads
  • Resume and attachment handling
  • Fuel Dashboard Monitoring
  • Fuel Graph Visualization
  • Uniform Inventory
  • RBAC-enabled admin management

Job Applicant Workflow

Pending โ†’ Evaluating โ†’ For Interview โ†’ For Final Interview โ†’ Hired / Rejected

๐Ÿšš Logistics Dashboard

Fleet and delivery management system for monitoring vehicle operations and fuel usage.

Features

  • Vehicle Consumption Summary
  • Fuel monitoring dashboard
  • Fuel anomaly detection
  • Area-based fuel reporting
  • Monthly fuel checklist system
  • Delivery scheduling support
  • Vehicle consumption monitoring
  • Graph analytics and reports

Logistics Dashboard Pages

Page Description
fuel_dashboard.php Fleet fuel summary dashboard
Fuel-30Day.php 30-day monitoring dashboard
Fuel-Anomaly.php Suspicious fuel transaction detection
Fuel-Area.php Area fuel consumption summary
Fuel-Checklist.php Refuel schedule monitoring
Fuel-Comparison.php Truck fuel efficiency comparison
Fuel-Consumption.php Weekly/monthly fuel consumption tracking
Fuel-Report.php Raw fuel transaction reporting
graphs.php Charts and analytics

๐Ÿ“ฆ Uniform Inventory System

Inventory and purchasing system for company uniform management.

Features

  • Uniform stock tracking
  • Receiving transactions
  • Purchase order report
  • Release of uniforms
  • Return of uniforms
  • Stock movement history
  • Real-time stock balance monitoring
  • Printable reports

Database Tables

Table
UniformStock
UniformRequests
UniformReleased
UniformPO
UniformPOItems
UniformReceiving
UniformReceivingItems
UniformReturns

โš™๏ธ Shared System Features

๐Ÿ” RBAC (Role-Based Access Control)

The system includes centralized RBAC handling.

Features

  • Shared PDO connection architecture
  • Session-based authentication
  • Dynamic page permissions
  • Shared navigation and topbar handling
  • Centralized auth checks

๐Ÿ–ผ๏ธ Employee Profile Picture System

Features

  • Employee avatar uploads
  • Fullscreen photo preview modal
  • Automatic initials fallback
  • Dynamic image rendering
  • Admin-only photo change permissions

Upload Directory

/uploads/
/uploads/employee_pics/

๐Ÿ—„๏ธ Database Architecture

Shared Connection System

Database connections are centralized using:

test_sqlsrv.php

Improvements

  • Shared $pdo and $conn
  • Production/local environment switching
  • Reduced duplicate SQL connection logic
  • Easier deployment configuration

โš™๏ธ Getting Started

1๏ธโƒฃ Install Environment

Install:

  • XAMPP
  • Microsoft SQL Server
  • SQLSRV PHP Driver

๐Ÿ“‚ Project Placement

Place the project inside:

C:/xampp/htdocs/TWM

โ–ถ๏ธ Start Server

Open XAMPP Control Panel and start:

  • Apache

๐ŸŒ Open in Browser

http://localhost/TWM

๐Ÿ—„๏ธ Database Setup

โš ๏ธ This project uses Microsoft SQL Server (sqlsrv) โ€” NOT MySQL.

Setup Steps

  1. Open SQL Server Management Studio (SSMS)
  2. Create or restore the database
  3. Locate SQL files inside:
/TABLES/
  1. Run required .sql files
  2. Configure:
test_sqlsrv.php

for local or production environments


๐Ÿง‘โ€๐Ÿ’ป Development Workflow

cd /c/xampp/htdocs/TWM

git add .
git commit -m "Update Description"
git push

๐Ÿ“ Project Structure

TWM/
โ”‚
โ”œโ”€โ”€ assets/                 # CSS, JS, images
โ”œโ”€โ”€ uploads/                # Uploaded files
โ”œโ”€โ”€ TABLES/                 # SQL schema and migration files
โ”œโ”€โ”€ includes/               # Shared includes and components
โ”œโ”€โ”€ HR/                     # HR module
โ”œโ”€โ”€ LOGISTICS/              # Logistics dashboard
โ”œโ”€โ”€ SALES/                  # Sales module
โ”œโ”€โ”€ RBAC/                   # Role-based access control
โ”œโ”€โ”€ Android/                # Android-related resources
โ”œโ”€โ”€ test_sqlsrv.php         # Shared database connection
โ””โ”€โ”€ *.php                   # Core application pages

๐Ÿš€ Recent Improvements

Latest Refactors

Database

  • Centralized PDO architecture
  • Shared SQL connection handling
  • Production-ready connection switching

RBAC

  • Removed hardcoded PDO connections
  • Shared auth handling
  • Cleaner permission management

Employee Module

  • Fullscreen avatar preview
  • Better image fallback handling
  • Improved upload directory structure

Uniform Inventory

  • Production database migration completed
  • Inventory tables standardized
  • Stock views recreated

๐Ÿ“Œ Development Notes

Do NOT Commit

  • Local environment configs
  • Temporary files
  • Uploaded user files
  • Backup SQL dumps
  • Sensitive credentials

๐Ÿข Intended Usage

This system is designed for:

  • Internal company operations
  • Multi-user environments
  • Real-world enterprise workflows
  • Logistics and inventory management
  • HR and applicant processing

๐Ÿ”ฎ Future Improvements

Planned future enhancements include:

  • Advanced RBAC permissions
  • Dashboard analytics improvements
  • API integrations
  • Mobile app enhancements
  • UI/UX modernization
  • Real-time notifications
  • Centralized reporting dashboards
  • Multi-warehouse inventory support

๐Ÿ‘จโ€๐Ÿ’ป Author

Pierce Crisver Calibuso

Tradewell System Developer


๐Ÿ“„ License

Private / Internal Company Use Only

About

This system is built to support real-world company workflows, enabling efficient data handling, real-time monitoring, and improved operational decision-making.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors