Architecture & constraints
Initial recommendation, subject to proof-of-concept and owner sign-off.
| Frontend | React + TypeScript (TanStack Start), shared component system. | Confirmed |
| Backend / database | Lovable Cloud (PostgreSQL). Business rules enforced in the database (row-level rules, triggers) and server functions. | Confirmed |
| Authorization | Roles in a separate table; has_role() checks inside row-level rules; audit triggers on admin data. | Confirmed |
| Authentication | Organizational SSO (OIDC or SAML) via Lovable Cloud. Email/Google sign-in is development-only. | Open |
| File storage | Private storage buckets with signed, short-lived download links. Volume and cost depend on moodledata size. | Open |
| Technical log archive | Compressed, date-partitioned JSONL or Parquet in object storage with manifest and SHA-256 checksums. ~3.26M rows in mdl_logstore_standard_log (to re-confirm). | Open |
| Background processing | Import runner as server-side jobs with checkpoints; long batches must stay within worker time limits, so large tables run in resumable chunks. | Open |
| Environments | This workspace has one backend instance serving preview and published app. A separate staging backend is required before write-mode imports. | Open |
| Hosting region & residency | Not yet confirmed. Must be decided before production data is loaded. | Open |
| Backup & restore | Point-in-time recovery, restore drills and retention policy to be confirmed with the platform plan. | Open |
| Connection capacity & load | Expected concurrent users unknown; performance baseline (backlog B-702) needed before claiming scalability. | Open |
| AI features | Explicitly excluded. No AI services, models or embeddings are used. | Confirmed |
Legacy ID strategy
- New records get their own generated IDs. Moodle IDs are never reused as primary keys.
- Each core table keeps a unique legacy_moodle_id column for direct reconciliation.
- The shared crosswalk is unique on source table + source ID, so imports are idempotent and resumable.
- Users are linked to SSO by issuer + immutable subject, never by email alone.