Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/AndresLopezCorrales/La-casa-del-bordadito/llms.txt

Use this file to discover all available pages before exploring further.

La Casa del Bordadito is a standard single-module Android project using the Kotlin DSL for Gradle (build.gradle.kts) and a version catalog at gradle/libs.versions.toml. Before the app will compile and run, you need to supply two configuration files that are intentionally excluded from the repository: app/google-services.json from your Firebase project and a local.properties file containing API keys.

Gradle setup

The project targets Android API 36 with a minimum SDK of 24 (Android 7.0 Nougat), compiled with Kotlin 2.0.21 and AGP 8.13.2.
SettingValue
AGP version8.13.2
Kotlin version2.0.21
applicationIdcom.example.applacasadelbordadito
compileSdk36
targetSdk36
minSdk24
versionCode1
versionName1.0
Java compatibilityVERSION_11
Both viewBinding and buildConfig are enabled in build.gradle.kts:
buildFeatures {
    viewBinding = true
    buildConfig = true
}
buildConfig = true is required because FcmUtil and ApplicationClass read BuildConfig.ONESIGNAL_APP_ID and BuildConfig.ONESIGNAL_API_KEY at runtime — these fields are injected from local.properties via buildConfigField.

Key dependencies

All versions are declared centrally in gradle/libs.versions.toml and referenced via the version catalog alias syntax in build.gradle.kts.
LibraryVersionPurpose
firebase-auth24.0.1Email/Password and Google authentication
firebase-database22.0.1Realtime Database (users, chats, patterns)
firebase-firestore-ktx25.1.1Firestore (menu, cart, orders)
firebase-storage22.0.1Profile photos, chat images, workshop flyer
play-services-auth21.4.0Google Sign-In credential provider
google-services plugin4.4.3Applies google-services.json at build time
LibraryVersionPurpose
material1.13.0Material 3 components (BottomNavigationView, cards, dialogs)
constraintlayout2.2.1Flexible view positioning
glide5.0.5Image loading for menu items, profiles, chat images
coil + coil-svg2.6.0SVG rendering for multiavatar-generated profile pictures
photoView2.3.0Pinch-to-zoom for images in ChatActivity
multiavatar1.0.1Deterministic avatar generation from user UID
LibraryVersionPurpose
zxing-core3.5.4QR code encoding engine
zxing-android-embedded4.3.0Embedded QR scanner and generator UI in QRActivity
LibraryVersionPurpose
onesignal5.6.1Push notification SDK
okhttp4.12.0HTTP client for OneSignal REST API calls in FcmUtil
LibraryVersionPurpose
edit-credit3.0.3Credit card number input formatting in TarjetaAgregarActivity
ccp (CountryCodePicker)2.7.0Country code selector for phone number fields
gson2.10.1JSON serialization/deserialization

Required configuration files

1. google-services.json

Download this file from your Firebase Console (Project Settings → Your apps → Android app) and place it at:
app/google-services.json
This file is referenced by the com.google.gms.google-services Gradle plugin and must be present before Gradle can sync. It is listed in .gitignore and is never committed to the repository.

2. local.properties

Create or edit local.properties at the project root. In addition to the standard Android SDK path, add your OneSignal credentials and EmailJS credentials. All six fields are read unconditionally by build.gradle.kts and injected as BuildConfig string fields, so every key must be present even if you are not using EmailJS:
sdk.dir=/Users/you/Library/Android/sdk

ONESIGNAL_APP_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
ONESIGNAL_API_KEY=your-rest-api-key-here

EMAILJS_SERVICE_ID=your-emailjs-service-id
EMAILJS_TEMPLATE_ID=your-emailjs-template-id
EMAILJS_PUBLIC_KEY=your-emailjs-public-key
EMAILJS_PRIVATE_KEY=your-emailjs-private-key
build.gradle.kts reads these properties and injects them as BuildConfig string fields:
buildConfigField("String", "ONESIGNAL_APP_ID",  "\"${localProperties["ONESIGNAL_APP_ID"]}\"")
buildConfigField("String", "ONESIGNAL_API_KEY", "\"${localProperties["ONESIGNAL_API_KEY"]}\"")

Firebase Console setup

Before the app can connect to Firebase, you must enable the required services in your Firebase project.
1

Authentication

Enable the following providers under Authentication → Sign-in method:
  • Email/Password — used by Login_email and Registro_email
  • Google — used by OpcionesLogin with play-services-auth
2

Firestore Database

Create a Firestore database in production mode (or test mode for local development). The app expects these collections to exist (they are created automatically on first write):
  • cafes — café menu items
  • carritos — per-user cart sub-collections
  • ordenes — placed orders
3

Realtime Database

Create a Realtime Database instance and configure rules to allow authenticated reads and writes. A minimal development rule set:
{
  "rules": {
    ".read": "auth != null",
    ".write": "auth != null"
  }
}
The app writes to: Usuarios, Chats, ChatsUnreadCount, patrones, and TallerInfo.
4

Firebase Storage

Enable Storage and set rules to allow authenticated uploads and public reads:
rules_version = '2';
service firebase.storage {
  match /b/{bucket}/o {
    match /{allPaths=**} {
      allow read: if true;
      allow write: if request.auth != null;
    }
  }
}

Android Manifest permissions

The following permissions are declared in AndroidManifest.xml:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
PermissionReason
INTERNETAll Firebase SDK calls, OneSignal API, image loading
CAMERAScanning QR codes in QRActivity; camera is declared required="false" so the app installs on devices without one
WRITE_EXTERNAL_STORAGELegacy storage access for Android 9 and below
POST_NOTIFICATIONSRequired on Android 13+ (API 33) to display push notifications
For Android 10+ (API 29+), image picker access uses READ_MEDIA_IMAGES at runtime via the Activity Result API rather than the legacy READ_EXTERNAL_STORAGE permission.

Building and running

Open the project in Android Studio Hedgehog or later. After Gradle sync completes:
  1. Select a run configuration targeting app.
  2. Choose a connected device or AVD.
  3. Click Run ▶ (or press Shift+F10).
Use Android Studio’s Device Manager to create an AVD (Android Virtual Device) for local testing without a physical device. Choose a Pixel device profile with API 34 or higher to test the runtime POST_NOTIFICATIONS permission dialog introduced in Android 13.
The functions/index.js file in the repository defines a welcome-email Cloud Function triggered on new Usuarios node creation. It is not currently deployed to Firebase Functions — all business logic runs client-side in the Android app. To deploy it, install the Firebase CLI, run firebase login, and then firebase deploy --only functions from the project root.

Build docs developers (and LLMs) love