A modern Android application developed using Kotlin and Jetpack Compose, designed to manage table billing for restaurants. This app simulates a real-world waiter/table experience and is built using MVVM architecture. It features Room for local data storage, Dagger 2 for dependency injection, and Retrofit for network communication. Key highlights include paginated table listings, offline caching, and the ability to view and mark bills as paid.
- Paginated Table List: Seamlessly browse through a list of restaurant tables with pagination support.
- Table Bill Details: View each cart's detailed billing, including products, quantity, and total cost.
- Offline Caching: Previously fetched data is cached locally using Room for offline accessibility.
- Modern Android Practices: Built with Jetpack Compose, Kotlin Coroutines, and a modular MVVM structure.
- Clean Architecture: Follows domain-driven modular design with separation of concerns.
| Table List Screen | Bill Details Screen (Non Paid) | Bill Details Screen (Paid) |
|---|---|---|
![]() |
![]() |
![]() |
To run this application locally:
- Clone the Repository:
git clone https://github.com/chamodlakmal/TablePay.git - Navigate to the Project Directory:
- Open with Android Studio:
- Launch Android Studio.
- Select 'Open an existing project' and choose the cloned directory.
- Build the Project:
- Allow Android Studio to synchronize and build the project. Ensure all dependencies are resolved.
- Run the App:
- Connect an Android device or start an emulator.
- Click on the 'Run' button.
- Kotlin: Primary language for Android development.
- Jetpack Compose: Declarative UI framework.
- Room: Local data storage with offline support.
- Retrofit: Networking library for API calls.
- Dagger 2: Dependency injection.
- Coroutines + Flow: For async data streams and background processing.
- Paging 3: Efficient paging and caching of large datasets.
- Coil: For image loading in Jetpack Compose.
TablePay/
β-- app/
β β-- src/
β β β-- main/
β β β β-- java/lk/chamiviews/tablepay/
β β β β β-- data/ # Handles API calls and database interactions
β β β β β-- di/ # Hilt dependency injection setup
β β β β β-- domain/ # Business logic and use cases
β β β β β-- presentation/ # UI-related components, ViewModels, and navigation
β β β β-- res/ # Resources such as layouts, drawables, etc.
β β β-- AndroidManifest.xml # Application configuration
β-- build.gradle.kts # Project-level Gradle configuration
β-- settings.gradle.kts # Gradle settings
β-- README.md # Project documentation
- MVVM + Clean Architecture: For better separation of concerns, testability, and maintainability. Divided into three layers: Data, Domain, and Presentation.
- Dagger 2: Used for dependency injection to manage app-level and feature-level components.
- Paging 3 Library: To handle large datasets efficiently and with lazy loading.
- Room Database: For offline support and local caching.
- Retrofit: For API calls (simulated with https://dummyjson.com).
- Coil: Chosen for fast, lightweight image loading with Compose integration.
- No Real Payment Integration: Currently, "Mark as Paid" is a simulated action with local DB update.
- No Testing: No unit tests or UI tests have been written for this version yet.
- UI/UX Enhancements: The app follows a basic layout; animations, themes, and polish can be added.
- Error Handling: Missing graceful UI for API and database failures.
For any inquiries or feedback, please contact Chamod Lakmal.


