# revo2026/stla architecture

> Architecture diagram of the GitHub repository revo2026/stla, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-05-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/revo2026/stla
- Repository: https://github.com/revo2026/stla

## Overview

1. **Overall shape**
   - This is a **JavaFX desktop application** for a learning platform, not a web app.
   - The codebase is organized as a **Clean Architecture** stack: `ui → services → patterns → data → domain`, with `core` providing shared infrastructure and `app` providing startup/bootstrap.

2. **Application entry and bootstrap**
   - `com.stla.app.Launcher` and `com.stla.app.StlaApplication` are the launch path into the JavaFX runtime.
   - `AppConfig` acts as central configuration, likely reading environment values such as app size, titles, and Supabase credentials.
   - Startup responsibilities are split from business logic, so the application shell is separate from feature workflows.

3. **UI layer: role-based desktop screens**
   - `com.stla.ui` is split into **auth**, **student**, **instructor**, and **admin** controllers.
   - Each subpackage maps to FXML screens under `src/main/resources/com/stla/views/...`, with styling in `css/`.
   - The UI is heavily screen-driven: login/register, dashboards, course catalog/details, checkout, course player, quiz screens, wallet/withdrawal screens, and admin management views.

4. **Core infrastructure and user context**
   - `core.database.DatabaseConnection` centralizes JDBC access, and the README indicates **HikariCP** is used for pooling.
   - `core.session.SessionManager` holds the active user/session state across screens.
   - `core.navigation.NavigationManager` and `StudentNavigationContext` manage view transitions and role-specific navigation flow, which matters in a desktop app where screens replace each other inside one window.

5. **Service layer: business workflows**
   - `com.stla.services` contains the main orchestration layer: authentication, course/catalog, enrollment, quiz, payment, wallet, notifications, certificates, profile, reviews, learning progress, and admin dashboards.
   - These services sit between UI controllers and repositories, so controllers do not talk directly to SQL.
   - Feature workflows that span multiple subsystems—such as checkout, enrollment, quiz submission, or certificate issuance—are concentrated here.

6. **Domain model and contracts**
   - `com.stla.domain.models` contains the business entities: `Course`, `Enrollment`, `Quiz`, `QuizAttempt`, `Payment`, `Notification`, `WalletTransaction`, `WithdrawalRequest`, `Student`, `Instructor`, `Admin`, and related composite/view models.
   - `com.stla.domain.enums` defines the platform’s state vocabulary: roles, payment status, course status, verification status, notification type, resource type, and quiz/question types.
   - `com.stla.domain.interfaces` defines repository contracts, keeping the domain independent from persistence details.

7. **Data access and persistence**
   - `com.stla.data.repositories` contains repository implementations for the major aggregates: courses, lessons, sections, students, instructors, categories, quizzes, questions, notifications, profiles, enrollments, payments, progress, resources, wallets, and withdrawals.
   - `com.stla.data.mappers.ResultSetMapper` indicates a manual JDBC-to-model mapping layer rather than an ORM.
   - The backend database is **Supabase PostgreSQL**, and the repo includes `stla.sql`, which likely defines schema, tables, enums, triggers, and indexes.

8. **External storage and media**
   - The app does not keep all content in memory or local files; it integrates with **Supabase Storage** via `SupabaseStorageService` and `SupabaseStorageAdapter`.
   - This is used for uploaded course assets such as videos, thumbnails, and downloadable lesson resources.
   - A `video/` folder and `LocalVideoHttpServer` suggest a local video-serving path for playback or development support, separate from database persistence.

9. **Payments, wallets, and withdrawals**
   - The payment subsystem is one of the main architectural flows: checkout triggers a strategy-based payment method, then enrollment creation, then wallet/commission allocation.
   - `patterns.strategy` provides interchangeable payment and withdrawal behavior (`Visa`, `Wallet`, `PayPal`, withdrawal variants).
   - `PaymentService` and `WalletService` coordinate the business rules, while repositories persist transactions, balances, and withdrawal requests.
   - The architecture separates payment method choice from the downstream accounting workflow.

