ความคืบหน้างาน ไฟล์ต้นฉบับ

07 — Architecture and Integrations

Proposal §5 (Solution Architecture, integrations, quality requirements) has not been written for TNSU yet. Its current content is leftover template text from another project. Ignore it entirely, including the §5.1 paragraph and figure. The architecture principles below come only from proposal §1.1, §3.3, §4.1 and the team's use cases (12-use-cases.md).

Architecture principles

From the proposal [confirmed in proposal, §1.1, §3.3 (8), §4.1]:

  • Modular architecture with modules switched on per phase.
  • Central shared data and services. All subsystems use central data, with permissions and data scope separated by education level, campus, sports school and role.
  • Supports integration with external systems. (The proposal also mentions a legacy "E-Education" system, but no legacy system exists; confirmed 2026-10-30. This is a greenfield build.)
  • Security, permission management, and extensibility for future capabilities.

From the use cases [use cases]:

  • Platform services are separate modules that business modules call: IAM, ORG, NOTI, ENG, SVC, CASE, DOC, PRIV, AUD, ANA, RPT, ADMIN. NOTI, AUD and LMS are pure background services.
  • Domain events connect modules, e.g. StudentStatusChanged → StudentExitCase cascade, ath.CompetitionLeaveApproved consumed by ATT, SectionCancelled [use cases].
  • Rules as versioned DMN decision tables (PolicySet, FeePolicy, RefundRule, MakeupPolicy, consent policy), applied per cohort.
  • Separate health vault (hlt_vault) with its own access rules.
  • Audit: WORM storage for data fixes, signed snapshots (hash) of grade sets and regulatory submissions, and an audit record of every read of sensitive cases.
  • Data-fix scripts run through a pipeline, not a console, with extra approval for the asm, rec and fin schemas (W-137). This suggests per-module schemas [inferred].
  • Idempotent, synchronous registration transactions behind a virtual waiting room (W-49).

Likely platform-core services [inferred]

Core serviceUC modulesProposal
Identity, roles, ABAC, delegation, PAM, recertificationIAM, ADMINTNSU-11
Org units (central / 17 campuses / 13 schools), academic calendar, term rolloverORGTNSU-11
Person and learner registry, guardian relations, status lifecycleREC, SSCTNSU-01/02
Consent and data-subject rightsPRIV—
Request, approval and e-Form engine, appeals and complaintsSVC, CASETNSU-09
Documents, e-signature, credential verification, records retentionDOC, GRDTNSU-09
Notifications and announcementsNOTI, ENGcross-cutting
Billing, payments, receipts, refunds, scholarships, กยศ.FIN, SCHTNSU-05
Analytics, regulatory reportingANA, RPTTNSU-10
Audit logAUDTNSU-11

Integrations

SystemPurposeSource
Payment: Thai QR / PromptPay with bank callback or statement reconciliation; credit card per the proposalApplication fees, tuition, refundsProposal §1, use cases W-41, W-51, W-143
e-ReceiptElectronic receiptsW-41, W-43, W-51
DGAe-Signature for certain document typesProposal §1.1, §3.3
Digital signatures with LTV and a revocation listCredentials that employers can verifyW-67, W-132
กยศ. DSLStudent loans, operated through the DSL portal (portal-assist, not an API)W-48, W-119, W-133
ThaIDIdentity for applicants, guardians, alumni, step-up actionsW-41, W-127, W-142, …
myTCAS / ทปอ.Optional TCAS adapter (file/API)W-73
สป.อว. / CHECOCurriculum registration, graduate surveys, degree revocationW-08, W-65, W-132
GFMIS / accountingFiscal-year exportW-116
ตม.30 (immigration)Report foreigners staying in dormsW-38
ทะเบียนราษฎร์Name-change check (if connectable)W-131
LMSScore import, account provisioningW-01, W-44
SSO, e-mail, Wi-Fi, digital student cardProvisioned at enrolmentW-44
LINE (LIFF), e-mail, SMS, in-app pushNotifications; parent channel as LIFF/PWAW-36, W-127, W-13
Reporting HubRegulatory submissionsW-35

Integration intake (collect per system, before its module is built)

Integrations are built together with the module that needs them. Until then, keep this basic information per system in this file (add a subsection per system as it arrives):

ItemNotes
Owner and contactAgency / bank / vendor, technical contact
Module(s) and use cases that need ite.g. FIN → W-51
Interface typeREST / SOAP / file exchange / portal-assist (manual in the owner's portal)
AuthenticationAPI key, OAuth client, mTLS certificate, IP allow-list
EnvironmentsSandbox / UAT availability and how to get access
Data exchangedFields, direction, PII involved (and PDPA basis)
Volume and timingPeak volume, batch vs. real time, callback behaviour
Agreement and costMOU / contract, per-transaction fees
StatusNot started / requested / sandbox ready / tested / production

Tech stack

Decided in ADR-0001: Vue + Nuxt.js (SSR), Go + Stream Framework (Fiber, GORM, JWT + Redis sessions, queues), RustFS (S3), Redis, Harbor, ArgoCD, Rancher, Kubernetes, OpenSearch + Dashboards for centralised logs, Grafana for monitoring. Database: SQL Server (decided 2026-10-30; the customer already runs it), so queues use RabbitMQ.

Not decided [unknown]

  • SQL Server version / edition, and whether it runs on the customer's existing server or in the cluster (see ADR-0001).
  • Hosting (government cloud or the university's own servers) and data residency.
  • Multi-tenancy model: one database with unit scoping, or per-unit partitions.
  • Mobile approach: native, cross-platform, or PWA/LIFF.
  • AI provider and model, if the AI features stay in scope. No use case covers AI yet.
  • Event / messaging technology for the domain events above (the framework offers PostgreSQL or RabbitMQ queues).
  • WORM storage for audit evidence (e.g. RustFS object lock).

When you propose any of these, write it up as a decision record in docs/adr/NNN-title.md and link it from here.