This open-source Android project is a comprehensive template for building secure user authentication and real-time communication systems using Jetpack Compose and modern Android development best practices.
It features a polished UI with Shimmer effects, Pull-to-refresh, and a robust Chat system powered by Ktor WebSockets.
- π Secure Authentication: Complete Login & Registration flow with real-time form validation.
- π¬ Real-Time Chat: Messaging system with WebSocket integration, optimistic UI updates, and online/offline status.
- π₯ User Management: View a dynamic list of registered users with search-like capabilities.
- πͺ Modern UI/UX:
- Shimmer Effect: Beautiful skeleton loading states for a premium feel.
- Pull-to-Refresh: Seamless data synchronization.
- Material Design 3: Leveraging the latest Material You components and themes.
- β‘ Performance Optimized:
- MVVM Architecture: Clean separation of concerns.
- Dagger Hilt: Industry-standard dependency injection.
- Kotlin Coroutines & Flows: Smooth asynchronous programming.
- Jetpack DataStore: Efficient and safe local data persistence.
- UI: Jetpack Compose (1.7+)
- Architecture: MVVM (Model-View-ViewModel)
- Dependency Injection: Dagger Hilt
- Network: Retrofit & Ktor WebSockets
- Local Storage: Jetpack DataStore
- Concurrency: Kotlin Coroutines & SharedFlow/StateFlow
- Image Loading: Glide for Compose
- Navigation: Modern Navigation 3 Implementation
This app requires a backend API for authentication and messaging. The backend is built with Ktor and is available here:
β‘οΈ Ktor API Client Backend
Crucial Steps:
- Clone and run the backend server.
- Ensure your Android device/emulator can reach the server IP.
- Update the
BASE_URLin the app's utility classes to match your server IP.
This project is uniquely designed to support both Firebase and Local SQL (MySQL/PostgreSQL) backends. You can toggle between them with a single flag:
- Open
BasePath.ktin thenetwork.utilitypackage. - Locate the
IS_FIREBASEflag:- Set to
true: Connects to the Firebase-style endpoints on your Ktor server. - Set to
false: Connects to the SQL-style endpoints (/mySql/).
- Set to
- Update the
BASEIP address to match your server's local IP.
- Clone the Repository:
git clone https://github.com/KishanViramgama/LoginRegister.git
- Setup Backend: Follow the instructions in the Backend Repo to get the server running.
- Configure App:
- Open the project in Android Studio.
- Locate
BasePath.kt(or your network config) and update the IP address to your local machine's IP.
- Build & Run: Deploy to an Android device (API 23+) or emulator.
Jetpack Compose Login, Android Chat App, Real-time Messaging Android, Kotlin MVVM Authentication, Dagger Hilt Tutorial, Shimmer Effect Compose, Ktor WebSockets Android, DataStore Preferences, Material Design 3 Demo, Swipe to Refresh Compose, Android User List, Kotlin Coroutines Flow Chat
If you find this project useful, please consider giving it a β or buying me a coffee to support future development:
Built with β€οΈ by Kishan Viramgama