AIEE.DEVSOQ TMS CRD
HomeExport PDFOverview

Contents

/
  • 1.1Overview
  • 1.2About AIEE.DEV
  • 1.3Parties & sign-off
  • 2.1Plan SOQ-25K
  • 2.2Max claim (EDG)
  • 2.3Rate card
  • 3.1Discovery pack
  • 3.2Brand & website appendix
  • 4.1Attachment A
  • 4.2PRD
  • 4.3Solution overview
  • 4.4Registration
  • 4.5Admin
  • 4.6CRM & sales
  • 4.7Student & trainer portals
  • 4.8SWDA & finance
  • 4.9Platform
  • 4.10Chat agents
  • 4.11Ops modules
  • 4.12Business benefits
  • 4.13DSMR research
  • 4.14Build vs buy
  • 4.15Market & competitors
  • 5.1Project control plan
  • 5.2Prototype & screens
  • 5.3Capability roadmap
  • 5.4UI/UX
  • 5.5Frontend
  • 5.6Backend
  • 5.7Architecture
  • 5.8Tech spec
  • 5.9Directory structure
  • 5.10Handover pack
AIEE.DEVSOQ TMS / Coding Requirement Documentation
5.9 / 5.9 Directory structure
Pei Han CCO / Eddy CPO / HK CSO / Andy Koh CTOaiee.dev5.9 / Confidential
5. Delivery5.9 Directory structure
Section 5.9

Proposed Directory Structure

Monorepo layout for SOQ TMS — Laravel modular monolith, React portals, SWDA/Xero integrations, and shared packages. Review this before build kickoff.

Purpose

This is the proposed codebase layout for SOQ TMS — aligned with Implementation Documentation v1 (modular monolith, Laravel + PostgreSQL + React, Redis queues).

Andy Koh (CTO) leads the build against this structure from design sign-off. Squad levels: 1.3 CRD Parties.


Repository overview

soq-tms/                              # Monorepo root
├── README.md
├── docs/                               # CRD, PRD, ADRs, runbooks (this package)
│   ├── SOQ_TMS_PRD_v1.1_clean.md
│   ├── SOQ_TMS_Implementation_Documentation_v1.md
│   └── adr/                            # Architecture decision records
│
├── apps/                               # User-facing React applications
│   ├── public-web/                     # Course catalogue, enquiry, registration entry
│   ├── student-portal/                 # Learning, attendance, payments, certificates
│   ├── admin-workspace/                # TMS, CRM, admissions, finance, reporting
│   └── trainer-portal/                 # Roster, delivery, attendance, marking, fees
│
├── packages/                           # Shared frontend / tooling
│   ├── ui/                             # Design system (tokens, shadcn-style components)
│   ├── api-client/                     # Typed REST client generated from OpenAPI
│   ├── auth/                           # Session, Singpass redirect helpers
│   ├── forms/                          # Zod schemas shared with backend DTOs
│   ├── config-eslint/
│   └── config-typescript/
│
├── services/
│   └── api/                            # Laravel modular monolith (system of record)
│       ├── app/
│       │   ├── Http/
│       │   ├── Providers/
│       │   └── Support/                # Cross-cutting helpers
│       │
│       ├── modules/                    # Domain modules (bounded contexts)
│       │   ├── Platform/               # Tenant, org, RBAC shell
│       │   ├── Identity/               # Users, Singpass, MFA, consent
│       │   ├── Catalogue/              # Programmes, courses, modules, fees
│       │   ├── Scheduling/             # Runs, intakes, venues, conflicts
│       │   ├── Admissions/             # Applications, offers, exemptions
│       │   ├── Enrolment/              # Student 360, status, class assignment
│       │   ├── Attendance/             # Sessions, QR, verification, SWDA feed
│       │   ├── Assessment/             # Marks, moderation, release
│       │   ├── Certification/          # Completion, certificates, transcripts
│       │   ├── Finance/                # Orders, subsidies, SFC, refunds
│       │   ├── Crm/                    # Leads, opportunities, Privyr import
│       │   ├── Commission/             # Agent commission, clawback
│       │   ├── Notify/                 # Email, SMS, in-app templates
│       │   └── Audit/                  # Activity log, PII access log
│       │
│       ├── integrations/               # External systems (isolated adapters)
│       │   ├── SwdaHub/                # Queue, retry, ops dashboard APIs
│       │   │   ├── Adapters/
│       │   │   ├── Jobs/
│       │   │   └── Mappers/
│       │   └── Xero/                   # Contacts, invoices, payments, bills
│       │
│       ├── database/
│       │   ├── migrations/             # Per-module migration folders
│       │   └── seeders/
│       │
│       ├── routes/
│       │   ├── api.php
│       │   └── modules/                # Module route registration
│       │
│       └── tests/
│           ├── Unit/
│           ├── Feature/
│           └── Integration/            # SWDA/Xero contract tests (sandbox)
│
├── workers/                            # Optional: dedicated queue workers profile
│   └── integration-worker/             # SWDA + Xero job consumers
│
├── infrastructure/
│   ├── docker/                         # Local dev compose (api, postgres, redis)
│   ├── terraform/                      # AWS SG region (dev, staging, prod)
│   └── ci/                             # GitHub Actions / build pipelines
│
└── tools/
    ├── openapi/                        # API spec generation
    └── scripts/                        # Migrations, Privyr import, seed data

Path ownership notes

Path focus (not a role/level matrix — see 1.3 CRD for squad):

PathNotes
apps/*React portals share packages/ui
services/api/modules/*One module = one bounded context; no cross-module table writes
integrations/SwdaHubFirst extraction candidate; CTO-owned boundary
integrations/XeroFinance sync idempotency
packages/api-clientGenerated from OpenAPI
infrastructure/Multi-AZ, SG region

Key conventions

  1. One module = one folder under modules/ with its own Models, Services, Events, Policies, Routes.
  2. Integrations never live inside UI apps — only through integrations/ + queue workers.
  3. Shared types — Zod/OpenAPI schemas are the contract between services/api and packages/api-client.
  4. Events over direct calls — cross-module side effects via domain events + queue (Redis).
  5. Feature flags — optional modules (CRM, Commission, advanced analytics) toggled per tenant config.

Environment layout

EnvironmentPurposeHost
localDeveloper docker composeLaptop / cloud agent
devShared integration testingAWS SG
stagingUAT + SWDA sandboxAWS SG
productionLive SOQAWS SG multi-AZ

Related sections

Link
5.8 Tech spec — module map and stack
5.6 Backend — domain services detail
5.5 Frontend — app packages detail
5.10 Handover pack — Day 28 deliverables & retention support
5.8 Tech spec5.10 Handover pack

aiee.dev / Confidential

AIEE.DEV