Skip to main content

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.

AlejoTaller is a monorepo with four independently runnable surfaces. This guide walks you through cloning the repository and starting every surface — the two Android apps, the Svelte web client, and the alejo_publisher microservice — with the minimum configuration required to connect them to real Appwrite and Pusher backends.
All four surfaces require real credentials — there is no local mock or stub mode for Appwrite or Pusher. You must have a running Appwrite instance (cloud or self-hosted) and a Pusher account before proceeding. The steps below guide you through providing those credentials in the correct locations.

Prerequisites

Before you begin, make sure you have the following installed and available:
  • Android Studio Flamingo or newer — required to build and run the two Android applications
  • JDK 17 — required by the Android Gradle build; set JAVA_HOME or configure it in Android Studio
  • Node.js 18 or newer — required by the alejo_publisher microservice
  • pnpm — required by the Svelte web client (npm install -g pnpm if not already installed)
  • A running Appwrite instance — cloud at cloud.appwrite.io or self-hosted
  • A Pusher account — create a free app at pusher.com to obtain PUSHER_APP_ID, PUSHER_KEY, PUSHER_SECRET, and PUSHER_CLUSTER
1
Clone the repository
2
git clone https://github.com/danielitoCode/AlejoTaller.git
cd AlejoTaller
3
Configure local.properties for Android
4
The Android build reads sensitive configuration from local.properties at the repo root and injects values into BuildConfig. Create or edit the file now:
5
# local.properties

# Appwrite
APPWRITE_PROJECT_ENDPOINT=https://cloud.appwrite.io/v1
APPWRITE_PROJECT_ID=your_project_id

# Publisher microservice URL (use http://10.0.2.2:3000 for the Android emulator)
PUBLISHER_BASE_URL=http://10.0.2.2:3000
PUBLISHER_API_KEY=tallerAlejoTestApiKey

# Pusher (used by both Android apps for channel subscription and event publishing)
PUSHER_API_KEY=your_pusher_key
PUSHER_CLUSTER=mt1
6
Never commit local.properties to version control. It is already listed in .gitignore. Treat every value in this file as a secret.
7
Build the Android client app
8
From the repository root, assemble a debug build of the customer-facing Android app:
9
./gradlew :app:assembleDebug
10
The resulting APK will be at app/build/outputs/apk/debug/app-debug.apk. Install it on a device or emulator using Android Studio or adb install.
11
For a faster iteration cycle that skips APK packaging:
12
./gradlew :app:compileDebugKotlin
13
Build the Android operator app
14
Assemble the operator (AlejoTallerScan) app in the same way:
15
./gradlew :alejotallerscan:assembleDebug
16
To compile without packaging:
17
./gradlew :alejotallerscan:compileDebugKotlin
18
Start the Svelte web client
19
Navigate into the web/ directory, install dependencies, and start the Vite development server:
20
cd web
pnpm install
pnpm dev
21
The web client starts on http://localhost:5173 by default — this is Vite’s standard port. Open that URL in any modern browser after the dev server reports it is ready.
22
Configure web credentials by creating web/.env (or web/.env.local) with at minimum:
23
VITE_APPWRITE_ENDPOINT=https://cloud.appwrite.io/v1
VITE_APPWRITE_PROJECT_ID=your_project_id
VITE_PUSHER_KEY=your_pusher_key
VITE_PUSHER_CLUSTER=mt1
24
Start the publisher function
25
In a new terminal, navigate into function/alejo_publisher/ and create a .env file populated with your Pusher credentials:
26
cd function/alejo_publisher
27
PORT=3000
PUBLISHER_API_KEY=tallerAlejoTestApiKey
PUSHER_APP_ID=your_pusher_app_id
PUSHER_KEY=your_pusher_key
PUSHER_SECRET=your_pusher_secret
PUSHER_CLUSTER=mt1
ALLOW_ORIGIN=*
28
Then install dependencies and start the service:
29
npm install
npm run dev
30
Verify the publisher health endpoint
31
With the publisher running, confirm it is reachable:
32
curl http://localhost:3000/health
33
A successful response confirms the service is up and ready to receive publication requests from the operator app. You can also test the full publish path:
34
curl -X POST http://localhost:3000/sale-verification/publish \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer tallerAlejoTestApiKey" \
  -d '{"saleId":"69c9593b002b167bf4fb","userId":"698f82750024bfe2dc52","decision":"confirmed","amount":20.5,"productCount":4,"cause":null}'
35
Expected response:
36
{
  "ok": true,
  "channel": "sale-verification-698f82750024bfe2dc52",
  "eventName": "sale:confirmed"
}

What You Have Running

After completing all steps you will have:
SurfaceLocation
Android clientInstalled on device/emulator via app-debug.apk
Android operatorInstalled on device/emulator via alejotallerscan-debug.apk
Svelte web clienthttp://localhost:5173
Publisher microservicehttp://localhost:3000
All four surfaces share the same Appwrite project and Pusher app, so a sale confirmed through the Android operator app will push a real-time event that both the web client and the Android client receive immediately.

Next Steps

  • See Architecture for a full explanation of the feature-first layered structure and the six design patterns used across the monorepo.
  • See Configuration & Environment Variables for the complete reference of every variable accepted by each surface.
  • The web client and publisher are deployable to Render — the alejo_publisher README documents the exact Root Directory, build command, and start command needed.

Build docs developers (and LLMs) love