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.

This guide walks you through every step needed to get La Casa del Bordadito running locally: cloning the repository, creating a Firebase project and dropping in the google-services.json file, adding your OneSignal keys to local.properties, syncing Gradle in Android Studio, and creating your first account. By the end you will have a fully functional build connected to your own Firebase backend.
The google-services.json file is excluded from the repository via .gitignore. You must generate your own by creating a Firebase project, registering the Android app with the package name com.example.applacasadelbordadito, and downloading the file from the Firebase console. Without it the build will fail at the apply plugin: 'com.google.gms.google-services' step.

Setup steps

1

Clone the repository

Clone the project from GitHub and enter the project directory:
git clone https://github.com/AndresLopezCorrales/La-casa-del-bordadito.git
cd La-casa-del-bordadito
2

Set up a Firebase project

Create a new project in the Firebase console and enable the following services:
ServicePurpose
AuthenticationEmail/Password provider (with email verification) and Google Sign-In
FirestoreCafé catalogue (cafes), shopping cart (carritos/{uid}/items), and order history
Realtime DatabaseUser profiles (Usuarios), chat messages (Chats), unread counts (ChatsUnreadCount), embroidery patterns (patrones), and workshop info (TallerInfo)
StorageProfile pictures and embroidery pattern images
After enabling each service, register your Android app with the package name com.example.applacasadelbordadito, then download google-services.json and place it in the app/ directory:
La-casa-del-bordadito/
└── app/
    └── google-services.json   ← place it here
Realtime Database security rules — ensure your rules allow authenticated reads and writes for the paths the app uses. A development-friendly starting point:
{
  "rules": {
    "Usuarios": {
      "$uid": {
        ".read": "auth != null",
        ".write": "auth != null && auth.uid === $uid"
      }
    },
    "Chats": {
      ".read": "auth != null",
      ".write": "auth != null"
    },
    "ChatsUnreadCount": {
      ".read": "auth != null",
      ".write": "auth != null"
    },
    "patrones": {
      ".read": "auth != null",
      ".write": "auth != null"
    },
    "TallerInfo": {
      ".read": "auth != null",
      ".write": "auth != null"
    }
  }
}
3

Configure OneSignal

Create a free app at onesignal.com and note your App ID and REST API Key. The app reads both values — along with four EmailJS credentials — through BuildConfig, which pulls them from local.properties at build time (see app/build.gradle.kts):
// app/build.gradle.kts (excerpt — already in the repo)
buildConfigField("String", "EMAILJS_SERVICE_ID",  "\"${localProperties["EMAILJS_SERVICE_ID"]}\"")
buildConfigField("String", "EMAILJS_TEMPLATE_ID", "\"${localProperties["EMAILJS_TEMPLATE_ID"]}\"")
buildConfigField("String", "EMAILJS_PUBLIC_KEY",  "\"${localProperties["EMAILJS_PUBLIC_KEY"]}\"")
buildConfigField("String", "EMAILJS_PRIVATE_KEY", "\"${localProperties["EMAILJS_PRIVATE_KEY"]}\"")
buildConfigField("String", "ONESIGNAL_APP_ID",    "\"${localProperties["ONESIGNAL_APP_ID"]}\"")
buildConfigField("String", "ONESIGNAL_API_KEY",   "\"${localProperties["ONESIGNAL_API_KEY"]}\"")
Add all six keys to local.properties in the project root (create the file if it does not exist):
# OneSignal
ONESIGNAL_APP_ID=your-onesignal-app-id-here
ONESIGNAL_API_KEY=your-onesignal-api-key-here

# EmailJS (used to send welcome emails on first Google sign-in)
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
local.properties is gitignored, so these credentials will never be committed.
The OneSignal SDK is initialised in ApplicationClass.onCreate() using OneSignal.initWithContext(this, ONESIGNAL_APP_ID). After a successful sign-in the app calls OneSignal.login(uid) to link the device token to the Firebase user, enabling targeted push notifications.
4

Open in Android Studio and run

  1. Open Android Studio (Hedgehog or later recommended) and choose Open → select the La-casa-del-bordadito root directory.
  2. Wait for the IDE to import the project, then click File → Sync Project with Gradle Files (or use the sync icon in the toolbar).
  3. Connect a physical Android device or start an emulator. The app requires API level 24 (Android 7.0 Nougat) or higher (minSdk = 24 in app/build.gradle.kts).
  4. Select your device in the run target dropdown and press Run ▶.
minSdk     = 24   (Android 7.0)
targetSdk  = 36
compileSdk = 36   (release channel)
5

Create the first account and verify email

When the app launches it opens OpcionesLogin. You can sign in with:
  • Google — tap Ingresar con Google. On first sign-in the app writes a new user record to Usuarios/{uid} in the Realtime Database and sends a welcome email via EmailJS.
  • Email/Password — tap Ingresar con Email to reach Login_email. If you do not have an account yet, tap REGISTRARME to open Registro_email, fill in your email and password (enter it twice), and tap Registrar. Firebase sends a verification email; the app redirects to VerificarEmailActivity and blocks access until the link in the email is clicked.
After email verification, sign in again. The app calls OneSignal.login(uid) and navigates to MainActivity.
To unlock the admin panel, open the Firebase console, navigate to Realtime Database → Usuarios → , and set the esAdmin field to true. On next app launch the Cuenta tab will show the PANEL DE ADMINISTRACIÓN section. You can also set esSoporte to true to grant support-chat access without full admin privileges.
Realtime Database
└── Usuarios
    └── {uid}
        ├── esAdmin: true    ← grants admin panel
        └── esSoporte: true  ← grants support chat queue

Build docs developers (and LLMs) love