Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/diarpicu2022-commits/frontend-AgroPulse/llms.txt

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

AgroPulse reads configuration exclusively from Vite environment variables prefixed with VITE_. These are inlined at build time — changes require a rebuild. Copy .env.example to .env in the project root and fill in the values before running npm run dev or npm run build.

Example .env file

# Backend REST API
VITE_API_URL=http://localhost:8080

# Supabase
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your-anon-key

# AI providers (optional — also configurable in the Settings UI)
VITE_GROQ_KEY=
VITE_GITHUB_TOKEN=
VITE_GEMMA_KEY=

# EmailJS — for email verification on registration
# Create an account at https://www.emailjs.com and configure a service + template
VITE_EMAILJS_SERVICE_ID=
VITE_EMAILJS_TEMPLATE_ID=
VITE_EMAILJS_PUBLIC_KEY=

Required variables

VITE_API_URL
string
required
Base URL of the AgroPulse REST backend. All API calls in ApiService.ts are prefixed with this value.Default (dev proxy): http://localhost:8080In development, Vite also proxies requests matching /api/* to http://localhost:8080 (configured in vite.config.ts), so this variable is only strictly required for production builds.
VITE_SUPABASE_URL
string
required
Your Supabase project URL. Found in your Supabase dashboard under Project Settings → API → Project URL.Example: https://abcdefghijklmn.supabase.co
VITE_SUPABASE_ANON_KEY
string
required
The Supabase anon (public) key. Found in your Supabase dashboard under Project Settings → API → Project API keys → anon public.This key is safe to expose in the browser. Row-level security policies on your Supabase project control what unauthenticated users can access.

EmailJS variables

AgroPulse uses EmailJS to send a verification code to the user’s email address during registration. All three variables are required for registration to work.
VITE_EMAILJS_SERVICE_ID
string
required
The EmailJS service ID. Created in your EmailJS dashboard under Email Services.Example: service_abc123
VITE_EMAILJS_TEMPLATE_ID
string
required
The EmailJS template ID for the verification email. Created in your EmailJS dashboard under Email Templates.Example: template_xyz789
VITE_EMAILJS_PUBLIC_KEY
string
required
Your EmailJS public key (previously called “User ID”). Found in Account → General → Public Key.Example: ABCDEF_ghijklmnop

AI provider variables (optional)

All three AI provider keys are fully optional. If none are set, AI-powered features in the dashboard (natural language queries, automated suggestions) are disabled. Keys can also be entered at runtime through the AgroPulse Settings UI without requiring a rebuild.
VITE_GROQ_KEY
string
API key for Groq. Used for fast inference on open-weight models (Llama 3, Mixtral, etc.).
VITE_GITHUB_TOKEN
string
Personal access token for the GitHub Models endpoint. Grants access to hosted models (GPT-4o, Phi-3, etc.) via api.github.com.
VITE_GEMMA_KEY
string
API key for Google AI Studio (Gemma / Gemini models). Used as a fallback or alternative AI backend.

Map overlay variable (optional)

VITE_OPENWEATHER_KEY
string
API key for OpenWeatherMap tile layers. Used exclusively for the weather tile overlays (rain, temperature, clouds, wind) on the Map page. The popup weather data (current conditions) is sourced from Open-Meteo and does not require a key.Without this variable the layer buttons in the map are disabled with a notice. All other map functionality works without it.

Vite dev proxy

In development mode, vite.config.ts proxies /api/* requests to http://localhost:8080:
server: {
  host: true,
  port: 3000,
  proxy: {
    '/api': {
      target: 'http://localhost:8080',
      changeOrigin: true,
    }
  }
}
This means you can leave VITE_API_URL empty locally and requests will still reach the backend. In production — including Vercel deployments — VITE_API_URL must point to your live backend URL because the proxy is not active after the build.
Never commit a populated .env file to version control. The .env.example file (with empty values) is safe to commit. Add .env to .gitignore.

Build docs developers (and LLMs) love