mirror of
https://github.com/Such-Software/smirk-backend-core.git
synced 2026-10-17 07:21:32 +02:00
examples/: an operator "cookbook" turning the backend's composable knobs (registration gates, relay write policy, restore policy, feature flags) into ready-to-run recipes per persona — personal, public-free (what the reference instance runs), friends, paid-access, community, and paid-relay (the flagship: free wallet + paid premium Nostr posting). Plus LEGAL_AND_OPS.md, a not-legal-advice considerations checklist that points operators at their own counsel and at the project's own published docs as a worked example. Recipes use placeholders only. docs/design/premium-relay.md: the premium-relay feature spec (reconciled to the shipped design — dedicated premium_invoices table, transactional activate).
58 lines
2.0 KiB
Bash
58 lines
2.0 KiB
Bash
# ── Recipe: public-free ──────────────────────────────────────────────────────
|
|
# A free, open public instance — anyone can register and use the wallet; spam is
|
|
# gated by proof-of-work, not payment. This is (minus secrets) what the reference
|
|
# instance api.smirk.cash runs.
|
|
#
|
|
# Start from ../../.env.example and apply the lines below. openssl rand -hex 32
|
|
# for each secret.
|
|
# ─────────────────────────────────────────────────────────────────────────────
|
|
|
|
SERVER_HOST=127.0.0.1
|
|
SERVER_PORT=8081
|
|
PUBLIC_API_URL=https://api.your-domain.example/api/v1
|
|
ENVIRONMENT=production
|
|
INSTANCE_ID=public-1
|
|
|
|
DATABASE_URL=postgresql:///smirk_v3_db?host=/var/run/postgresql
|
|
|
|
# Secrets (REQUIRED; openssl rand -hex 32 each).
|
|
JWT_SECRET=
|
|
SEED_FINGERPRINT_PEPPER=
|
|
REFRESH_TOKEN_PEPPER=
|
|
IP_SALT=
|
|
ALTCHA_HMAC_KEY=
|
|
ADMIN_KEY_INTEGRITY_SECRET=
|
|
|
|
# Free registration, spam-gated by compute (ALTCHA proof-of-work).
|
|
POW_REQUIRED=true
|
|
REGISTRATION_REQUIRE_INVITE=false
|
|
REGISTRATION_REQUIRE_PAYMENT=false
|
|
|
|
# Bounded restore, PoW-priced by depth (protects your LWS/node from deep backfills;
|
|
# a user needing more runs their own instance).
|
|
WALLET_RESTORE_POLICY=bounded
|
|
WALLET_MAX_RESTORE_DEPTH_DAYS=365
|
|
WALLET_RESTORE_POW_FREE_DAYS=90
|
|
WALLET_RESTORE_POW_DAYS_PER_BIT=30
|
|
WALLET_RESTORE_POW_MAX_BITS=24
|
|
|
|
FEATURE_PRICES=true
|
|
FEATURE_TIPS=false
|
|
|
|
# Relay off at launch. To run it, see the `friends` (locked-down) or `paid-relay`
|
|
# (monetized) recipes.
|
|
RELAY_ENABLED=false
|
|
|
|
# Admin HTTP plane off at launch; enable + bootstrap a key when you need it.
|
|
ADMIN_ENABLED=false
|
|
|
|
# Chain endpoints — reuse your existing daemons / LWS. 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=
|