
CDSoftware: Internal Order Management System
CDSoftware is a purpose-built internal platform for managing the complete order lifecycle of a sales and distribution operation. Developed with a focus on workflow efficiency and role-based access control, it empowers teams to create, track, and manage orders from submission through fulfillment — all within a clean, responsive interface.
🚀 Introduction
CDSoftware was born from a real operational need: a centralized, structured system for managing customer orders across a multi-member sales team. Rather than relying on spreadsheets and manual tracking, this platform brings the entire order workflow into one place. From creating new orders and linking them to customers, to uploading proof images, exporting reports, and logging every action for audit purposes — CDSoftware is designed to handle the day-to-day demands of a distribution business. With a tiered role system (Employee, Admin, Super Admin), the platform ensures the right people have the right access, while new accounts go through an approval flow before gaining entry.
✨ Key Features
- 📦 Full Order Lifecycle Management: Create, view, update, and track orders with line items, product templates, and categories from a centralized dashboard.
- 👥 Customer Management: Link orders to customers, manage customer profiles, and maintain a complete history of customer interactions.
- 🔐 Multi-Role Access Control: Three-tier permission system — Employee, Admin, and Super Admin — with an account approval workflow for new registrations.
- 🖼️ Order Image Uploads: Attach proof or reference images directly to orders using Supabase Storage with secure access policies.
- 📊 Statistics & Reporting: Visual dashboards powered by Recharts give managers a real-time view of order volume, status breakdowns, and team performance.
- 📄 Excel & PDF Exports: Export orders and reports to Excel (via ExcelJS / XLSX) or PDF (via jsPDF + AutoTable) for downstream processing and record-keeping.
- 📋 Activity Logs: Every user action is logged with metadata, providing a full audit trail for accountability and troubleshooting.
- 🎉 Onboarding Walkthrough: First-time users are guided through a step-by-step walkthrough complete with a confetti celebration on completion.
- ⚙️ Auto-Proofing: Dedicated workflow for automated order proofing to catch errors before orders are finalized.
🎨 User Interface
-
Clean & Functional Design: The UI prioritizes utility over decoration — information-dense tables, clear status indicators, and intuitive form layouts keep workflows fast.
-
Radix UI Components: Built on Radix UI primitives (dialogs, dropdowns, selects, accordions, and more) for accessible, consistent interactions throughout the app.
-
Responsive Layout: Fully responsive across desktop and tablet, ensuring usability whether in an office or on the go.
-
Shadcn/UI Design System: Leverages the shadcn/ui component library for a cohesive visual language with minimal custom CSS overhead.
-
Tailwind CSS Styling: Utility-first styling via Tailwind CSS enables rapid iteration and consistent spacing, typography, and color usage.
-
Toast Notifications & Feedback: Integrated user feedback via toast notifications keeps users informed of action results without interrupting their workflow.
🛠️ Architecture
- Next.js 15 App Router: The platform is built on Next.js 15 using the App Router, with server components, server actions, and route handlers working together for optimal performance.
- Supabase Backend: Supabase serves as the primary backend — providing PostgreSQL database hosting, file storage (for order images), and user authentication via Supabase Auth SSR.
- Prisma ORM: Prisma handles all database interactions with a strongly typed schema, migrations, and a seed pipeline for development environments.
- Modular Route Structure: The dashboard is organized by domain (orders, customers, admin, statistics, logs) with dynamic
[id]routes for individual record views. - Middleware-Based Auth Guard: A Next.js middleware layer enforces authentication and approval status checks before any protected route is accessed.
- Role-Based Logic: Permission checks are applied at both the UI and server level, ensuring Employees, Admins, and Super Admins see and can do only what their role permits.
- Structured Seed Pipeline: A full seed system (SQL + TypeScript) makes it easy to populate development databases with realistic mock data for testing.
🧠 Technical Solutions
- Order & Line Item Management: Orders support multiple line items per order, each tied to a product template and category, enabling structured, queryable order data.
- Approval Workflow: New user accounts are created in a pending state and must be explicitly approved by an admin before the user can access the system.
- Image Storage with Access Policies: Supabase Storage buckets are configured with RLS policies so only authenticated users can upload, view, or delete order images.
- Excel Import Support: Orders can be imported via Excel files, reducing manual data entry for bulk order creation — critical for large distribution batches.
- PDF Generation: Server-side PDF generation with jsPDF and AutoTable allows admins to produce formatted, print-ready order summaries on demand.
- Activity Logging System: All significant user actions (order creation, status changes, user approvals) are recorded in an
activity_logstable with user attribution and metadata. - Customer Migration Script: A dedicated
migrate-customers.tsscript handles data migrations between schema versions, preserving historical customer-order relationships. - Statistics Dashboard: Recharts-powered charts give visual insight into order trends and status distributions, helping managers make data-driven decisions.
🛠️ Tech Stack
| Category | Tools |
|---|---|
| Framework | Next.js 15 (App Router) — hybrid server/client rendering with server actions and route handlers. |
| Language | TypeScript — full type safety across the entire stack, from database models to UI components. |
| Database | PostgreSQL (hosted on Supabase) — relational data model with foreign keys, indexes, and cascading deletes. |
| ORM | Prisma — schema-first ORM with migrations, seed scripts, and a generated type-safe client. |
| Authentication | Supabase Auth (SSR) — session management via cookies with middleware-level route protection. |
| File Storage | Supabase Storage — order image uploads with bucket-level RLS access policies. |
| UI Components | Radix UI + shadcn/ui — accessible, composable primitives styled with Tailwind CSS. |
| Charts | Recharts — composable React charting library for statistics dashboards. |
| Export | ExcelJS, XLSX, jsPDF, jsPDF-AutoTable — server and client-side generation of Excel and PDF reports. |
| State & Validation | Zod — schema validation for forms and API payloads. React Hook Form for form state management. |
| Runtime | Bun — used as the package manager and script runner for fast installs and seed execution. |
🔗 Links
- GitHub Repository: Private / Internal
- Live Preview: Internal Deployment
🎉 Conclusion
CDSoftware demonstrates what a focused, well-architected internal tool can look like when built with modern full-stack technologies. It solves a genuine business problem — the operational complexity of managing customer orders across a distributed sales team — and does so with a clean, role-aware interface backed by a robust, type-safe architecture. From audit logging and image proofing to Excel exports and onboarding flows, every feature was driven by a real workflow need. CDSoftware is a platform built not for show, but for daily use — and that distinction shapes every design and engineering decision within it.
Built with precision for real-world operations.
Built with ❤️ by Brandon