The AlejoTaller Android client app (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/danielitoCode/AlejoTaller/llms.txt
Use this file to discover all available pages before exploring further.
app/) is the primary mobile surface for end customers in the AlejoTaller monorepo. It gives shoppers a complete electronics store experience — from browsing the product catalog and selecting items by category through completing a purchase or reservation — all while remaining functional under unreliable connectivity thanks to its offline-first architecture.
Role in the Monorepo
The monorepo hosts four distinct surfaces that cooperate to deliver a single business flow:| Surface | Module | Primary Role |
|---|---|---|
| Android Client | app/ | Customer shopping, purchase, and verification |
| Android Operator | alejotallerscan/ | QR scanning, sale confirmation and rejection |
| Web Client | web/ | Browser-based shopping and APK download guidance |
| Publisher Function | function/alejo_publisher/ | Secure Pusher event relay |
Key Responsibilities
- Authentication and session management — email/password login, account creation, and optional Google Sign-In via Appwrite, with session persistence across app restarts.
- Catalog browsing — observe and filter products by category, with local Room cache ensuring the catalog is available offline.
- Purchase and reservation — create a new sale as either a direct purchase or a reservation, with DeliveryType selection (
PICKUPorDELIVERY) after the order is confirmed. - Offline-first persistence — sales and catalog data are saved locally first; remote synchronisation with Appwrite proceeds when connectivity is available.
- Real-time verification events — subscribe to a per-user Pusher channel (
sale-verification-{userId}) and reconcile the local sale state whensale:confirmedorsale:rejectedevents arrive.
Tech Stack
The client app is built entirely in Kotlin and targets Android API 26+.Shared Modules
The app avoids duplicating critical business logic by consuming four shared Gradle modules:shared-auth— authentication contracts, user roles, and session utilities shared with the operator app.shared-core— cross-cutting rules, notification entities, and transversal utilities.shared-data— DTOs, mappers, repositories, and data-layer support for persistence and sync.shared-sale— the complete sale domain:Sale,BuyState,DeliveryType,Currencyenums, and all sale-related use cases including real-time event handling.
The Sale Flow (Customer Perspective)
The main business flow seen by the customer unfolds in five steps:- The customer fills a cart and submits a purchase or reservation.
- The sale is immediately persisted locally with
BuyState.UNVERIFIED. - The app syncs the sale to Appwrite when connectivity allows.
- The operator app (
alejotallerscan) picks up the pending sale, verifies it, and triggers thealejo_publisherfunction. - The publisher relays a
sale:confirmedorsale:rejectedevent to Pusher. - The Android client’s Pusher subscription receives the event, updates the local
BuyStatetoVERIFIEDorDELETED, and surfaces in-app feedback to the customer.
The
alejo_publisher function is the exclusive Pusher publisher. Pusher secrets never live inside the Android APK, keeping the signing flow auditable and the release build secure.Architecture Pattern
Every feature in the app follows the same three-layer structure:StateFlow states with explicit loading, error, and success variants, reducing visual coupling and making each screen predictable under all network conditions.
Related Pages
Feature Set & Use Cases
Detailed breakdown of every feature module and its use cases.
Build & Run
Prerequisites, Gradle commands, and local.properties configuration.