Features

Modern UI: Built with Jetpack Compose and Material 3 design Offline-First: Works seamlessly offline with automatic sync when online Secure: End-to-end encryption for sensitive data using Android Keystore Accessible: Full accessibility support with proper semantics Tested: Comprehensive unit and UI tests Performance: Optimized with performance monitoring and tracing Architecture

The app follows Clean Architecture with MVVM pattern:

├── data/ │ ├── local/ # Room database, DAOs, converters │ ├── remote/ # Retrofit API service, network models │ ├── repository/ # Repository implementations │ ├── preferences/ # Encrypted preferences with DataStore │ └── sync/ # Background sync manager ├── di/ # Dependency injection modules ├── ui/ │ ├── components/ # Reusable accessible UI components │ ├── navigation/ # Navigation setup │ ├── screens/ # Screen composables │ ├── theme/ # Material 3 theming │ └── viewmodel/ # ViewModels with StateFlow └── util/ # Utilities (validation, crypto, performance)

Tech Stack

UI: Jetpack Compose, Material 3 Architecture: MVVM, Clean Architecture DI: Hilt Database: Room with Flow Networking: Retrofit, OkHttp State Management: StateFlow, Compose State Security: Android Keystore, DataStore Testing: JUnit, MockK, Turbine, Compose Testing Performance: Tracing API Getting Started Prerequisites Android Studio Hedgehog or later Android SDK 24+ Kotlin 1.9.23+ Java 17 or later Gradle 8.2.1+ (included via wrapper)

Setup

Clone the repository Open in Android Studio Sync Gradle files Run the app Configuration

API Configuration: Update the base URL in NetworkModule.kt Security: Replace certificate pins in network_security_config.xml Database: The app uses Room with sample data for development Firebase: Place your app/google-services.json locally (it's gitignored). For CI, inject it via secrets (see below). Security Features Network Security: Certificate pinning and HTTPS enforcement Data Encryption: Sensitive data encrypted using Android Keystore Secure Storage: DataStore with encryption for preferences Input Validation: Comprehensive validation to prevent injection attacks Backup Protection: Sensitive data excluded from backups Secrets Management (Firebase) app/google-services.json is intentionally in .gitignore and should not be committed.

For local development: obtain the file from Firebase Console and place it at app/google-services.json.

For CI: store a base64-encoded content of google-services.json in a repository secret (e.g., GOOGLE_SERVICES_JSON_B64) and write it at build time:

GitHub Actions example step:

  • name: Write google-services.json run: | echo "$GOOGLE_SERVICES_JSON_B64" | base64 -d > app/google-services.json shell: bash env: GOOGLE_SERVICES_JSON_B64: ${{ secrets.GOOGLE_SERVICES_JSON_B64 }} Testing Run tests using:

Unit tests

./gradlew test

Instrumentation tests

./gradlew connectedAndroidTest

All tests

./gradlew check Performance The app includes performance monitoring:

Startup Time: Tracked and logged Screen Load Times: Monitored for each screen API Performance: Network call duration tracking Memory Usage: Regular memory usage logging Database Performance: Query execution time tracking Accessibility Full accessibility support including:

Screen Reader: Proper content descriptions and semantics Touch Targets: Minimum 48dp touch targets Color Contrast: WCAG AA compliant colors Focus Management: Proper focus handling Live Regions: Dynamic content announcements Offline Support Offline-First: All data cached locally Background Sync: Automatic sync when network available Conflict Resolution: Handles data conflicts gracefully Queue Management: Failed operations queued for retry Contributing Fork the repository Create a feature branch Add tests for new functionality Ensure all tests pass Submit a pull request License This project is licensed under the MIT License - see the LICENSE file for details.

API Documentation The app expects the following API endpoints:

GET /menu - Get all menu items GET /menu/category/{category} - Get items by category POST /orders - Submit new order GET /orders/{orderId} - Get order status PUT /orders/{orderId}/status - Update order status DELETE /orders/{orderId} - Cancel order