Latest release: v1.0.0 — see CHANGELOG.md and docs/release-notes/v1.0.0.md
A modern Android chat application powered by Firebase AI and Gemini Flash. This is a sample project demonstrating best practices in multi-modular Android development with Jetpack Compose, Kotlin Coroutines, and Firebase integration.
📚 Learning Project | 🔓 Open Source | 🎯 Production-Ready Architecture
- 💬 Real-time Text Chat - Powered by Gemini Flash API via Firebase AI
- 🗂️ Chat History - Persistent storage using Room database
- 📱 Responsive Design - Optimized for both mobile and tablet screens
- 🏗️ Multi-Modular Architecture - Scalable feature-based module structure
- 🚀 Modern Tech Stack - Kotlin, Compose, Coroutines, and more
- 🎨 Material Design 3 - Beautiful and intuitive UI
| Chat Screen | Chat History | Image Analysis |
|---|---|---|
![]() |
![]() |
![]() |
| Text Chat | Image Analysis |
|---|---|
![]() |
![]() |
- Language: Kotlin 2.3.21
- UI Framework: Jetpack Compose (2026.04.01)
- AI Integration: Firebase AI with Gemini Flash
- Database: Room 2.8.4
- Dependency Injection: Koin 4.2.1
- Asynchronous Programming: Kotlin Coroutines 1.10.2
- Navigation: Jetpack Navigation Compose 2.9.8
- Serialization: Kotlinx Serialization 1.11.0
- Min SDK: Android 5.0+ (API 21+)
- Target SDK: Latest (API 35+)
This project follows a multi-modular, feature-based architecture for better scalability, testability, and team collaboration.
geminiproj/
├── app/ # Main application module
├── core/ # Core libraries and utilities
│ ├── ai/ # Firebase AI & Gemini integration
│ ├── common/ # Common utilities and extensions
│ ├── data/ # Data layer (repositories, data sources)
│ ├── model/ # Domain models and entities
│ └── ui/ # Shared UI components and themes
├── features/ # Feature modules (can be developed independently)
│ ├── chat/ # Chat feature
│ ├── image/ # Image generation feature (Coming soon)
│ └── text/ # Text generation utilities
└── build-logic/ # Custom Gradle plugins & conventions
- Clean Architecture - Separation of concerns with data, domain, and presentation layers
- Feature Modularity - Each feature is a semi-independent module
- Dependency Injection - Koin for automatic dependency management
- Reactive & Async - Kotlin Coroutines for non-blocking operations
- Local First - Chat history stored locally with Room
- Android Studio (Latest version recommended)
- JDK 17 or higher
- Gradle 8.0+
- Android API 21+
- Firebase Project (free or paid plan)
git clone https://github.com/ajrajthala/AjGeminiProj.git
cd AjGeminiProjThe default package is com.aj.geminiproj. You need to rename it to your own:
- In Android Studio:
Refactor→Rename→ Choose your new package name - Update
build.gradle.kts(app module) with your new package name - Update any references in
settings.gradle.ktsif needed
Follow the official Firebase setup guide to create a new project and obtain the google-services.json file:
Steps summary:
- Go to Firebase Console
- Create a new project
- Add Android app with your package name
- Download
google-services.json - Place it in
app/google-services.json
Important: Use the same package name you set in Step 2!
./gradlew build # Build the project
./gradlew installDebug # Install on device/emulatorOr simply run from Android Studio: Shift + F10 (or Run button)
- core/ai - Firebase AI integration, Gemini Flash API wrapper
- core/data - Repository implementations, Room database setup
- core/ui - Shared Compose components, themes, and design system
- core/common - Utility functions and Kotlin extensions
- core/model - Data classes, entities, and domain models
- features/chat - Main chat UI and chat history
- features/image - Image generation (Coming soon)
- features/text - Text generation utilities
This project uses custom Gradle plugins (in build-logic/) to standardize module configurations:
geminiproj-android-application-compose- App module with Composegeminiproj-android-compose- Compose library modulesgeminiproj-android-library- Standard Android library modulesgeminiproj-kotlin-library- Pure Kotlin modulesgeminiproj-android-room- Modules using Room databasegeminiproj-kotlin-serialization- Modules using Kotlinx Serialization
We welcome contributions! This is a learning project, and PRs are encouraged to help improve the codebase.
- Create a feature branch -
git checkout -b feature/your-feature-name - Make your changes - Follow Kotlin coding conventions
- Test thoroughly - Add or update tests as needed
- Create a Pull Request - Describe your changes clearly
- Review process - Maintainers will review and merge
- Follow the Kotlin Style Guide
- Use meaningful variable and function names
- Add comments for complex logic
- Keep functions small and focused
- ✅ Text chat with Gemini Flash
- ✅ Chat history storage with Room
- ✅ Mobile and tablet support
- ✅ Modern Android architecture
- 🚧 Image Generation - Generate images using Gemini's capabilities
- 🚧 Gemini Nano - On-device inference for offline capabilities
- 🚧 Enhanced Persistence - Cloud backup of chat history
- 🚧 Advanced UI Features - Rich message formatting, reactions
Gradle sync fails:
- Invalidate caches:
File→Invalidate Caches→Invalidate and Restart - Update Gradle:
./gradlew wrapper --gradle-version=latest
Firebase setup issues:
- Ensure
google-services.jsonis in the correct location (app/folder) - Verify your package name matches the Firebase project
- Check that your API keys are enabled in Firebase Console
Chat not responding:
- Ensure you have internet connection
- Check Firebase project credentials in
google-services.json - Verify Gemini Flash API is enabled in your Firebase project
This project is open source and available under the MIT License. See the LICENSE file for details.
- 📖 Documentation: Check the inline code comments and module README files
- 🐛 Found a bug? Open an Issue
- 💭 Have a question? Start a Discussion
Happy coding! 🚀
This is a sample project built to demonstrate modern Android development practices.





