- Added a new section for operational runbooks in README.md, detailing procedures for incident response, database operations, and queue management. - Updated the documentation structure in STRUCTURE.md to reflect the new organization of guides and resources. - Removed the deprecated disabled-modules.md file to streamline documentation. - Enhanced the _archive/README.md with historical notes on documentation alignment and corrections made in December 2025. - Updated various references in the documentation to reflect the new paths and services in the integrations directory.
10 KiB
10 KiB
Customer Portal Documentation
Comprehensive documentation for the Customer Portal project.
📁 Documentation Structure
docs/
├── getting-started/ # Setup and running the project
├── architecture/ # System design documents
├── how-it-works/ # Feature guides (how the portal works)
├── integrations/ # Salesforce, WHMCS, SIM integration docs
├── development/ # BFF, Portal, Domain, Auth code docs
├── operations/ # Logging, provisioning, monitoring
└── _archive/ # Historical documents
🚀 Getting Started
| Document | Description |
|---|---|
| Setup Guide | Initial project setup |
| Running the App | Local development |
| Deployment | Deployment instructions |
| Docker & Prisma | Docker setup with Prisma |
| Address System | Address handling |
See also: Project Structure
🏗️ Architecture
Core system design documents:
| Document | Description |
|---|---|
| System Overview | High-level architecture |
| Monorepo Structure | Monorepo organization |
| Product Catalog | Catalog design |
| Modular Provisioning | Provisioning architecture |
| Domain Layer | Domain-driven design |
| Orders Architecture | Order system design |
📖 How It Works
Feature guides explaining how the portal functions:
| Guide | Description |
|---|---|
| System Overview | Systems and data ownership |
| Accounts & Identity | Sign-up and WHMCS linking |
| Catalog & Checkout | Products and checkout rules |
| Orders & Provisioning | Order fulfillment flow |
| Billing & Payments | Invoices and payments |
| Subscriptions | Active services |
| Support Cases | Salesforce case creation |
| Order Fulfillment | Complete order flow |
| Add-on Installation | Add-on handling logic |
| Complete Guide | End-to-end explanation |
🔌 Integrations
Salesforce
| Document | Description |
|---|---|
| Requirements | Objects, fields, flows, setup |
| Overview | Getting started |
| Orders | Order communication |
| Products | Product catalog |
| Security | Security setup |
| Opportunity Lifecycle | Opportunity stages |
| WHMCS Mapping | SF-WHMCS data mapping |
WHMCS
| Document | Description |
|---|---|
| Troubleshooting | Billing issues resolution |
SIM Management
| Document | Description |
|---|---|
| Freebit Integration | Freebit SIM management |
| Data Flow | SIM API data flow |
| State Machine | SIM state transitions |
💻 Development
BFF (Backend for Frontend)
| Document | Description |
|---|---|
| Integration Patterns | Clean architecture patterns |
| DB Mappers | Database mapping |
| Order Status Updates | Status update strategy |
Portal (Frontend)
| Document | Description |
|---|---|
| Architecture | Frontend structure |
| Performance | Performance optimization |
| Data Model | Data structures |
| Integration Overview | API integration |
| Lib Structure | Code organization |
| UI Design System | Design system |
Domain Layer
| Document | Description |
|---|---|
| Structure | Domain organization |
| Packages | Package structure |
| Types | Unified type system |
Authentication
| Document | Description |
|---|---|
| Module Architecture | Auth module design |
| Development Setup | Auth setup for dev |
| Redis Tokens | Token flow implementation |
🛠️ Operations
Runbooks
| Document | Description |
|---|---|
| Incident Response | Emergency procedures |
| Provisioning Runbook | Order fulfillment procedures |
| Database Operations | Backup, recovery, maintenance |
| External Dependencies | Integration health checks |
| Queue Management | BullMQ job monitoring |
| External Processes | Team handoffs and workflows |
System Operations
| Document | Description |
|---|---|
| Logging | Centralized logging system |
| Security Monitoring | Security monitoring setup |
| Subscription Management | Service management |
🗂️ Archive
Historical documents kept for reference:
_archive/planning/— Development plans and task lists_archive/refactoring/— Completed refactoring summaries_archive/reviews/— Point-in-time code reviews
🎯 Quick Start by Role
New Developer
Backend Developer
Frontend Developer
DevOps / Operations
🏗️ Technology Stack
Frontend: Next.js 15, React 19, Tailwind CSS 4, shadcn/ui, TanStack Query, Zustand
Backend: NestJS 11, Prisma 6, PostgreSQL 17, Redis 7, Pino
Integrations: Salesforce (jsforce + Pub/Sub API), WHMCS, Freebit
Last Updated: December 2025