Architecture & constraints

Initial recommendation, subject to proof-of-concept and owner sign-off.

FrontendReact + TypeScript (TanStack Start), shared component system.Confirmed
Backend / databaseLovable Cloud (PostgreSQL). Business rules enforced in the database (row-level rules, triggers) and server functions.Confirmed
AuthorizationRoles in a separate table; has_role() checks inside row-level rules; audit triggers on admin data.Confirmed
AuthenticationOrganizational SSO (OIDC or SAML) via Lovable Cloud. Email/Google sign-in is development-only.Open
File storagePrivate storage buckets with signed, short-lived download links. Volume and cost depend on moodledata size.Open
Technical log archiveCompressed, 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 processingImport runner as server-side jobs with checkpoints; long batches must stay within worker time limits, so large tables run in resumable chunks.Open
EnvironmentsThis workspace has one backend instance serving preview and published app. A separate staging backend is required before write-mode imports.Open
Hosting region & residencyNot yet confirmed. Must be decided before production data is loaded.Open
Backup & restorePoint-in-time recovery, restore drills and retention policy to be confirmed with the platform plan.Open
Connection capacity & loadExpected concurrent users unknown; performance baseline (backlog B-702) needed before claiming scalability.Open
AI featuresExplicitly 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.