Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/juanmatz/inspection-form-euroautos/llms.txt

Use this file to discover all available pages before exploring further.

The Euroautos Inspection Form uses environment variables prefixed with VITE_ to configure runtime behaviour without modifying source code. Because Vite embeds these values at build time, every variable is statically replaced in the compiled output — making it straightforward to maintain separate configurations for development, staging, and production environments.

Creating your .env file

Copy the provided example file to create your local configuration:
cp .env.example .env
Edit .env and fill in the values appropriate for your environment. Each deployment stage can have its own file:
FileWhen it is loaded
.envAll environments (lowest priority)
.env.localAll environments, never committed
.env.developmentnpm run dev only
.env.productionnpm run build only
The .env file is listed in .gitignore and must never be committed to version control. It may contain API keys and workshop-specific credentials. Use your CI/CD platform’s secret management (e.g. Vercel Environment Variables, GitHub Actions secrets) to inject values in automated pipelines.

Required variables

VITE_WORKSHOP_NAME
string
required
The display name of the workshop, shown in the application header, the footer of every generated PDF report, and the browser’s title bar alongside VITE_APP_TITLE. Example: "Euroautos Madrid".
VITE_APP_TITLE
string
The browser tab title rendered in the <title> element. Defaults to "Formulario de Inspección" when not set. You can localise this to match your region or brand, for example "Euroautos — Inspección de Vehículo".

API & sync variables

The inspection form can operate entirely offline, persisting completed inspections in the local browser storage and synchronising them to a backend when a connection becomes available. The following variables control that sync behaviour.
VITE_API_URL
string
Base URL of the backend sync API, without a trailing slash. For example, https://api.yourworkshop.com. When this variable is omitted, the application runs in fully offline mode — inspections are saved locally and no network requests are made. This is suitable for workshops that do not yet have a backend integration.
VITE_API_KEY
string
API key sent as a X-Api-Key header on every sync request. Required when VITE_API_URL is set. Keep this value out of version control — store it as a CI secret and inject it at build time.
VITE_SYNC_INTERVAL_MS
number
How often (in milliseconds) the background sync queue is flushed to the API. Defaults to 30000 (30 seconds). Lower values provide faster cloud backup but increase battery consumption on mobile devices. Set to 0 to disable automatic background sync and rely solely on manual sync triggers.
If the device loses connectivity mid-sync, the inspection form automatically retries using an exponential back-off strategy. No inspection data is lost when the network is unavailable.

Storage variables

VITE_STORAGE_TYPE
string
The browser storage engine used to persist inspection data locally. Accepted values are 'indexeddb' (default) and 'localstorage'. IndexedDB is strongly recommended for workshops that capture photos during inspections, as localStorage has a 5–10 MB quota that is quickly exhausted by image data. localStorage may be used in restricted environments where IndexedDB is unavailable.
VITE_MAX_PHOTO_SIZE_MB
number
Maximum photo file size in megabytes before client-side compression is applied. Defaults to 5. Photos exceeding this threshold are automatically resized and re-encoded as JPEG at 80% quality prior to storage. Set to 0 to disable compression entirely (not recommended for mobile cameras that produce 10–15 MB RAW images).
VITE_MAX_PHOTOS_PER_ITEM
number
Maximum number of photos that can be attached to a single checklist item. Defaults to 10. Increasing this value above 20 may impact report generation performance on low-powered devices. Set to 1 to enforce a single-photo workflow per item.

Branding variables

VITE_PRIMARY_COLOR
string
Hex colour code used as the primary accent throughout the application — buttons, active states, progress indicators, and the report header stripe. Defaults to #1A3A5C (Euroautos dark navy). Must be a valid 6-digit hex value including the # prefix, e.g. #2E7D32.

Sample .env file

The following is a complete .env file suitable for a production deployment. Copy this as your starting point and adjust values for your workshop.
# ─── Workshop Identity ────────────────────────────────────────────────────────
VITE_WORKSHOP_NAME="Euroautos Madrid"
VITE_APP_TITLE="Euroautos — Formulario de Inspección"

# ─── Backend Sync API ─────────────────────────────────────────────────────────
# Remove or leave blank to run in fully offline mode
VITE_API_URL=https://api.eurautomadrid.com
VITE_API_KEY=ea_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
VITE_SYNC_INTERVAL_MS=30000

# ─── Local Storage ────────────────────────────────────────────────────────────
VITE_STORAGE_TYPE=indexeddb
VITE_MAX_PHOTO_SIZE_MB=5
VITE_MAX_PHOTOS_PER_ITEM=10

# ─── Branding ─────────────────────────────────────────────────────────────────
VITE_PRIMARY_COLOR=#1A3A5C
After editing .env, restart the Vite development server (npm run dev) for changes to take effect. In production, you must run npm run build again — environment variables are baked into the compiled JavaScript bundle at build time, not read at runtime.

Build docs developers (and LLMs) love