Trường Số PRD/12 Non-functional
Trường Số · Product Requirements · 09/2026

PRD 12 · Non-functional requirements

Performance, security, personal-data compliance under Decree 13/2023/ND-CP, role-based access, audit, backup, localisation and accessibility. These requirements apply to every module and are acceptance criteria for release.

Key facts, origin and limits
Status
Draft v1
Owner module
Platform
Backend
Cross-cutting
Phase
P1 (baseline) / P2 (hardening)
Depends on
10 Settings, 11 Data and API

Drafted by an AI assistant in a single session on 10/09/2026, from the original request quoted verbatim on the hub page; the Proposed design section was added on 16/09/2026. A proposal for team discussion, not a decision of the product team.

Sources

  • Public competitor research (PSE ONE, pse4.one), the center-crm-frontend codebase and the staging /v3 OpenAPI specification (182 paths), as of 10/09/2026.

Limits

  • Verification pending in-app survey, because automated login to the reference product was not authorised in the drafting session:
    • How the competitor handles per-branch data visibility for a user with several branches (switcher vs merged view).
    • Whether their audit trail is visible to the tenant or only to their support.
    • What they present as "daily backup" to the customer (self-service restore or ticket).
    • Session timeout behaviour and whether concurrent logins are limited by licence tier.

Proposed design

This PRD has no screens of its own: it is shared platform material. The design for each feature sits in the "Proposed design" section that opens every module PRD (00 to 10 and 13 to 19).

1Purpose and scope

Trường Số handles children's personal data, guardians' phone numbers and money. This document fixes the minimum bar for how the product behaves under load, how it protects data, and how it proves who did what. It covers the web app (Next.js 16 on Cloudflare Pages / Node), the FLYER Rust API (/v3), the v2 GraphQL gateway, the upload service, and the notification integrations (Zalo OA / ZNS, email, in-app). It does not cover the FLYER learner apps (exam.flyer.us, study.flyer.us) beyond the identity boundary.

2Performance and capacity

MetricTargetMeasured how
Tenant size supportedUp to 5 branches, 3,000 active students, 300 classes, 150 staff per tenant without degraded UISeeded staging tenant "Big Center"
List pages (students, tuition, attendance)Time to interactive ≤ 2.0 s on a 2023 mid-range laptop over 4G; p95 API ≤ 400 ms for 50-row pagePlaywright trace + API p95 from gateway logs
Dashboard (PRD 09)p95 ≤ 1.5 s with 12 widgets; widgets load independently, each with its own skeletonSame
Attendance marking (PRD 04)Save a 30-student session ≤ 300 ms p95; optimistic UI, retry on failureAPI p95
Excel import (PRD 11)5,000 rows validated in ≤ 60 s; job runs asynchronously with progress; UI never blocksExisting /v3/crm/imports job pattern
Timetable generation (PRD 03)Generate 200 sessions for a class ≤ 2 s; conflict check for a branch-week ≤ 500 msAPI timing
Bulk notification (PRD 07)1,000 ZNS messages queued in ≤ 10 s; delivery is asynchronous and reported per recipientQueue metrics
ExportsCSV/XLSX up to 50,000 rows generated server-side and delivered as a download link within 60 sJob status
Availability99.5% monthly for the web app and API during 06:00–23:00 ICT; maintenance windows announced 48 h ahead in-appUptime monitor on /api/health
BundleInitial JS for the dashboard route ≤ 350 KB gzipped; route-level code splitting per modulenext build output

Design rules

3Security

Authentication

Authorisation

Application security

4Personal data protection (Decree 13/2023/ND-CP)

Trường Số processes basic personal data (name, birthday, phone, address) and sensitive data of children under 16 (health notes, if entered). The center is the data controller; FLYER is the processor. The product must make the controller's obligations easy to meet.

ObligationProduct requirementModule
Consent of the data subject or guardian (Art. 11)Enrollment form and parent portal onboarding capture a consent record (text version id, timestamp, channel, guardian identity). Consent text is tenant-editable with a FLYER default. Withdrawal is possible from the parent portal and by staff.02, 07
Children's data (Art. 20)Student record stores guardian consent before any notification is sent to the child directly; the product never messages a student under 16 directly, only the guardian.02, 07
Purpose limitationData fields are grouped by purpose in the schema documentation (PRD 11) and the consent text lists the purposes: enrollment, attendance, billing, learning reports, marketing (opt-in separately).11
Right to access and correction (Art. 9)Parent portal shows all stored data on the learner and guardian and allows correction requests, which land as a task for academic admin.07
Right to deletionStaff can anonymise a student and guardian (name to "Học viên đã xoá", phone/email nulled, documents deleted) while keeping finance records for the statutory 10 years. Action requires students.anonymise and is logged.02, 10
Processing record and impact assessment (Art. 24)FLYER maintains the processing record; the tenant admin can download a pre-filled "Hồ sơ đánh giá tác động" template from Settings.10
Breach notification (72 h)Incident runbook with tenant notification email template; audit log supports scoping which tenants were affected.Platform
Cross-border transferPrimary storage in ap-southeast-1 (Singapore) is a cross-border transfer; the tenant contract and consent text disclose it. Roadmap: Vietnam region option for enterprise tenants.Platform
Data retentionLeads (PRD 01) not converted within 24 months are anonymised automatically; attendance and learning data retained while the student is active plus 5 years; finance documents 10 years.01, 05

Marketing consent is separate from service consent. Lead capture forms that feed PRD 01 must have an explicit marketing tick box; the lead record stores marketing_consent_at.

5Role-based access control

The full matrix lives in PRD 10. The platform-level rules are:

6Audit log

The CRM already exposes GET /v3/crm/customers/{id}/audit-logs for one entity. The platform requirement generalises it.

FieldTypeNotes
iduuid
tenant_id, branch_idint64 / uuid
actor_user_id, actor_display_name, actor_role_codesnapshot at time of action
actiontextstudent.update, tuition.pay, attendance.mark, role.permissions.put ...
entity_type, entity_idtext, text
before, afterjsonbchanged fields only; money and status fields always included
ip, user_agenttext
request_idtextcorrelates with API logs
created_attimestamptzimmutable; table is append-only, no UPDATE/DELETE grants

7Backup, recovery and data portability

8Localisation (vi / en)

9Accessibility and device support

10Observability and operations

11Release acceptance checklist

  1. Performance targets in section 2 met on the seeded "Big Center" tenant, with the numbers recorded in the release note.
  2. Security: automated dependency scan clean of critical issues; manual check of tenant isolation on every new endpoint (attempt cross-tenant id returns 404).
  3. PDPD: consent capture present on every new data-entry point for guardians and students; anonymise flow tested.
  4. Audit: every mandatory action in section 6 writes a log entry; verified by test plan (see test plan seed).
  5. i18n: vi and en key sets identical; screenshots of both locales attached.
  6. Accessibility: axe run with zero serious violations on the module's main screens; keyboard walkthrough recorded.
  7. Backup: restore drill of the release week's snapshot succeeded on staging.

Trường Số (truongso.net) · FLYER internal