How sangariusss/events works
Project type and purpose
• This is a single-module Android mobile application (“Events”) for event creation, management, and sharing.
• It follows a client-only architecture that relies on Supabase (hosted) for authentication and remote data, and Room for local persistence.
• The codebase is organized around an MVVM pattern with clear separation of UI, ViewModels, repository/data layers, and external service clients.
File structure
• Top-level:
• app/ – Android Gradle module
• build scripts (build.gradle.kts, settings.gradle.kts, gradle-wrapper, etc.)
• app/src/main/java/com/komiker/events/
• ui/activities & ui/fragments – Presentation layer
• viewmodels – MVVM ViewModel layer
• data/repository – Repository interfaces and implementations
• data/database – Room database (AppDatabase, DAOs, Entities, TypeConverters)
• services/auth – Supabase and social login managers (Google, Facebook, Twitter)
• glide – Custom image transformations
• app/src/main/res – UI resources (layouts, drawables, navigation graph, animations)
• Configuration: AndroidManifest.xml, proguard rules, dotenv (.env) for Supabase keys.
Key insights from the README
• Uses Kotlin, Android SDK, Jetpack Navigation, Ktor for HTTP calls, Supabase client for auth and data, Glide for images, Lottie for animations.
• Features include multiple social/E-mail auth, event CRUD, filtering, profile management, error screens.
a. Main components
1) Presentation Layer
– Activities & Fragments
– UI Widgets, Navigation Graph
2) ViewModel Layer
– CreateEventViewModel, ProfileViewModel, etc.
3) Domain/Data Layer
– Repositories (LocationRepository, TagRepository, UserRepository)
– Data sources:
• Local: Room Database (DAOs, Entities, Converters)
• Remote: SupabaseClientProvider via Ktor HTTP client
4) External Services
– Supabase Auth & Database
– Social Identity Providers (Google, Facebook, Twitter via Google Play Services / OAuth)
– Third-party libraries: Glide, Lottie
b. Relationships and data flow
• UI → observes → ViewModel
• ViewModel → invokes → Repository
• Repository → delegates to → LocalDataSource (Room) and/or RemoteDataSource (Supabase via Ktor)
• RemoteDataSource → HTTP calls → Supabase REST API
• Auth flows: UI triggers SocialAuthManager → Supabase Auth → returns token → stored for subsequent requests
• Local cache: Repository writes to Room for offline use; DAO queries feed UI.
c. Architectural patterns & design principles
• MVVM: clear separation of concerns, testable ViewModels
• Repository pattern: abstracts data operations and caching
• Single Source of Truth: Room database backed by remote Supabase
• Dependency Injection (manual or via provider classes e.g., SupabaseClientProvider)
• Unidirectional data flow: UI ← LiveData/Flow ← ViewModel ← Repository ← DataSource
d. Key technologies & frameworks
• Kotlin + Coroutines/Flows
• Android Jetpack: Room, Lifecycle, Navigation, ViewModel
• Ktor HTTP client
• Supabase Kotlin client
• Glide for image loading
• Lottie for animations
• Google Play Services for location and social sign-in