Hazle is yet another AI chatbot assistant designed with Android system integration in mind. Instead of switching apps, users can highlight text anywhere in the Android system, process it through the context menu, and receive an AI-generated response via a background notification.
The project is under active development and the code can be found in hazle-android and hazle-backend repos. The code of the landing page is also available in hazle-web repo.
Project Architecture
Tech Stack
- Android Client:
- Jetpack Compose: Material 3 dynamic UI with dark/light theme
- Koin: Dependency injection for clean architecture
- Ktor: API handling from client-side
- Coroutines: Background message processing
- Room: Local caching for offline support
- Ktor Backend (Middleware):
- Auth API: JWT token handling
- Chat API: Message queue management
- OpenAI API: AI integration for message responses
- Supabase Services:
- Auth: Email/password + social logins
- Realtime DB: PostgreSQL for chat history (roadmap)
- Storage: File attachments (roadmap)
MVP Features
| Component | Functionality |
|---|---|
| Auth Flow | App → Ktor → Supabase Auth → JWT token → Session management |
| Chat Process | User message → Ktor → OpenAI → Ktor → Push notification |
| Notification | Tap opens chat thread with context-aware history |
Phase Roadmap
- MVP (Current): [Progress tracker]
- Auth + basic chat
- Notification system
- Compose UI with themes
- English, Sinhala and German languages
- V2 (Quality of life features): [Progress tracker]
- Supabase realtime chat sync
- Prompt engineering dashboard
- Message history
- File attachment support
- More localization
- V3 (Cross-platform): [Progress tracker]
- Shared KMP core module
- iOS UI with Compose Multiplatform
- Configurable AI personalities
- Usage analytics
Learning Opportunities
| Technology | Key Concepts Learned |
|---|---|
| Compose | Material 3 Expressive theming, custom animations |
| Koin | Cleaner modular code with Dependency injection |
| Ktor | REST API development, middleware |
| Supabase | Firebase alternative, Authentication, PostgreSQL management |
| Localization | Multi-language support with Compose UI, German language |