mirror of
https://github.com/Such-Software/smirk-backend-core.git
synced 2026-10-17 07:21:32 +02:00
Add ready-to-run .env + README recipes (personal, public-free, friends, paid-access, paid-relay, community) and the premium-relay design overview, with audit fixes to the config template and spec: - Drop the inert INSTANCE_ID knob (config never read it) and document the real per-node id, which is derived from ADMIN_PUBLIC_URL. - Warn that a placeholder PUBLIC_API_URL is rejected at boot in production (Nostr identity is on by default); soften the recipe "boots today" status. - Remove dead template vars: BTC/LTC Core-RPC settings and the non-existent PUBLIC_EXPOSE_FEATURES (replaced with the real per-field landing switches). - Mark ALTCHA_HMAC_KEY conditional in PoW-off recipes; blank placeholder payment creds so a recipe doesn't ship a key that fails validation. - Fix premium-relay spec drift: the migration creates no premium_until index, disabled endpoints return 400/200 (not 404), and neutralize operator voice.
62 lines
2.2 KiB
Bash
62 lines
2.2 KiB
Bash
# ── Recipe: paid-access ──────────────────────────────────────────────────────
|
|
# A paid hosted wallet backend: a one-time fee gates NEW wallet creation (existing
|
|
# wallets and self-hosters bypass it). Non-custodial and pull-model — the backend
|
|
# only READS invoice status; funds go straight to your own wallet.
|
|
#
|
|
# ⚠️ Charging a fee has operational + legal implications — see ../LEGAL_AND_OPS.md.
|
|
#
|
|
# Start from ../../.env.example and apply the lines below. openssl rand -hex 32
|
|
# for each secret.
|
|
# ─────────────────────────────────────────────────────────────────────────────
|
|
|
|
SERVER_HOST=127.0.0.1
|
|
SERVER_PORT=8080
|
|
# REQUIRED: replace with YOUR real https domain. The your-domain.example placeholder
|
|
# is rejected at boot in production (Nostr identity is on by default).
|
|
PUBLIC_API_URL=https://api.your-domain.example/api/v1
|
|
ENVIRONMENT=production
|
|
|
|
DATABASE_URL=postgresql:///smirk?host=/var/run/postgresql
|
|
|
|
JWT_SECRET=
|
|
SEED_FINGERPRINT_PEPPER=
|
|
REFRESH_TOKEN_PEPPER=
|
|
IP_SALT=
|
|
ALTCHA_HMAC_KEY=
|
|
ADMIN_KEY_INTEGRITY_SECRET=
|
|
|
|
# Pay-to-register: a settled invoice is required to create a new wallet. Compose
|
|
# with PoW if you like (FEATURE_POW is the master switch; POW_REQUIRED alone is
|
|
# inert). Returning wallets never pay again.
|
|
FEATURE_POW=true
|
|
POW_REQUIRED=true
|
|
REGISTRATION_REQUIRE_INVITE=false
|
|
REGISTRATION_REQUIRE_PAYMENT=true
|
|
|
|
# Processor (BTCPay-compatible; also served by xmrcheckout / wowcheckout). Price
|
|
# is fiat-denominated here (payable in any coin the processor offers).
|
|
PAYMENT_PROVIDER=btcpay
|
|
PAYMENT_PROVIDER_URL=https://pay.your-domain.example
|
|
PAYMENT_STORE_ID=
|
|
PAYMENT_API_KEY=
|
|
PAYMENT_AMOUNT=5
|
|
PAYMENT_CURRENCY=USD
|
|
PAYMENT_CONFIRMATIONS=1
|
|
PAYMENT_EXPIRES_MINUTES=60
|
|
|
|
WALLET_RESTORE_POLICY=bounded
|
|
WALLET_MAX_RESTORE_DEPTH_DAYS=365
|
|
FEATURE_PRICES=true
|
|
FEATURE_TIPS=false
|
|
RELAY_ENABLED=false
|
|
|
|
# Chain endpoints — see ../../.env.example.
|
|
XMR_LWS_URL=
|
|
XMR_LWS_ADMIN_URL=
|
|
XMR_LWS_ADMIN_KEY=
|
|
XMR_DAEMON_URL=
|
|
WOW_LWS_URL=
|
|
WOW_LWS_ADMIN_URL=
|
|
WOW_LWS_ADMIN_KEY=
|
|
WOW_DAEMON_URL=
|