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 does not have a separate web dashboard — all administrative functions are built directly into the Android app. When a user account is granted admin access, an Admin tab appears inside the Cuenta section alongside the standard Perfil and Configuración tabs. From there, a single screen covers café menu management, embroidery pattern management, and the workshop flyer.

Granting admin access

Admin privileges are controlled by the esAdmin flag stored in Firebase Realtime Database. A Firebase project owner must set this field manually for any user they wish to promote.
1

Open the Firebase console

Navigate to Realtime Database in your Firebase project and expand the Usuarios node.
2

Find the user's UID

Locate the child node that matches the target user’s Firebase Authentication UID.
3

Set the esAdmin flag

Add or edit the esAdmin key inside that node and set its value to true.
The app reads esAdmin in FragmentCuenta every time the Cuenta screen loads:
val esAdmin = snapshot.child("esAdmin").getValue(Boolean::class.java) ?: false

if (esAdmin) {
    binding.btnNavAdmin.visibility = View.VISIBLE
} else {
    binding.btnNavAdmin.visibility = View.GONE
}
Once the flag is true, the Admin tab becomes visible without any app restart — the listener fires in real time.

Realtime Database structure

The minimum database shape for a user node with both admin and support flags looks like this:
{
  "Usuarios": {
    "<uid>": {
      "uid": "<uid>",
      "nombres": "Ana López",
      "email": "ana@example.com",
      "esAdmin": true,
      "esSoporte": false,
      "online": false
    }
  }
}
Only set esAdmin = true for fully trusted team members. Admin access allows modifying all café items, embroidery patterns, and workshop content — changes take effect immediately for every user of the app.

The esSoporte flag

Users whose esSoporte field is true appear as available contacts in ListaChatActivity. Customers who open Soporte Chat see only those accounts, letting them start a conversation with a staff member directly. The esSoporte flag is independent of esAdmin — a support agent does not need admin privileges to handle chats.

What the Admin tab contains

The Admin tab is divided into three functional sections, each described in its own guide:

Café Menu

Add new café items, edit existing ones, toggle availability with a single tap, and browse the full catalogue across paginated pages.

Embroidery Patterns

Upload new cross-stitch patterns via JSON, activate or hide them, and permanently delete patterns that are no longer needed.

Workshops

Replace the active workshop flyer with a new image and automatically broadcast a push notification to all users.

Support Chat

Respond to customer messages, view unread counts, block disruptive users, and receive in-app popup alerts for new conversations.

Build docs developers (and LLMs) love