10. **Event-driven notifications**
    - `patterns.observer` implements an in-process event bus using `EventBus`, `AppEvent`, and `NotificationObserver`.
    - Many workflows can publish events—enrollment, payment, quiz submission, course approval, withdrawal status, certificate issuance—and notifications are then persisted and surfaced in the UI.
    - This creates a loose coupling boundary: services raise events, observers react, and the notification UI reads the stored results.

11. **Reusable GoF patterns used across business flows**
    - `factory` creates role-specific users or strategy instances.
    - `facade` simplifies multi-step operations like enrollment and course publishing.
    - `decorator` models composable course add-ons such as certificate, quiz, and mentor support.
    - `proxy` enforces role-based or enrollment-based access control.
    - `adapter` hides external service differences for payments and report/export behavior.
    - `singleton`-style shared state is used for app-wide registries and managers.

12. **Feature domains reflected in the UI**
    - The student area covers browsing, purchasing, learning, quizzes, progress, reviews, certificates, and notifications.
    - The instructor area covers course authoring, quiz building, uploaded resources, revenue/wallet management, withdrawals, and analytics.
    - The admin area covers user management, course review, category management, instructor verification, payments, withdrawals, and platform dashboards.
    - This role separation is a major architectural boundary in both navigation and access control.

13. **Typical end-to-end data flow**
    - A user action starts in a JavaFX controller, which calls a service.
    - The service validates rules, may publish events, and calls one or more repositories.
    - Repositories execute JDBC against Supabase PostgreSQL and map results back into domain models.
    - The service returns data to the controller, which renders the FXML view and updates shared session/navigation state.

14. **Testing and build**
    - The project uses **Maven** as the build/runtime entry point, and tests are written with **JUnit 5**.
    - Tests in `src/test/java/com/stla/patterns` focus heavily on the GoF pattern implementations, which suggests those patterns are first-class architectural components rather than incidental utilities.
    - There is also enum coverage in `domain/EnumsTest`, reinforcing that domain rules are treated as stable contract points.

15. **What to emphasize in an architecture diagram**
    - Show the desktop UI as the top layer, split by roles.
    - Show services as the orchestration layer in the middle.
    - Show repositories and mapper-based JDBC persistence below that, connected to Supabase PostgreSQL and Supabase Storage.
    - Show `SessionManager`, `NavigationManager`, and `EventBus` as cross-cutting infrastructure.
    - Show payment, wallet, notification, and course-publishing flows as the main multi-component business pipelines.

