> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sitestorepro.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuring Your Site Store Pro Environment Variables

> Configure your .env file for local and production deployments, covering app settings, databases, OAuth providers, S3 storage, payment gateways, and OpenAI.

Site Store Pro reads all runtime configuration from a single `.env` file at the project root. After running `cp .env.example .env` and `php artisan key:generate` during installation, work through each section below to enable the features your store requires. You only need to fill in the variables relevant to your setup — unused integrations can stay blank.

## Application Settings

Set the basic identity and runtime mode of your application:

```ini theme={null}
APP_NAME="Online Store"
APP_ENV=local          # local | production | staging
APP_KEY=base64:...     # Generated by php artisan key:generate
APP_URL=http://localhost:8000
```

Set `APP_ENV=production` and `APP_DEBUG=false` before any public-facing deployment.

## Database

<Tabs>
  <Tab title="SQLite (Development)">
    SQLite requires no database server and works out of the box for local development:

    ```ini theme={null}
    DB_CONNECTION=sqlite
    ```

    <Note>
      When `DB_CONNECTION=sqlite`, Laravel creates the database file automatically at `database/database.sqlite`. No additional variables are needed for local development.
    </Note>
  </Tab>

  <Tab title="MySQL / MariaDB (Production)">
    For production deployments, switch to MySQL 8.0+ or MariaDB 10.5+:

    ```ini theme={null}
    DB_CONNECTION=mysql
    DB_HOST=127.0.0.1
    DB_PORT=3306
    DB_DATABASE=laravel_store
    DB_USERNAME=root
    DB_PASSWORD=secret
    ```
  </Tab>

  <Tab title="PostgreSQL (Production)">
    PostgreSQL 15+ is also supported as a production database:

    ```ini theme={null}
    DB_CONNECTION=pgsql
    DB_HOST=127.0.0.1
    DB_PORT=5432
    DB_DATABASE=laravel_store
    DB_USERNAME=postgres
    DB_PASSWORD=secret
    ```
  </Tab>
</Tabs>

## Social OAuth

Site Store Pro supports sign-in via Google, Facebook, and GitHub through Laravel Socialite. Register an OAuth application on each provider's developer console, then add the credentials here:

```ini theme={null}
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=

FACEBOOK_CLIENT_ID=
FACEBOOK_CLIENT_SECRET=

GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
```

Leave a provider's variables blank to disable that login option on the storefront.

## AWS S3 and CloudFront

To store product images and other assets on S3 with optional CloudFront CDN delivery, fill in your bucket details:

```ini theme={null}
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=my-store-assets-bucket

# Optional: set to your CloudFront distribution URL for CDN delivery
AWS_URL=https://d111111abcdef8.cloudfront.net

AWS_USE_PATH_STYLE_ENDPOINT=false
```

<Tip>
  If you set `AWS_URL` to a CloudFront distribution, all generated asset URLs will point to the CDN edge rather than the S3 origin — no code changes required.
</Tip>

## Payment Gateways

Configure credentials for whichever payment processors you plan to activate. See [Payment Plugins](/developers/payment-plugins) for details on extending or adding processors.

<Accordion title="Stripe">
  ```ini theme={null}
  STRIPE_KEY=pk_test_...           # Publishable key (frontend)
  STRIPE_SECRET=sk_test_...        # Secret key (server-side)
  STRIPE_WEBHOOK_SECRET=whsec_...  # From Stripe Dashboard → Webhooks
  ```

  Use `pk_test_` / `sk_test_` keys in development and `pk_live_` / `sk_live_` keys in production.
</Accordion>

<Accordion title="Paddle Billing">
  ```ini theme={null}
  PADDLE_CLIENT_SIDE_TOKEN=test_...   # Client-side token for Paddle.js
  PADDLE_API_KEY=pdk_...              # Server-side API key
  PADDLE_WEBHOOK_SECRET=pwh_...       # From Paddle Dashboard → Notifications
  ```
</Accordion>

<Accordion title="PayPal">
  ```ini theme={null}
  PAYPAL_CLIENT_ID=
  PAYPAL_CLIENT_SECRET=
  PAYPAL_MODE=sandbox    # sandbox | live
  ```

  Set `PAYPAL_MODE=live` when you're ready to accept real payments.
</Accordion>

## OpenAI (AI Translations)

Site Store Pro uses the OpenAI API to automatically translate store content into additional languages:

```ini theme={null}
OPENAI_API_KEY=sk-...
```

<Warning>
  `OPENAI_API_KEY` is required for the AI translation feature to function. Without it, the translation job will fail silently and no translated content will be generated. Obtain a key from [platform.openai.com](https://platform.openai.com).
</Warning>

## Complete .env Template

Here is the full template with all sections for reference. Copy this as a starting point and fill in only the variables your deployment needs:

```ini theme={null}
# ─── Application ─────────────────────────────────────────────────────────────
APP_NAME="Online Store"
APP_ENV=local
APP_KEY=base64:...
APP_URL=http://localhost:8000

# ─── Database ────────────────────────────────────────────────────────────────
# SQLite (development — no server required)
DB_CONNECTION=sqlite

# MySQL / MariaDB (production)
# DB_CONNECTION=mysql
# DB_HOST=127.0.0.1
# DB_PORT=3306
# DB_DATABASE=laravel_store
# DB_USERNAME=root
# DB_PASSWORD=secret

# ─── Social OAuth ────────────────────────────────────────────────────────────
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
FACEBOOK_CLIENT_ID=
FACEBOOK_CLIENT_SECRET=
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=

# ─── AWS S3 / CloudFront ─────────────────────────────────────────────────────
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=my-store-assets-bucket
AWS_URL=https://d111111abcdef8.cloudfront.net
AWS_USE_PATH_STYLE_ENDPOINT=false

# ─── Stripe ──────────────────────────────────────────────────────────────────
STRIPE_KEY=pk_test_...
STRIPE_SECRET=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...

# ─── Paddle Billing ──────────────────────────────────────────────────────────
PADDLE_CLIENT_SIDE_TOKEN=test_...
PADDLE_API_KEY=pdk_...
PADDLE_WEBHOOK_SECRET=pwh_...

# ─── PayPal ──────────────────────────────────────────────────────────────────
PAYPAL_CLIENT_ID=
PAYPAL_CLIENT_SECRET=
PAYPAL_MODE=sandbox

# ─── OpenAI ──────────────────────────────────────────────────────────────────
OPENAI_API_KEY=sk-...
```
