A native Android app that brings AI-powered facts, quotes, and Q&A conversations to your fingertips. Built with Kotlin and Jetpack Compose, powered by a Flask backend wrapping OpenAI's GPT-4o-mini.
- Search any topic to get AI-generated facts or quotes
- Save your favourites with a single tap
- Recent activity feed on the home screen for quick access to past searches
- Start AI-powered conversations on any topic
- WhatsApp-style chat UI with message bubbles
- Up to 5 messages per conversation
- Conversation history with local caching
- Browse saved facts and quotes in two view modes:
- Carousel — swipeable cards with scale and fade animations
- List — compact scrollable view with content preview
- Copy content to clipboard with one tap
- Tap truncated text to read the full content
- Unsave items directly from either view
- Editable display name
- Profile photo from gallery (stored locally)
- Quick access to Favourites
- Logout with confirmation dialog
- Email and password signup/login
- JWT-based session management with encrypted local storage
- Automatic session restoration on app launch
| Layer | Technology |
|---|---|
| Language | Kotlin |
| UI | Jetpack Compose |
| Architecture | MVVM (ViewModel + Repository) |
| Navigation | Jetpack Navigation Compose |
| Networking | Retrofit + OkHttp |
| Local Database | Room |
| Dependency Injection | Hilt |
| Image Loading | Coil |
| Token Storage | Encrypted DataStore |
| Backend | Flask + PostgreSQL + OpenAI GPT-4o-mini |
┌─────────────────────────────────────────────┐
│ UI Layer │
│ Screens (Composables) ← ViewModels │
│ StateFlow / Compose State │
├─────────────────────────────────────────────┤
│ Data Layer │
│ Repositories │
│ ├── Remote: Retrofit APIs │
│ └── Local: Room DB + DataStore │
├─────────────────────────────────────────────┤
│ DI Layer │
│ Hilt Modules (Network, Database) │
└─────────────────────────────────────────────┘
com.saptarshi.aipal/
├── di/ # Hilt dependency injection modules
├── data/
│ ├── remote/ # Retrofit APIs, DTOs, auth interceptor
│ ├── local/ # Room (DAOs, entities), DataStore (JWT)
│ └── repository/ # Data orchestration (remote + local)
├── domain/model/ # Clean domain models
├── ui/
│ ├── auth/ # Login & Signup screens
│ ├── home/ # Home tab, Facts & Quotes search
│ ├── chat/ # Chat list & conversation screens
│ ├── profile/ # Profile screen with photo & name editing
│ ├── favourites/ # Carousel & list views for saved items
│ ├── components/ # Reusable composables (tiles, cards, bubbles)
│ ├── navigation/ # App & main nav graphs, bottom nav
│ └── theme/ # Colors, typography, shapes
└── utils/ # Resource sealed class, extensions
The app communicates with a Flask REST API deployed on Render.
Live API: https://ai-toolkit-9ycz.onrender.com
Free tier — sleeps after 15 min of inactivity. First request after sleep takes 30-60s.
Key endpoints:
POST /auth/registerandPOST /auth/login— authenticationPOST /facts/andPOST /quotes/— AI-generated contentPOST /conversation/startandPOST /conversation/message— Q&A chatGET /favourites/,POST /favourites/,DELETE /favourites/<id>— saved items
- Android Studio Hedgehog (2023.1.1) or later
- JDK 17+
- Android SDK 34+
- Min SDK: 26 (Android 8.0)
- Clone the repository
git clone https://github.com/babatezpur/AiPal.git
- Open the project in Android Studio
- Sync Gradle dependencies
- Run on an emulator or physical device
No additional configuration needed — the app points to the live backend by default.
This project is for personal/educational use.




