Appwrite is the primary backend for AlejoTaller. It provides authentication (email/password and Google OAuth), a NoSQL database for products, categories, and sales, object storage for product images, and Cloud Functions for privileged server-side operations. Both the Android apps and the Svelte web client connect to the same Appwrite project using their respective SDKs — the Appwrite Kotlin SDK on Android and the Appwrite Web SDK on the web.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.
Prerequisites
- A running Appwrite instance. You can use Appwrite Cloud for a managed setup or self-host Appwrite on a VPS or Docker environment.
- Admin access to the Appwrite console.
- The AlejoTaller monorepo cloned locally.
Setup Steps
In the Appwrite console, click Create Project. Give it a descriptive name (e.g.
AlejoTaller) and note the Project ID that is generated — you will need it for VITE_APPWRITE_PROJECT_ID (web) and APPWRITE_PROJECT_ID (Android local.properties).alejotaller.onrender.com for production and localhost for development).com.elitec.alejotaller for the client app.com.elitec.alejotallerscan.- Obtain a Web Client ID and Android Client ID from the Google Cloud Console and enter them in the Appwrite OAuth provider settings.
- Copy the Web Client ID to
VITE_GOOGLE_CLIENT_ID(web) and toGOOGLE_CLOUD_WEBCLIENT,GOOGLE_CLOUD_ANDROID_DEBUG, andGOOGLE_CLOUD_ANDROID_RELEASEinlocal.properties.
VITE_PASSWORD_RESET_URL.alejo_taller_db) and note the Database ID.VITE_APPWRITE_DATABASE_ID (web) and APPWRITE_DATABASE_ID (Android).Create the following three collections inside your database. Enable Document Security on each collection so that read/write rules can be applied at the document level.
namedescriptionphotoUrlstatusactive or inactive.namedescriptionexistencepricephotoUrlcategoryIdrating0.0.createdAtIsodateamountverifiedUNVERIFIED, VERIFIED, or DELETED.productsSaleItem objects (productId, productName, quantity, price).currencyCUP, USD, or MLC.userIddeliveryTypePICKUP or DELIVERY.deliveryAddressDeliveryAddress object (province, municipality, streets, phone, etc.).Enable Realtime on the
sales collection (Appwrite console → collection → Settings → Realtime). The operator Android app (alejotallerscan) subscribes to Appwrite Realtime to detect when verified changes so it can trigger the publisher microservice and push the confirmation to Pusher.product-images) and configure permissions so authenticated users can read files.VITE_APPWRITE_STORAGE_BUCKET_ID (web) and APPWRITE_BUCKECT_ID (Android).AlejoTaller uses an Appwrite Cloud Function (
VITE_APPWRITE_USERS_FUNCTION) for privileged user-management operations that cannot safely run from the frontend — for example, listing or deleting users from the admin dashboard.VITE_APPWRITE_USERS_FUNCTION in the web .env.The exact function implementation lives outside the main monorepo. Refer to the admin dashboard repository at github.com/danielitoCode/dash_alejo_taller for the function source.
VITE_APPWRITE_ENDPOINT=https://cloud.appwrite.io/v1
VITE_APPWRITE_PROJECT_ID=<your-project-id>
VITE_APPWRITE_DATABASE_ID=<your-database-id>
VITE_APPWRITE_STORAGE_BUCKET_ID=<your-bucket-id>
VITE_APPWRITE_USERS_FUNCTION=<your-function-id>
VITE_APPWRITE_CONSOLE_URL=https://cloud.appwrite.io/console/project-<your-project-id>
APPWRITE_PROJECT_ENDPOINT=https://cloud.appwrite.io/v1
APPWRITE_PROJECT_ID=<your-project-id>
APPWRITE_DATABASE_ID=<your-database-id>
APPWRITE_BUCKECT_ID=<your-bucket-id>
CATEGORY_TABLE_ID=<your-categories-collection-id>
PRODUCT_TABLE_ID=<your-products-collection-id>
SALE_TABLE_ID=<your-sales-collection-id>
APPWRITE_TELEGRAM_FUNCTION_URL=<your-telegram-function-url>
Collection Permissions Reference
Appwrite uses role-based permissions at both the collection and document level. A recommended starting configuration for AlejoTaller:| Collection | Read | Create | Update | Delete |
|---|---|---|---|---|
categories | Any | Team (admins) | Team (admins) | Team (admins) |
products | Any | Team (admins) | Team (admins) | Team (admins) |
sales | Users (owner only) | Users | Team (operators) | Team (admins) |
For the full list of environment variables that reference these IDs, see the Environment Variables Reference.