How cesium/safira works
Key Architectural Elements
a. Authentication & Authorization
• User Authentication (UserAuth)
• Role-based Access Control (Roles, Permissions)
• Staff Management
b. Feature Modules
• Badge System
• Store/Products
• Activities/Schedule
• Wheel Game
• Inventory Management
c. Supporting Services
• Mailer Service
• File Upload Service
• Telemetry
Interaction Flows
• User request flow through Router → LiveView/Controller → Context → Repo
• Authentication flow
• File upload paths
• Real-time features (LiveView connections)
Specific Implementation Details
Create subsections for:
• Frontend Architecture (assets/js, assets/css)
• Backend Services Organization
• Database Schema Relations (based on migrations)
• External Service Integrations
Important Notes
• Phoenix LiveView architecture as it's heavily used
• Separation between backoffice and regular app features
• Role-based permission system
• Event-driven nature of the system (indicated by presence of telemetry)
Additional Elements
• Component types
• Common patterns used
• The Phoenix/LiveView architecture
• The modular business logic organization
• The security and permission system
• The various features (badges, store, activities, etc.)
• Data flow and state management
• File upload and storage mechanisms
Remember to include notes about the real-time capabilities of the system through LiveView and any specific optimization patterns used in the application.
This will provide a comprehensive view of the system while maintaining clarity and usefulness for development and maintenance purposes.