ALARP Project Context
Project Name: ALARP (A Learning Aid In Radiographic Positioning)
Goal: Create an interactive mobile application using Flutter for Radiologic Technology (RadTech) students to learn and practice radiographic positioning techniques.
Target Audience: Radiologic Technology students.
Core Features:
Learn: Educational guides with step-by-step instructions and 3D previews for various body regions and projections.
Practice: Interactive 3D lab environment where users can adjust positioning parameters (CR angle, SID, patient rotation) and collimation (field size) with real-time feedback.
Challenge: Gamified, timed positioning tasks with scoring based on accuracy and speed.
Profile: User statistics, achievements, leaderboard tracking, and saved progress.
Tech Stack:
Frontend: Flutter
Backend & Auth: Supabase
State Management: Flutter Riverpod (flutter_riverpod, hooks_riverpod)
Routing: GoRouter (go_router)
3D Rendering: Likely via WebView (webview_flutter) embedding a Three.js scene, or potentially a native Flutter 3D renderer.
Architecture:
MVC-inspired (Model-View-Controller) structure organized by feature.
Riverpod is used for state management and dependency injection, connecting Controllers to Views and Models.
Data layer includes Repositories (interfaces) and Datasources (Supabase implementation).
Theme:
Colors: Light theme based on #f4f7fb (background), #5b8cbe (primary), #a7a4db (secondary), #9078c9 (accent/tertiary), #080d16 (text).
Fonts: Chillax for headers, Satoshi for body text (custom fonts from Fontshare, added to assets/fonts/).
Key Mechanics (Practice/Challenge):
Interactive 3D patient models (potentially with skin/skeleton layers).
Controls for Central Ray (CR) angle (cephalad/caudad tilt).
Controls for Source-Image Distance (SID).
Controls for patient rotation.
Interactive collimation controls (vertical/horizontal sliders) simulating the light field adjustment.
Real-time feedback and scoring based on accuracy relative to ideal parameters.
File Structure: Feature-based MVC within lib/features/, shared code in lib/core/, data access in lib/data/.
lib/
├── main.dart # App entry point
│
├── core/ # Shared code across features
│ ├── theme/ # AppTheme definitions (app_theme.dart)
│ ├── constants/ # App-wide constants
│ ├── navigation/ # Routing logic (e.g., GoRouter setup)
│ ├── network/ # Supabase client setup/wrapper
│ ├── widgets/ # Common reusable widgets
│ ├── models/ # Core data models shared across features (e.g., User)
│ ├── services/ # Shared services (e.g., AuthService interface)
│ ├── providers/ # Shared Riverpod providers (e.g., authStateProvider)
│ └── utils/ # Utility functions
│
├── features/ # Feature modules
│ ├── auth/ # Authentication feature
│ │ ├── models/ # Data structures (if specific to auth)
│ │ ├── views/ # Screens/Pages & Widgets (e.g., LoginScreen)
│ │ └── controllers/ # Logic & State (e.g., AuthController using Riverpod)
│ │
│ ├── home/ # Home dashboard feature
│ │ ├── models/
│ │ ├── views/
│ │ └── controllers/
│ │
│ ├── learn/ # Learning feature (Lessons, Body Regions)
│ │ ├── models/ # Lesson, BodyRegion models
│ │ ├── views/ # LessonListScreen, LessonDetailScreen
│ │ └── controllers/ # LearnController
│ │
│ ├── practice/ # Practice feature (3D Interaction)
│ │ ├── models/ # PositioningState model
│ │ ├── views/ # PracticeScreen, 3DViewerWidget, ControlPanelWidget
│ │ └── controllers/ # PracticeController (handles interactions, updates state)
│ │
│ ├── challenge/ # Challenge/Gamification feature
│ │ ├── models/ # Challenge, Score models
│ │ ├── views/ # ChallengeScreen, ResultsModal
│ │ └── controllers/ # ChallengeController
│ │
│ └── profile/ # User profile & progress feature
│ ├── models/ # UserProgress model
│ ├── views/ # ProfileScreen, LeaderboardWidget
│ └── controllers/ # ProfileController
│
├── data/ # Data layer implementation (can be global or per-feature)
│ ├── repositories/ # Repository interfaces (e.g., AuthRepository, LessonRepository)
│ └── datasources/ # Data source implementations (e.g., SupabaseAuthDatasource)
│ └── supabase/ # Supabase specific implementations
│
└── generated/ # Code generated by build_runner (if used)