Fluent is a secure, real-time Android chat application built with Jetpack Compose and Kotlin. It features end-to-end encrypted messaging, token-based authentication, and real-time communication using Ktor WebSockets β all backed by a FastAPI server.
- π End-to-End Encrypted Messaging (RSA via Android Keystore)
- π Real-Time Messaging using Ktor WebSockets
- π JWT Authentication with Refresh Token Support
- π± Jetpack Compose UI (Material 3) with smooth UX
- π¬ Message List & One-on-One Chat
- π§© Receiver-Side RSA Decryption via AndroidKeyStore
- π Message Streaming via WebSocket Flow Collector
- π― Auto Key Generation + Storage via Android Keystore
- βοΈ EncryptedSharedPreferences for Secure Token Storage
- π€ User Profiles & Sidebar Drawer
- π§ Custom Bottom Navigation with Slide Menu
- π§ MVVM + Clean Architecture
- π§ Dependency Injection via Koin
- π¦ Structured Modular Codebase
presentation/
βββ authentication/
βββ chatList/
βββ message/
βββ splashOpening/
βββ profile/
data/
βββ dto/
βββ remote/
βββ mapper/
βββ network/
domain/
βββ models/
βββ repository/
βββ utility/
di/
βββ Koin modules (network, encryption, viewmodel, repository)
- Jetpack Compose for UI
- Ktor HTTP/WebSocket for networking
- Android Keystore for RSA encryption
- StateFlow & SharedFlow for reactive state management
Each device generates an RSA keypair securely stored via the Android Keystore System.
- Messages are encrypted with the recipient's public key.
- Messages are decrypted using the userβs private key on-device.
- No plaintext is stored or transmitted at any point.
- Message decryption runs on a dedicated coroutine scope with
SupervisorJob
andMutex
for serialized, thread-safe access.
- Messages are received over WebSocket (
Ktor client
) - Decryption occurs on a background coroutine (
Dispatchers.Default
) using aMutex
- Flow collector emits to the UI using
SharedFlow
to support real-time updates
- 𧬠Kotlin + Jetpack Compose
- π Ktor HTTP/WebSocket Client
- π§© Koin (DI)
- π‘οΈ EncryptedSharedPreferences
- π Android Keystore (RSA)
- π§ StateFlow + SharedFlow
- π₯οΈ FastAPI (Python Backend)
- π JWT Authentication (Access + Refresh Tokens)
- β
RSA decryption now safely runs in a background coroutine with a
Mutex
to avoidIllegalBlockSizeException
- β Decryption bug fixed: messages now decrypt properly when received live (even without screen navigation)
- β
SupervisorJob
added to isolate failure of decrypt jobs - β
Scoped coroutine (
wsScope
) handles WebSocket lifecycle reliably - β WebSocket reconnect and lifecycle cleanup improved
- User Search API integration
- Real-Time Message Sync using Flow
- Push Notifications (FCM integration)
- Typing Indicators
- Media Sharing (images, files, voice notes)
- Offline-first with Room DB
- Read receipts, chat status
-
Clone this repo:
git clone https://github.com/jishnu70/Fluent-Secure-E2E-Chat-App-Kotlin-Compose.git
-
Open in Android Studio (Kotlin 1.9+, Compose Compiler 1.5+)
-
Run the FastAPI backend
(Backend repo: cryptalkfastapi)
-
Launch on a device or emulator (Android 8.0+ required)
This project is built solo for now.
Feel free to open issues, suggest improvements, or send PRs if you're passionate about privacy-first messaging apps.