Main entry points: [`src/main/java/com/stla/ui/student`](https://github.com/revo2026/stla/tree/main/src/main/java/com/stla/ui/student) (Student UI), [`src/main/java/com/stla/data/repositories`](https://github.com/revo2026/stla/tree/main/src/main/java/com/stla/data/repositories) (Repositories), [`src/main/java/com/stla/services/WalletService.java`](https://github.com/revo2026/stla/blob/main/src/main/java/com/stla/services/WalletService.java) (Wallet & Notify), [`src/main/java/com/stla/ui/instructor`](https://github.com/revo2026/stla/tree/main/src/main/java/com/stla/ui/instructor) (Instructor UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App"]
  node_launcher(("Launcher<br/>JavaFX entry<br/>[Launcher.java]"))
  node_application["Stla App<br/>JavaFX app"]
  node_config["App Config<br/>[AppConfig.java]"]
end

subgraph group_ui["UI"]
  node_auth_ui["Auth UI<br/>controllers"]
  node_student_ui["Student UI<br/>controllers"]
  node_instructor_ui["Instructor UI<br/>controllers"]
  node_admin_ui["Admin UI<br/>controllers"]
end

subgraph group_svc["Services"]
  node_auth_service["Auth Service<br/>[AuthService.java]"]
  node_course_service["Course Service<br/>[CourseService.java]"]
  node_enrollment_payment["Enroll & Pay<br/>workflow"]
  node_quiz_progress["Learning Flow<br/>[QuizService.java]"]
  node_wallet_notify["Wallet & Notify<br/>workflow<br/>[WalletService.java]"]
  node_storage["Storage Service<br/>adapter"]
end

subgraph group_core["Core"]
  node_session(("Session<br/>runtime state"))
  node_navigation(("Navigation<br/>screen flow"))
  node_db[("DB Connection<br/>jdbc pool")]
end

subgraph group_data["Data"]
  node_mapper["Result Mapper<br/>jdbc mapping"]
  node_repos["Repositories"]
end

subgraph group_domain["Domain"]
  node_domain_models["Domain Models<br/>entities"]
  node_domain_contracts["Repo Contracts<br/>interfaces"]
  node_domain_enums["Domain Enums<br/>states"]
end

subgraph group_patterns["Patterns"]
  node_eventbus(("Event Bus<br/>observer bus<br/>[EventBus.java]"))
  node_strategies{{"Strategies<br/>payment/withdraw"}}
  node_facades{{"Facades<br/>workflow facade"}}
  node_proxies{{"Access Proxies<br/>authorization"}}
end

subgraph group_external["External"]
  node_postgres[("Supabase PostgreSQL<br/>database<br/>[stla.sql]")]
  node_supabase_storage[("Supabase Storage<br/>object storage")]
  node_local_video(("Local Video Server<br/>media server"))
end

node_launcher -->|"launches"| node_application
node_application -->|"reads"| node_config
node_application -->|"opens"| node_auth_ui
node_application -->|"initializes"| node_session
node_auth_ui -->|"calls"| node_auth_service
node_auth_service -->|"queries"| node_repos
node_auth_service -->|"uses"| node_domain_models
node_student_ui -->|"calls"| node_course_service
node_student_ui -->|"calls"| node_enrollment_payment
node_student_ui -->|"calls"| node_quiz_progress
node_student_ui -->|"reads"| node_wallet_notify
node_instructor_ui -->|"calls"| node_course_service
node_instructor_ui -->|"calls"| node_quiz_progress
node_instructor_ui -->|"calls"| node_wallet_notify
node_admin_ui -->|"calls"| node_wallet_notify
node_admin_ui -->|"reviews"| node_course_service
node_course_service -->|"orchestrates"| node_facades
node_enrollment_payment -->|"selects"| node_strategies
node_enrollment_payment -->|"publishes"| node_eventbus
node_wallet_notify -->|"subscribes"| node_eventbus
node_wallet_notify -->|"selects"| node_strategies
node_quiz_progress -->|"guards"| node_proxies
node_course_service -->|"stores"| node_storage
node_storage -->|"uses"| node_supabase_storage
node_repos -->|"executes"| node_db
node_repos -->|"maps"| node_mapper
node_repos -->|"persists"| node_postgres
node_repos -->|"implements"| node_domain_contracts
node_repos -->|"returns"| node_domain_models
node_domain_contracts -->|"defines"| node_domain_models
node_domain_models -->|"uses"| node_domain_enums
node_student_ui -->|"switches"| node_navigation
node_instructor_ui -->|"switches"| node_navigation
node_admin_ui -->|"switches"| node_navigation
node_student_ui -->|"reads"| node_session
node_instructor_ui -->|"reads"| node_session
node_admin_ui -->|"reads"| node_session
node_eventbus -->|"notifies"| node_wallet_notify
node_local_video -.->|"feeds"| node_student_ui

click node_launcher "https://github.com/revo2026/stla/blob/main/src/main/java/com/stla/app/Launcher.java"
click node_application "https://github.com/revo2026/stla/blob/main/src/main/java/com/stla/app/StlaApplication.java"
click node_config "https://github.com/revo2026/stla/blob/main/src/main/java/com/stla/app/AppConfig.java"
click node_auth_ui "https://github.com/revo2026/stla/tree/main/src/main/java/com/stla/ui/auth"
click node_student_ui "https://github.com/revo2026/stla/tree/main/src/main/java/com/stla/ui/student"
click node_instructor_ui "https://github.com/revo2026/stla/tree/main/src/main/java/com/stla/ui/instructor"
click node_admin_ui "https://github.com/revo2026/stla/tree/main/src/main/java/com/stla/ui/admin"
click node_session "https://github.com/revo2026/stla/blob/main/src/main/java/com/stla/core/session/SessionManager.java"
click node_navigation "https://github.com/revo2026/stla/blob/main/src/main/java/com/stla/core/navigation/NavigationManager.java"
click node_db "https://github.com/revo2026/stla/blob/main/src/main/java/com/stla/core/database/DatabaseConnection.java"
click node_auth_service "https://github.com/revo2026/stla/blob/main/src/main/java/com/stla/services/AuthService.java"
click node_course_service "https://github.com/revo2026/stla/blob/main/src/main/java/com/stla/services/CourseService.java"
click node_enrollment_payment "https://github.com/revo2026/stla/blob/main/src/main/java/com/stla/services/EnrollmentService.java"
click node_quiz_progress "https://github.com/revo2026/stla/blob/main/src/main/java/com/stla/services/QuizService.java"
click node_wallet_notify "https://github.com/revo2026/stla/blob/main/src/main/java/com/stla/services/WalletService.java"
click node_storage "https://github.com/revo2026/stla/blob/main/src/main/java/com/stla/services/SupabaseStorageService.java"
click node_eventbus "https://github.com/revo2026/stla/blob/main/src/main/java/com/stla/patterns/observer/EventBus.java"
click node_strategies "https://github.com/revo2026/stla/blob/main/src/main/java/com/stla/patterns/strategy/PaymentStrategyFactory.java"
click node_facades "https://github.com/revo2026/stla/blob/main/src/main/java/com/stla/patterns/facade/EnrollmentFacade.java"
click node_proxies "https://github.com/revo2026/stla/blob/main/src/main/java/com/stla/patterns/proxy/AccessControlProxy.java"
click node_mapper "https://github.com/revo2026/stla/blob/main/src/main/java/com/stla/data/mappers/ResultSetMapper.java"
click node_repos "https://github.com/revo2026/stla/tree/main/src/main/java/com/stla/data/repositories"
click node_domain_models "https://github.com/revo2026/stla/tree/main/src/main/java/com/stla/domain/models"
click node_domain_contracts "https://github.com/revo2026/stla/tree/main/src/main/java/com/stla/domain/interfaces"
click node_domain_enums "https://github.com/revo2026/stla/tree/main/src/main/java/com/stla/domain/enums"
click node_postgres "https://github.com/revo2026/stla/blob/main/stla.sql"
click node_supabase_storage "https://github.com/revo2026/stla/tree/main/video"
click node_local_video "https://github.com/revo2026/stla/blob/main/src/main/java/com/stla/ui/components/LocalVideoHttpServer.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_launcher,node_application,node_config,node_eventbus,node_strategies,node_facades,node_proxies toneBlue
class node_auth_ui,node_student_ui,node_instructor_ui,node_admin_ui,node_postgres,node_supabase_storage,node_local_video toneAmber
class node_auth_service,node_course_service,node_enrollment_payment,node_quiz_progress,node_wallet_notify,node_storage toneMint
class node_session,node_navigation,node_db toneRose
class node_mapper,node_repos toneIndigo
class node_domain_models,node_domain_contracts,node_domain_enums toneTeal
```

## Components

### App

JavaFX bootstrap and startup configuration

- [Launcher](https://github.com/revo2026/stla/blob/main/src/main/java/com/stla/app/Launcher.java): JavaFX entry · Starts the desktop application runtime · `src/main/java/com/stla/app/Launcher.java`
- [Stla App](https://github.com/revo2026/stla/blob/main/src/main/java/com/stla/app/StlaApplication.java): JavaFX app · Application shell and primary stage setup · `src/main/java/com/stla/app/StlaApplication.java`
- [App Config](https://github.com/revo2026/stla/blob/main/src/main/java/com/stla/app/AppConfig.java): config · Central application configuration and environment values · `src/main/java/com/stla/app/AppConfig.java`

### UI

Role-based desktop screens and controllers

- [Auth UI](https://github.com/revo2026/stla/tree/main/src/main/java/com/stla/ui/auth): controllers · Login and registration screens · `src/main/java/com/stla/ui/auth`
- [Student UI](https://github.com/revo2026/stla/tree/main/src/main/java/com/stla/ui/student): controllers · Student flows for browsing, learning, and payment · `src/main/java/com/stla/ui/student`
- [Instructor UI](https://github.com/revo2026/stla/tree/main/src/main/java/com/stla/ui/instructor): controllers · Instructor workflows for authoring and payouts · `src/main/java/com/stla/ui/instructor`
- [Admin UI](https://github.com/revo2026/stla/tree/main/src/main/java/com/stla/ui/admin): controllers · Administrative review, moderation, and management screens · `src/main/java/com/stla/ui/admin`

### Services

Application workflows and orchestration

- [Auth Service](https://github.com/revo2026/stla/blob/main/src/main/java/com/stla/services/AuthService.java): service · Authentication and account lifecycle workflow · `src/main/java/com/stla/services/AuthService.java`
- [Course Service](https://github.com/revo2026/stla/blob/main/src/main/java/com/stla/services/CourseService.java): service · Course catalog, details, and publishing workflows · `src/main/java/com/stla/services/CourseService.java`
- [Enroll & Pay](https://github.com/revo2026/stla/blob/main/src/main/java/com/stla/services/EnrollmentService.java): workflow · Checkout, enrollment, and payment orchestration · `src/main/java/com/stla/services/EnrollmentService.java`
- [Learning Flow](https://github.com/revo2026/stla/blob/main/src/main/java/com/stla/services/QuizService.java): service · Quiz taking, progress tracking, and lesson playback support · `src/main/java/com/stla/services/QuizService.java`
- [Wallet & Notify](https://github.com/revo2026/stla/blob/main/src/main/java/com/stla/services/WalletService.java): workflow · Wallet, withdrawals, notifications, and certificate issuance · `src/main/java/com/stla/services/WalletService.java`
- [Storage Service](https://github.com/revo2026/stla/blob/main/src/main/java/com/stla/services/SupabaseStorageService.java): adapter · Supabase Storage integration for course assets and downloads · `src/main/java/com/stla/services/SupabaseStorageService.java`

### Core

Cross-cutting runtime infrastructure

- [Session](https://github.com/revo2026/stla/blob/main/src/main/java/com/stla/core/session/SessionManager.java): runtime state · Active user and role state shared across screens · `src/main/java/com/stla/core/session/SessionManager.java`
- [Navigation](https://github.com/revo2026/stla/blob/main/src/main/java/com/stla/core/navigation/NavigationManager.java): screen flow · View switching and role-aware navigation context · `src/main/java/com/stla/core/navigation/NavigationManager.java`
- [DB Connection](https://github.com/revo2026/stla/blob/main/src/main/java/com/stla/core/database/DatabaseConnection.java): jdbc pool · Central JDBC access and pooled database connection management · `src/main/java/com/stla/core/database/DatabaseConnection.java`

### Data

JDBC persistence and mapping

- [Result Mapper](https://github.com/revo2026/stla/blob/main/src/main/java/com/stla/data/mappers/ResultSetMapper.java): jdbc mapping · Manual ResultSet to domain model mapping · `src/main/java/com/stla/data/mappers/ResultSetMapper.java`
- [Repositories](https://github.com/revo2026/stla/tree/main/src/main/java/com/stla/data/repositories): jdbc repositories · Repository implementations for platform aggregates · `src/main/java/com/stla/data/repositories`

### Domain

Business models, enums, and repository contracts

- [Domain Models](https://github.com/revo2026/stla/tree/main/src/main/java/com/stla/domain/models): entities · Courses, users, payments, quizzes, wallets, and related models · `src/main/java/com/stla/domain/models`
- [Repo Contracts](https://github.com/revo2026/stla/tree/main/src/main/java/com/stla/domain/interfaces): interfaces · Repository interfaces that decouple services from persistence · `src/main/java/com/stla/domain/interfaces`
- [Domain Enums](https://github.com/revo2026/stla/tree/main/src/main/java/com/stla/domain/enums): states · Shared business vocabulary for roles, status, and types · `src/main/java/com/stla/domain/enums`

### Patterns

Reusable GoF pattern implementations

- [Event Bus](https://github.com/revo2026/stla/blob/main/src/main/java/com/stla/patterns/observer/EventBus.java): observer bus · In-process event publication and notification fan-out · `src/main/java/com/stla/patterns/observer/EventBus.java`
- [Strategies](https://github.com/revo2026/stla/blob/main/src/main/java/com/stla/patterns/strategy/PaymentStrategyFactory.java): payment/withdraw · Interchangeable payment and withdrawal behaviors · `src/main/java/com/stla/patterns/strategy/PaymentStrategyFactory.java`
- [Facades](https://github.com/revo2026/stla/blob/main/src/main/java/com/stla/patterns/facade/EnrollmentFacade.java): workflow facade · Multi-step business workflow simplification · `src/main/java/com/stla/patterns/facade/EnrollmentFacade.java`
- [Access Proxies](https://github.com/revo2026/stla/blob/main/src/main/java/com/stla/patterns/proxy/AccessControlProxy.java): authorization · Role and enrollment based access control · `src/main/java/com/stla/patterns/proxy/AccessControlProxy.java`

### External

Database and storage integrations

- [Supabase PostgreSQL](https://github.com/revo2026/stla/blob/main/stla.sql): database · Primary relational backend defined by the SQL schema · `stla.sql`
- [Supabase Storage](https://github.com/revo2026/stla/tree/main/video): object storage · Remote storage for videos, thumbnails, and resources · `video`
- [Local Video Server](https://github.com/revo2026/stla/blob/main/src/main/java/com/stla/ui/components/LocalVideoHttpServer.java): media server · Local HTTP video serving path for playback support · `src/main/java/com/stla/ui/components/LocalVideoHttpServer.java`

## Connections

- Launcher → Stla App: launches · Bootstraps the JavaFX application runtime
- Stla App → App Config: reads · Loads app size, titles, and environment settings
- Stla App → Auth UI: opens · Starts the authentication entry screens
- Stla App → Session: initializes · Creates shared user state for the desktop session
- Auth UI → Auth Service: calls · Delegates login and registration workflows
- Auth Service → Repositories: queries · Loads and persists user account data
- Auth Service → Domain Models: uses · Works with user and profile entities
- Student UI → Course Service: calls · Requests catalog, details, and learning content
- Student UI → Enroll & Pay: calls · Drives checkout and purchase flow
- Student UI → Learning Flow: calls · Submits quizzes and reads progress
- Student UI → Wallet & Notify: reads · Shows notifications, certificates, and wallet-related views
- Instructor UI → Course Service: calls · Creates and publishes courses
- Instructor UI → Learning Flow: calls · Builds quizzes and monitors learning outcomes
- Instructor UI → Wallet & Notify: calls · Handles wallet balance and withdrawal screens
- Admin UI → Wallet & Notify: calls · Reviews payments, withdrawals, and notifications
- Admin UI → Course Service: reviews · Manages course approval and moderation
- Course Service → Facades: orchestrates · Uses facades to coordinate publishing and enrollment steps
- Enroll & Pay → Strategies: selects · Chooses payment method and downstream withdrawal behavior
- Enroll & Pay → Event Bus: publishes · Emits enrollment and payment events
- Wallet & Notify → Event Bus: subscribes · Consumes events to persist notifications
- Wallet & Notify → Strategies: selects · Applies wallet and withdrawal strategies
- Learning Flow → Access Proxies: guards · Enforces access to courses and learning content
- Course Service → Storage Service: stores · Uploads thumbnails, videos, and resources
- Storage Service → Supabase Storage: uses · Persists and retrieves remote media assets
- Repositories → DB Connection: executes · Runs JDBC queries through the shared connection
- Repositories → Result Mapper: maps · Converts ResultSet rows into domain objects
- Repositories → Supabase PostgreSQL: persists · Reads and writes platform data in PostgreSQL
- Repositories → Repo Contracts: implements · Fulfills repository interfaces from the domain layer
- Repositories → Domain Models: returns · Materializes business entities and views
- Repo Contracts → Domain Models: defines · Contracts are shaped by the domain model
- Domain Models → Domain Enums: uses · Entity states rely on shared enums
- Student UI → Navigation: switches · Moves between screens within one window
- Instructor UI → Navigation: switches · Routes through instructor flows
- Admin UI → Navigation: switches · Routes through admin flows
- Student UI → Session: reads · Uses active user and role context
- Instructor UI → Session: reads · Uses active user and role context
- Admin UI → Session: reads · Uses active user and role context
- Event Bus → Wallet & Notify: notifies · Feeds observers that persist notifications
- Local Video Server → Student UI: feeds · Supports in-app video playback and previews
