Native Android companion app for the Hogwarts school management platform.
The Hogwarts platform spans three repos with a clear hierarchy:
| Repo | Role | Stack |
|---|---|---|
databayt/hogwarts |
Source of truth — web app, API, schema, multi-tenant rules | Next.js 16 · Prisma · TypeScript |
databayt/android-app (this repo) |
Lead mobile reference — feature patterns are set here first | Kotlin · Jetpack Compose |
databayt/ios-app |
Mirrors android-app | Swift 6 · SwiftUI |
Android is the canonical mobile reference: features land here first, then get ported to iOS against the same Hogwarts API contract. See hogwarts/docs/MOBILE-HIERARCHY.md for the full doctrine.
Hogwarts Android provides mobile access to the Hogwarts school automation system for:
- Students: View grades, attendance, schedule, pay fees
- Teachers: Mark attendance, submit grades, communicate with parents
- Guardians: Monitor child progress, receive notifications, pay fees
- Admins: Overview dashboards, system notifications
| Component | Technology |
|---|---|
| Language | Kotlin 2.0+ |
| UI | Jetpack Compose + Material 3 |
| Architecture | MVVM + Clean Architecture |
| DI | Hilt |
| Database | Room (offline-first) |
| Network | Retrofit + OkHttp |
| Auth | JWT + Biometric |
| i18n | Arabic (RTL), English (LTR) |
kotlin-app/
├── app/ # Main application module
├── core/ # Shared core modules
│ ├── common/ # Utilities, Result type
│ ├── data/ # Repository interfaces, sync
│ ├── database/ # Room database
│ ├── network/ # Retrofit, interceptors
│ ├── designsystem/ # Material 3 theme
│ └── security/ # Encryption, biometric
├── feature/ # Feature modules
│ ├── auth/ # Authentication
│ ├── dashboard/ # Role-specific dashboards
│ ├── students/ # Student management
│ ├── attendance/ # Attendance tracking
│ ├── grades/ # Grade management
│ ├── fees/ # Fee statements
│ ├── timetable/ # Schedule
│ ├── messaging/ # Notifications
│ └── settings/ # Profile, settings
└── docs/ # Documentation
- Android Studio Hedgehog (2023.1.1) or newer
- JDK 17
- Android SDK 35
- Clone the repository:
git clone https://github.com/your-org/kotlin-app.git
cd kotlin-app-
Open in Android Studio and sync Gradle
-
Run the app:
./gradlew installDebug# Build debug APK
./gradlew assembleDebug
# Build release APK
./gradlew assembleRelease
# Run unit tests
./gradlew testDebugUnitTest
# Run instrumented tests
./gradlew connectedDebugAndroidTest
# Code quality
./gradlew ktlintCheck
./gradlew detektThis project follows the BMAD (Business-Model-Architecture-Development) methodology.
| Command | Purpose |
|---|---|
/analyst |
Requirements analysis |
/pm |
Product management |
/architect |
Architecture decisions |
/sm |
Story breakdown |
/dev |
Implementation |
/qa |
Testing |
/status |
Workflow status |
/next |
Phase advancement |
See .claude/commands/ for detailed agent instructions.
UI Layer (Compose)
↓
Domain Layer (Use Cases)
↓
Data Layer (Repository → DataSources)
CRITICAL: Every API call and Room query MUST include schoolId for tenant isolation.
// ✅ CORRECT
@Query("SELECT * FROM students WHERE schoolId = :schoolId")
fun getStudents(schoolId: String): Flow<List<StudentEntity>>
// ❌ WRONG - No tenant isolation
@Query("SELECT * FROM students")
fun getStudents(): Flow<List<StudentEntity>>- Show cached data from Room immediately
- Fetch from network in background
- Update cache and UI
- Queue mutations when offline
- Sync via WorkManager when online
- Read
CLAUDE.mdfor workflow guidelines - Follow feature-based module structure
- Use semantic tokens (never hardcode colors)
- Write unit tests (80%+ coverage)
- Test RTL mode (Arabic)
Proprietary - All rights reserved