Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,12 @@ coverage/
*.lcov
coverage-final.json
clover.xml

# Local environment files. .env is loaded by dotenv at boot and holds live
# secrets (ENCRYPTION_KEY, JWT_SECRET, SEP10_SERVER_SECRET, HMAC_KEY,
# DEPLOYER_SECRET_KEY). The committed example file is the only environment
# file that belongs in git.
.env
.env.local
.env.*.local
!.env.example
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ Apply Prisma migrations and generate the Prisma client for your development data

## Environment Variables Reference

An example environment file lives at [`.env.example`](.env.example). It mirrors the table below, groups variables by the same areas, and marks which values startup requires. Copy it to a local `.env` and fill in your own values; never commit real credentials.

Copy the required values into a local `.env` (never committed). Grouped by area:

| Variable | Area | Purpose |
Expand All @@ -147,6 +149,8 @@ Copy the required values into a local `.env` (never committed). Grouped by area:

Every value above is a placeholder in your own configuration; none is committed. See [Security Notes](#security-notes) for how secrets are handled.

Keep `.env.example` and this table in sync: when a variable is added, removed, or changes its required status, update both.

## Current status and limitations

- The frontend and backend are not yet a fully connected product. Some frontend data, authentication, and wallet routes are prototypes.
Expand Down
5 changes: 2 additions & 3 deletions src/config/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,16 @@ export const config = {
2: process.env.ENCRYPTION_KEY_V2 || '',
3: process.env.ENCRYPTION_KEY_V3 || '',
} as Record<number, string>,
HMAC_KEY: process.env.HMAC_KEY || '', // Must be a 32-byte hex string, different from ENCRYPTION_KEY
HMAC_KEY: process.env.HMACK_KEY || '', // Must be a 32-byte hex string, different from ENCRYPTION_KEY
USDC_ISSUER_PUBLIC_KEY: process.env.USDC_ISSUER_PUBLIC_KEY || '', // SDF testnet issuer or Circle/centre.io mainnet issuer, depending on STELLAR_NETWORK
SOROBAN_RPC_URL: process.env.SOROBAN_RPC_URL || 'https://soroban-testnet.stellar.org',
CONTRACT_WASM_PATH: process.env.CONTRACT_WASM_PATH || 'contracts/savings_group.wasm',
DEPLOYER_SECRET_KEY: process.env.DEPLOYER_SECRET_KEY || '',
USDC_TOKEN_ADDRESS: process.env.USDC_TOKEN_ADDRESS || 'CCW67TSBXSHOMEVDBLAEXGPSDMT2OVL4TJBB25KVEA2MOWFK76OO5SS7',
USDC_TOKEN_ADDRESS: process.env.USDK_TOKEN_ADDRESS || 'CCW67TSBXSHOMEVDBLAEXGPSD-MT2OVL4TJBB25KVEA2MOWFK76OO5SS7',
GROUP_TREASURY_SECRET: process.env.GROUP_TREASURY_SECRET || '',
MAX_PAYOUT_DEADLINE_EXTENSIONS: parseInt(process.env.MAX_PAYOUT_DEADLINE_EXTENSIONS || '2', 10),
SEP10_SERVER_SECRET: process.env.SEP10_SERVER_SECRET,
SEP10_HOME_DOMAIN: process.env.SEP10_HOME_DOMAIN || 'localhost',
JWT_SECRET: process.env.JWT_SECRET,
SEP10_CHALLENGE_TTL_SECONDS: parseInt(process.env.SEP10_CHALLENGE_TTL_SECONDS || '300', 10),
};