> ## Documentation Index
> Fetch the complete documentation index at: https://pavan-c90e8846.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Configure and Deploy File Transfer Pavan Environment

> Set up your Supabase project, configure .env.local variables, run database migrations, and deploy File Transfer Pavan to Vercel or Docker on port 8080.

Before you run or deploy File Transfer Pavan, create a Supabase project, configure your environment variables, and apply the PostgreSQL migrations. This guide walks you through local development and production deployment.

## Supabase Setup

<Steps>
  <Step title="Create a Supabase project">
    Go to [supabase.com](https://supabase.com) and create a new project. Choose a region close to your users.
  </Step>

  <Step title="Copy the Project URL and anon key">
    Open **Project Settings > API** and copy the **Project URL** and **anon** key. You will need both for your `.env.local` file.
  </Step>

  <Step title="Enable Email Auth">
    In **Authentication > Providers**, enable Email Auth. You can also configure Magic Links or OAuth providers if you want social login.
  </Step>

  <Step title="Create the uploads storage bucket">
    In **Storage**, create a bucket named `uploads` and set its policy to public so shared files are accessible via signed URLs.
  </Step>

  <Step title="Apply database migrations">
    Run the SQL migration files in `supabase/migrations/` against your project. You can use the Supabase SQL Editor or the Supabase CLI.
  </Step>
</Steps>

## Environment Variables

Create a `.env.local` file in the project root with the following variables.

```bash theme={null}
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your-anon-key
VITE_SUPABASE_SERVICE_KEY=your-service-key
VITE_ANALYTICS_ID=your-analytics-id
VITE_ENVIRONMENT=development
```

<Warning>
  Never commit `.env.local` to Git. Add it to `.gitignore`. Never expose `VITE_SUPABASE_SERVICE_KEY` in client-side code: it is meant for admin operations only and should be kept on a trusted server or edge function.
</Warning>

## Available Scripts

| Script | Command | Description |
| - | - | - |
| Dev server | `npm run dev` | Start the Vite dev server on port **8080** |
| Production build | `npm run build` | Build optimized assets with Terser and code splitting |
| Dev build | `npm run build:dev` | Build in development mode |
| Preview | `npm run preview` | Preview the production build locally |
| Lint | `npm run lint` | Run ESLint on the entire project |

### Build and Preview

<CodeGroup>
  ```bash npm theme={null}
  npm run build
  npm run preview
  ```

  ```bash pnpm theme={null}
  pnpm run build
  pnpm run preview
  ```

  ```bash yarn theme={null}
  yarn build
  yarn preview
  ```
</CodeGroup>

## Vercel Deployment

You can deploy to Vercel with two commands after setting your environment variables.

```bash theme={null}
vercel deploy
vercel env add VITE_SUPABASE_URL
vercel env add VITE_SUPABASE_ANON_KEY
```

The live production URL is [https://file-share-05.lovable.app](https://file-share-05.lovable.app).

## Docker Deployment

Build the image and run the container on port `8080`.

```bash theme={null}
docker build -t file-transfer-pavan .
docker run -p 8080:8080 \
  -e VITE_SUPABASE_URL=https://your-project.supabase.co \
  -e VITE_SUPABASE_ANON_KEY=your-anon-key \
  file-transfer-pavan
```

<Note>
  Port `8080` is the default for both the Vite dev server and the Docker container. If you run the dev server locally, open `http://localhost:8080`.
</Note>

## Browser Support

| Browser | Minimum Version |
| - | - |
| Chrome / Edge | 90+ |
| Firefox | 88+ |
| Safari (Desktop) | 14+ |
| iOS Safari | 14+ |
| Chrome Mobile | 90+ |
| PWA | All modern browsers with service worker support |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.