> For the complete documentation index, see [llms.txt](https://docs.eitherway.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.eitherway.ai/documentation/engineering/editor.md).

# Environment & Credentials

Eitherway separates configuration by environment to keep builds deterministic and secrets safe.

### Environments

| Environment         | Purpose                                     |
| ------------------- | ------------------------------------------- |
| **Local Workspace** | Development servers and preview deployments |
| **Build Runners**   | Temporary variables for compilation         |
| **Runtime**         | Production settings managed by host         |

***

#### Secrets Management

Best practices:

1. Store credentials in a dedicated vault or secret manager
2. Rotate keys regularly
3. Apply minimal access permissions
4. Conceal values in logging systems
5. Never hardcode into source control
6. Use distinct keys per environment and service

***

#### **Naming Conventions**

Recommended format:

`API_URL` \
`AUTH_ISSUER` \
`STRIPE_KEY` \
`FIREBASE_PROJECT`\
`WALLETCONNECT_PROJECT` \
`ALCHEMY_API_KEY` \
`PINATA_JWT`

Optional environment suffixes: `_DEV`, `_STAGE`, `_PROD`.

#### Required Environment Variables

| Variable                   | Purpose                 | Required   |
| -------------------------- | ----------------------- | ---------- |
| `ANTHROPIC_API_KEY`        | Claude AI               | Yes        |
| `OPENAI_API_KEY`           | DALL-E image generation | Yes        |
| `POSTGRES_*`               | Database connection     | Yes        |
| `PRIVY_APP_ID`             | Authentication          | Yes        |
| `PRIVY_APP_SECRET`         | Authentication          | Yes        |
| `ALCHEMY_API_KEY`          | EVM blockchain RPC      | Yes (Web3) |
| `PINATA_JWT`               | IPFS storage            | Yes (NFTs) |
| `WALLETCONNECT_PROJECT_ID` | Wallet connection       | Yes (Web3) |
| `DEPLOYER_PRIVATE_KEY`     | Contract deployment     | Yes (Web3) |
| `ENCRYPTION_KEY`           | Credential encryption   | Yes        |
| `SUPABASE_*`               | Backend service         | Optional   |

***

### Injection

1. Create `.env.example` from prompt requirements.
2. Keep real values in a secret store.
3. Build runners receive scoped secrets; web hosts receive runtime secrets.

<figure><img src="/files/ZzJyICVuw7Hoei7i5VAJ" alt="" width="375"><figcaption></figcaption></figure>

#### For Web3 applications

• Secure handling of wallet connections and signing\
• Integration with on-chain interactions and smart contract execution\
• No exposure of sensitive keys within the application layer

All credentials are managed within a controlled execution environment to ensure security, isolation, and reliability.
