Skip to main content

Architecture and responsibilities

ClinicEdge runs a web application backed by a single PocketBase instance. Its database gateway centralizes access to content, identities, courses, and learning records. No external Supabase database or Clerk tenant is required.

Service boundariesโ€‹

ServicePurposeOperational rule
nginxPublic entry, TLS/proxy policy, restricted database dashboardPublish only ports 80/443
nextjsUser interface, authorization, integrationsKeep its port private
pocketbaseSQLite records, hooks, migrations, protected uploadsOne instance per data volume
pocketbase-initSchema provisioningSuccessful exit is expected

Hooks and migrations are part of the runtime, not optional development files. Rebuilding only the web application is insufficient when they change.

What administrators should editโ€‹

  • Application panel: cases and review revisions; courses and assignments; questionnaires; learner credentials; supported settings and legal documents.
  • Deployment configuration: public origin, service credentials, mail transport, optional AI/storage integration, TLS, and proxy rules.
  • Trusted operator tools: full restore, controlled content import/export, offline identity handoff, and approved retention.

Do not make routine course changes directly in PocketBase. Doing so bypasses the publication workflow and can break historical snapshots. See course administration for the supported path.

Templates are not learner recordsโ€‹

Reusable medical content can be exported independently. Patient attempts, conversations, classroom enrollments, consent evidence, seminar history, and uploaded private files are operational records. A portable content bundle is not a system backup.