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
0 / Implementation Documentation v1
Pei Han CCO / Eddy CPO / HK CSO / Andy Koh CTOaiee.dev0 / Confidential
Section 0
Download .md
Section 0

Implementation Documentation v1

AIEE.DEV implementation direction — multi-tenant modular SaaS, Laravel + PostgreSQL + React, base platform, core/optional modules, and delivery phasing.

IMPL-SOQ-TMS-v1 · Platform Topology Lock

FieldValue
Doc-IDIMPL-SOQ-TMS-v1
Stack freezeLaravel 11 · PostgreSQL 15 · React/Next.js 16 · Redis 7
PatternModular monolith → selective extraction
AuthorityHK (CSO) · Andy Koh (CTO)

1 · Architectural decision record summary

ADRDecisionRationale
ADR-001Modular monolith firstTime-to-SWDA-conformance; avoid distributed tracing tax
ADR-002SwdaHub isolation40+ API surface · credential blast radius · independent deploy candidate
ADR-003Outbox for external IORequest thread MUST NOT block on gov HTTP
ADR-004TMS SoR for ordersXero = GL only; prevent dual-write
ADR-005tenant_id column day-1Multi-tenant-ready without self-service admin MVP

2 · Module registry

ModuleAggregate rootsExposes
IdentityUser, Role, SessionAuth API
CatalogueProgramme, Course, CourseRunCatalogue API
AdmissionsApplication, OfferAdmissions API
EnrolmentEnrolment, ClassAssignmentEnrolment API
AttendanceSession, AttendanceFactAttendance API
AssessmentAssessment, ResultAssessment API
CrmLead, OpportunityCRM API
FinanceOrdersOrder, OrderLine, PaymentFinance API
ReportingRead modelsReport API
PlatformAuditLog, Notification, ConfigPlatform API

Integration modules (not domain):

ModuleDirectionProtocol
SwdaHubOutbound/inboundREST + webhook
XeroOutboundOAuth2 REST

3 · Inter-module communication rules

``` ALLOWED: ModuleA --DomainEvent--> Outbox --> ModuleB listener FORBIDDEN: ModuleA --direct Eloquent--> ModuleB model FORBIDDEN: ModuleA --HTTP--> SwdaHub (use Outbox only) ```

Application services orchestrate cross-aggregate workflows within same module or via events across modules.


4 · Directory topology

Canonical tree: CRD §04 /docs/proposed-directory-structure

CI enforcement: dependency-cruiser + eslint-plugin-boundaries on merge to main.


5 · Data layer

ConcernImplementation
Primary DBRDS PostgreSQL Multi-AZ
MigrationsLaravel forward-only
Read modelsstudent_360_mv, pipeline_mv refreshed by queue
FilesS3 SSE-KMS; pre-signed URLs TTL 900s
SearchPostgres FTS MVP; OpenSearch candidate P2

Outbox table (normative)

```sql CREATE TABLE outbox ( id UUID PRIMARY KEY DEFAULT gen_random_uuid(), aggregate_type VARCHAR(64) NOT NULL, aggregate_id UUID NOT NULL, event_type VARCHAR(128) NOT NULL, payload JSONB NOT NULL, idempotency_key VARCHAR(255) UNIQUE NOT NULL, published_at TIMESTAMPTZ, created_at TIMESTAMPTZ NOT NULL DEFAULT now() ); CREATE INDEX outbox_unpublished_idx ON outbox (created_at) WHERE published_at IS NULL; ```


6 · API surface

  • Base: /api/v1
  • OpenAPI 3.1 spec generated from Laravel attributes/controllers
  • Client codegen: packages/api-client via CI on spec change
  • Auth: Bearer JWT staff · Session cookie portals · Singpass OIDC public WSQ

Rate limits: public catalogue 100 rpm/IP; authenticated 1000 rpm/user; SWDA workers token-bucket per subscription quota.


7 · Frontend architecture

AppRenderingAuth
public-webRSC + ISR catalogueAnonymous + applicant session
admin-workspaceCSR + RSC hybridStaff SSO + MFA
student-portalPWA-capable CSRStudent session
trainer-portalMobile-first CSRTrainer session

Shared: packages/ui design tokens · packages/api-client · TanStack Query cache policy staleTime=30s ops views.


8 · Async / workers

QueueConsumerConcurrency
defaultnotifications, emails10
swdaSwdaHub adapters5 (rate limited)
xeroinvoice/payment sync3
reportsMV refresh2

Horizon monitoring mandatory. Failed jobs → DLQ table failed_jobs + Slack P1 after 3 retries.


9 · Security controls

ControlImplementation
SecretsAWS Secrets Manager
SWDA credsNever in FE env vars
RBACMiddleware + policy classes
Row-leveltenant_id + scope filters
AuditAppend-only audit_log
EncryptionTLS 1.3 transit · RDS at-rest AES

10 · Deployment topology (MVP)

``` Route53 → CloudFront → ALB → ECS (api, workers) → RDS + ElastiCache ↘ S3 ```

Region: ap-southeast-1. Blue/green via ECS task definition swap. DB migrations run as pre-deploy hook job.


11 · Phase binding

PhaseModules liveExit test
P0Docs + ADRDiscovery DQ-* closed
P1Catalogue, Admissions, Enrolment, Attendance (partial)k6 registration path
P2SwdaHubParallel-run checklist
P3FinanceOrders, XeroReconciliation zero diff
P4CrmFunnel E2E test
P5Assessment advanced, DiplomaUAT sign-off

12 · Change control

  • ADR required for stack or boundary change
  • PRD FR change → version bump + regression suite
  • SWDA field map change → adapter version + golden file update

13 · Related artifacts

  • PRD: SOQ_TMS_PRD_v1.1_clean.md
  • Attachment A: SOQ_Training_Management_System_Proposal.pdf
  • CRD §04 Directory · §17 Architecture · §22 Backend

Implementation authority: Andy Koh (CTO)

aiee.dev / Confidential

AIEE.DEV