TF-App runs on two distinct development layers that must both be configured before you can build or run the app locally. The first is the Node.js/web layer, where Vite compiles your JavaScript source into theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Niurka77/tf-app/llms.txt
Use this file to discover all available pages before exploring further.
dist/ bundle that Capacitor packages. The second is the Android/Java layer, where Gradle and the Android SDK assemble the APK or AAB that runs on a device. Both layers must be operational before running npx cap run android.
Prerequisites
Install and verify all of the following tools before cloning the repository.Node.js ≥ 18 (LTS)
Required to run Vite, Capacitor CLI, and all npm scripts. The LTS release is recommended for stability. Verify with
node -v.npm ≥ 9
Ships bundled with Node.js 18+. Used to install dependencies and run
package.json scripts. Verify with npm -v.Java JDK 17
Required by Gradle and the Android build toolchain. JDK 17 is the version expected by the
compileSdkVersion 35 configuration in android/variables.gradle. Verify with java -version.Android Studio (Hedgehog+)
Provides the Android emulator, device debugger, SDK Manager, and the Gradle daemon. Android Studio Hedgehog (2023.1.1) or newer is recommended. Download from developer.android.com/studio.
Android SDK
Inside Android Studio, open SDK Manager (Settings → Languages & Frameworks → Android SDK) and install:| Component | Minimum Version | Notes |
|---|---|---|
| Android SDK Platform | API 35 | Matches compileSdkVersion and targetSdkVersion in android/variables.gradle |
| Android SDK Build-Tools | 35.x | Installed automatically with the platform |
| Android SDK Platform-Tools | Latest | Provides adb for device communication |
| Android Emulator | Latest | Required if testing on a virtual device |
TF-App sets
minSdkVersion = 23 in android/variables.gradle, meaning it supports Android 6.0 (Marshmallow) and above. You do not need to install SDK Platform images below API 23.Environment Variables
TF-App uses Vite’s built-inimport.meta.env system for environment variables. Vite reads .env files from the project root at build time and injects any variable prefixed with VITE_ directly into the compiled bundle.
Creating a .env File
Create a.env file at the project root (next to package.json) for your local development overrides:
Accessing Variables in JavaScript
AnyVITE_-prefixed variable is available at runtime via import.meta.env:
VITE_ prefix (e.g., SECRET_KEY) are intentionally excluded from the client bundle to prevent accidental exposure.
Vite .env File Priority
Vite loads.env files in the following order (later files take precedence):
| File | When loaded |
|---|---|
.env | Always |
.env.local | Always; ignored by git |
.env.[mode] | Only for that mode (e.g., .env.production) |
.env.[mode].local | Only for that mode; ignored by git |
Android SDK Environment Variables
For command-line builds and CI/CD pipelines, Gradle andadb require the ANDROID_HOME environment variable to be set. Add the following to your shell profile (~/.zshrc, ~/.bashrc, or equivalent):
If Android Studio is your primary IDE, it automatically sets
ANDROID_HOME for processes launched from within the IDE. The manual export above is required only for terminal-based builds and CI environments.Node Version Management
TF-App requires Node.js 18 or later. If you work across multiple projects with different Node versions, use a version manager to avoid conflicts.nvm (Node Version Manager)
The most widely used option. Pin the version for this project with a Install from github.com/nvm-sh/nvm.
.nvmrc file:Volta
Volta pins Node and npm versions per project in Install from volta.sh.
package.json automatically. Ideal for teams that want zero-friction version consistency:Verify Your Setup
Once all prerequisites are installed, confirm the full toolchain with:npx cap doctor will report any missing or misconfigured dependencies specific to the Capacitor + Android stack, including SDK paths and JDK compatibility.