# Frontend Environment Variables

This document describes all environment variables used by the frontend.

## Quick Start

1. Create a `.env` file in the `frontend` directory
2. Add the variables below with your values
3. **DO NOT commit `.env` file to version control**

## Required Variables

### API Configuration
```bash
# Backend API base URL
VITE_API_BASE_URL=http://localhost:5000
```

For production:
```bash
VITE_API_BASE_URL=https://api.yourdomain.com
```

## Optional Variables

### Development Server
- `VITE_PORT` - Development server port (default: `3001`)
- `DEV_PROXY_SERVER` - Proxy server for Vite dev server (default: same as `VITE_API_BASE_URL`)

## Usage

All environment variables in Vite must be prefixed with `VITE_` to be accessible in the browser.

Access in code:
```typescript
const apiUrl = import.meta.env.VITE_API_BASE_URL;
```

## Production Build

When building for production, ensure `VITE_API_BASE_URL` points to your production API server.

Build command:
```bash
npm run build
# or
pnpm build
```

The built files will be in the `dist` directory.

