How serogee/hive works
Hive is an offline-first Android quiz app for authoring and importing question stacks, solo review, and multiplayer sessions hosted nearby or through a Ktor server. The main user flow runs from Compose screens through repositories to local storage or shared room services: users create/review stacks, host or join sessions, answer questions, and receive live results. Account sync and app updates are additional capabilities. The repository provides shared quiz rules and API contracts to both embedded and standalone hosts. Edges are limited to relationships visible in the README or supplied excerpts/index; unsampled subsystems are represented by their exact enclosing directories.
Main entry points: ui Compose screens · RoomService.kt Room service · RoomRepository.kt Room repository · RoomRoutes.kt Room routes
Components 26
Android app
- App startup
client/src/main/kotlin/io/github/serogee/hive/HiveApplication.kt - Compose screens
client/src/main/kotlin/io/github/serogee/hive/ui - Sign-in
client/src/main/kotlin/io/github/serogee/hive/data/auth - App updates
client/src/main/kotlin/io/github/serogee/hive/data/updates
Stacks and review
- Stack authoring
client/src/main/kotlin/io/github/serogee/hive/ui/stacks - Stack repository
client/src/main/kotlin/io/github/serogee/hive/data/stacks/StackRepository.kt - Local database
client/src/main/kotlin/io/github/serogee/hive/data/local/HiveDatabase.kt - Stack import
shared/core/src/main/kotlin/io/github/serogee/hive/core/transfer - Solo review
client/src/main/kotlin/io/github/serogee/hive/data/review/ReviewRepository.kt - Review rules
shared/core/src/main/kotlin/io/github/serogee/hive/core/review/Review.kt
Quiz sessions
- Room screens
client/src/main/kotlin/io/github/serogee/hive/ui/rooms - Room repository
client/src/main/kotlin/io/github/serogee/hive/data/rooms/RoomRepository.kt - Phone host
client/src/main/kotlin/io/github/serogee/hive/localhost/LocalHost.kt - Room routes
shared/host/src/main/kotlin/io/github/serogee/hive/host/RoomRoutes.kt - Room service
shared/host/src/main/kotlin/io/github/serogee/hive/host/RoomService.kt - Room storage
shared/host/src/main/kotlin/io/github/serogee/hive/host/RoomStore.kt - Quiz rules
shared/core/src/main/kotlin/io/github/serogee/hive/core/engine - Live events
shared/host/src/main/kotlin/io/github/serogee/hive/host/RoomEventHub.kt
Shared and server
- Standalone server
server/src/main/kotlin/io/github/serogee/hive/server/Application.kt - Account sync
client/src/main/kotlin/io/github/serogee/hive/data/sync/SyncEngine.kt - Sync service
server/src/main/kotlin/io/github/serogee/hive/server/sync/SyncService.kt - Postgres storage
server/src/main/kotlin/io/github/serogee/hive/server/postgres/PostgresDatabase.kt
Other components
- User
- Supabase
- GitHub releases
- Online server
Connections 23
- User → Compose screens: uses
- Compose screens → Stack authoring: edits
- Stack authoring → Stack repository: manages
- Stack repository → Local database: stores
client/src/main/kotlin/io/github/serogee/hive/data/local/HiveDatabase.kt - Compose screens → Stack import: imports
- Compose screens → Solo review: reviews
- Solo review → Review rules: uses
client/src/main/kotlin/io/github/serogee/hive/data/review/ReviewRepository.kt - User → Room screens: hosts or joins
- Room screens → Room repository: requests
- Room repository → Phone host: uses nearby
client/src/main/kotlin/io/github/serogee/hive/data/rooms/RoomRepository.kt - Room repository → Online server: calls online
- Phone host → Room routes: serves
- Standalone server → Room routes: registers
server/src/main/kotlin/io/github/serogee/hive/server/Application.kt - Room routes → Room service: dispatches
shared/host/src/main/kotlin/io/github/serogee/hive/host/RoomRoutes.kt - Room service → Room storage: reads and writes
shared/host/src/main/kotlin/io/github/serogee/hive/host/RoomService.kt - Room service → Quiz rules: applies
shared/host/src/main/kotlin/io/github/serogee/hive/host/RoomService.kt - Room service → Live events: publishes
shared/host/src/main/kotlin/io/github/serogee/hive/host/RoomService.kt - Standalone server → Sync service: registers
server/src/main/kotlin/io/github/serogee/hive/server/Application.kt - Sync service → Postgres storage: persists via
- Account sync → Online server: syncs with
- Sign-in → Supabase: authenticates
- App updates → GitHub releases: checks releases
- Account sync → Online server: transfers data