Checkout Live - perfect-it-mall
π» Perfect Computer House β OMS
PCH-OMS is a multi-department Order Management System designed to handle high-volume sales, technical testing, accounts clearance, and dispatch tracking.
A custom enterprise workflow solution for Perfect Computer House
π About
The Perfect Computer House Order Management System is built to coordinate the processing of hardware and custom IT orders across five distinct business teams. It replaces chaotic communication channels with a strict, automated state-machine workflow that tracks an order from placement to shipping.
Key platform features:
- Unified workspace with role-based routing (Admin, Seller, Accounting, Technical, and Dispatch).
- High-efficiency UI with local caching and instant client-side queue filtering.
- PDF and CSV exporting capabilities for accounting reports.
- Automated system audit logs recording every department action.
π The 7-Stage Workflow
Orders traverse a linear, secure path where each department acts as a checkpoint:
- SELLER (Order Creation)
The seller registers new/existing customers, configures pricing, checks items availability, and submits the order. - ACCOUNTING_REVIEW (Accounts clearance)
The accounts team reviews the customerβs outstanding balance, credit limit, and validates payment terms before clearing the order. - ADMIN_APPROVAL (Margin & Risk evaluation)
System administrators assess order profitability and check credit warnings before giving final clearance. - TECHNICAL_REVIEW (Device & QA verification)
The engineering team verifies hardware specs, runs checklist diagnostics (ports, screen, casing), registers serial numbers, and confirms system health. - DISPATCH (Shipping & Tracking)
The delivery team packages the products, labels the boxes, issues tracking IDs, and dispatches the courier. - COMPLETED
The order is successfully delivered. - REJECTED
If an issue arises (e.g. credit failure or defective hardware), the order is rejected and sent back to the seller with specific diagnostic logs.
π Project Implementation Timeline
- Phase 1: Database Architecture & Seeding
Provisioning of Appwrite database schemas, indexing of high-throughput columns (orderNumber,currentStage,sellerId), setting role-based ACL permissions, and mock-seeding references. - Phase 2: Authentication & Role Mapping
Implementation of Next.js route protection, session validators, and dynamic dashboard layouts based on role-code permissions. - Phase 3: Core Workflow Integration
Developing the state-transition engine, technical checklists, billing controllers, and courier tracking forms. - Phase 4: Optimization & Performance Engineering
Configuring local client-side queue filtering (reducing database requests by 90%), implementing automatic daily counter resets, and resolving Edge/SSR deployment compatibility.
βοΈ How It Works (System Architecture)
- Frontend: Next.js (React) featuring a responsive, dynamic Dark/Light theme, glassmorphic layout indicators, and standardized spinner animations.
- Backend & DB: Appwrite Cloud serving as the database and identity manager.
- Local Filtering Engine: When the dashboard loads, the app fetches active orders in parallel and caches them. Clicking between departments filters this cache instantly (0ms latency), while old Completed/Rejected files are lazy-loaded on-demand to save bandwidth.
π Why This Architecture is Ideal for OMS Workflows
- Strict State Enforcement: Orders cannot skip steps. A Dispatch user cannot see or process an order until it has passed the Technical review, eliminating packaging errors.
- Low Query Latency: By replacing redundant server queries with client-side filter switches, dashboard latency is reduced to
0msfor active queues. - Auditable History: An
activity_logsdatabase tracks every single state transition (who moved the order, from which stage, what changed, and when), providing a complete paper trail for accounting. - Optimized Server Counters: Daily stats are stored in dedicated counter documents that reset automatically at midnight, avoiding heavy database count aggregations on every page refresh.