Introduction
Homeroom started as a personal project to help students manage their academic life more effectively. What began as a simple assignment tracker evolved into a full-featured education management platform supporting Android, iOS, and Desktop. In this post, I'll share the technical decisions and architecture that make Homeroom work across all these platforms.
The Multi-App Architecture
One of the interesting aspects of Homeroom is that it's actually two apps sharing the same codebase:
- Student App: Individual student-focused app for tracking personal assignments, grades, and analytics
- Homeschool App: Parent-centric app for managing multiple students in a homeschooling context
Both apps are built on Kotlin Multiplatform, sharing business logic while maintaining distinct user experiences and features tailored to their respective audiences.
Technology Stack
The foundation of Homeroom is built on modern mobile development tools:
- Compose Multiplatform for UI across Android, iOS, and Desktop
- SQLDelight for type-safe local database operations
- Ktor Client for networking and API calls
- Firebase for authentication, analytics, and cloud storage
- Koin for dependency injection
Shared Business Logic
The core strength of our architecture is the shared module that contains all business logic, data models, and repositories. This means features like assignment tracking, grade calculations, and course management are written once and work identically across all platforms.
The repository pattern provides a clean abstraction, with Kotlin Flows hosted in repository services that make every screen truly reactive. Data changes propagate automatically through the UI layer:
AssignmentRepository- CRUD operations for assignments with student-specific filteringCourseRepository- Course and term managementAuthRepository- User authentication with UserType support (Student/Parent)ParentRepository- Parent management and student relationships (homeschool app)
Platform-Specific Implementations
While the business logic is shared, each platform has its own specific requirements. Kotlin Multiplatform's expect/actual mechanism allows us to define interfaces in common code and implement them per platform:
- Storage: SQLite on mobile, different driver configuration for Desktop
- Authentication: Platform-specific Google Sign-In flows
- File System: Different file handling for mobile vs desktop
- Push Notifications: Firebase Cloud Messaging integration
AI Integrations
One of the most powerful features of Homeroom is its AI integration using GPT-4.1 mini. We chose GPT-4.1 mini after extensive testing and comparison with many GPT models:
- Cost efficiency: Dramatically cheaper than larger models, allowing us to offer AI features at scale without breaking the bank
- Strong performance: Our testing showed GPT-4.1 mini performs remarkably well for student-focused interactions, with only marginal differences compared to larger models for our use cases
- Terms of Service: OpenAI's TOS supports users 13+, perfect for our student demographic
- KMP Support: Existing Kotlin Multiplatform libraries made integration straightforward
The AiManager provides a clean interface for AI interactions, with a comprehensive set of tools that the AI can invoke. These tools give the AI direct access to the student's data and allow it to perform actions on their behalf:
- Assignment Management:
add_assignment,update_assignment,get_assignments- Create, modify, and query assignments - Course Management:
add_course,update_course,get_courses,set_syllabus- Manage courses and grading schemes - Grade Tracking:
get_grade,get_grades,get_gpa- Query current grades and GPA - Study Planning:
add_study_event,get_study_events- Create and manage study sessions - Term Management:
add_term,get_term- Configure academic terms - Context Awareness:
get_current_time,get_student_info- Access temporal and user context - User Feedback:
display_status- Show status messages about multi-step operations
Chats are saved locally with conversation summaries, allowing students to resume conversations seamlessly. This provides continuity in the tutoring experience while keeping costs manageable.
Desktop Support
Adding Desktop support turned out to be surprisingly straightforward. After adding the JVM target to our Kotlin Multiplatform configuration, the app mostly just worked out of the box. The shared business logic, UI components, and Compose screens all ran without modification.
We did need to create a few platform-specific implementations:
- Revenue Cat: The Revenue Cat KMP library doesn't support desktop yet, so we added a direct Stripe integration for subscriptions
- Authentication: Implemented custom Google and Apple Sign-In flows since native auth isn't available on desktop
- Firebase: Used GitLiveApp's firebase-java-sdk, which automatically plugs into the firebase-kotlin-sdk supporting existing common APIs
The whole process didn't take long, and the fact that 95%+ of our code just worked on desktop is a testament to Compose Multiplatform's maturity.
The Homeschool Variant
The homeschool app extends the student app with parent-specific features:
- Multi-student management: Parents can manage multiple students with a single account
- Family dashboard: Overview of all students' progress and upcoming assignments
- Student switching: Seamless context switching between different students
- Parallel data loading:
HomeschoolAppInitializerloads data for all students in parallel for smooth transitions
Testing Strategy
Testing a multiplatform app requires a comprehensive strategy:
- Shared logic tests run on all platforms automatically
- Repository tests use Turbine to test flows and combinations
- ViewModel tests verify business logic without UI dependencies
- Platform-specific tests cover actual implementations
Lessons Learned
Building Homeroom taught me several valuable lessons:
- Start with the shared module: Define your business logic first, then build platform-specific UI
- Invest in architecture: The repository pattern and clean separation of concerns pays dividends as the codebase grows
- Platform differences matter: Even with shared code, respect platform conventions and user expectations
- Code sharing isn't all-or-nothing: It's okay to have platform-specific implementations when it makes sense
What's Next
Homeroom continues to evolve with new features in the pipeline:
- Desktop Release: Polishing and releasing the desktop application for Windows, macOS, and Linux
- Homeschool App Completion: Finishing the remaining features for the parent-focused homeschool variant
- Web Version: Using the WASM target of Kotlin Multiplatform to bring Homeroom to the web
- Live Course Screen: Real-time note-taking with active concept tracking during class
- LMS Platform Integrations: Integration with Canvas, Blackboard, and other learning management systems
Conclusion
Building Homeroom has been an incredible journey into the world of Compose Multiplatform. The ability to share business logic while maintaining platform-specific polish is powerful, and the ecosystem is maturing rapidly.
If you're considering Compose Multiplatform for your next project, I'd highly recommend it. The initial learning curve is worth it for the long-term benefits of code sharing and unified business logic.
You can check out Homeroom at thehomeroom.app, and feel free to reach out if you have questions about the technical implementation!