Files
democratic-money/.env.example
root 7eac42e820 Legal pages, Threads OAuth, live wallet pill, PvP money flow + resume
- Legal: /privacy-policy and /datadeletion (shared LegalPageLayout, footer
  links, sitemap + integration tests, NEXT_PUBLIC_LEGAL_CONTACT_EMAIL).
- Threads OAuth: server-side /api/threads-exchange and /threads-callback
  page (Suspense + client component, noindex, no leaked secrets).
- Username + live wallet pill in top nav. New NavWalletBalance component
  polls /api/wallet, refreshes on tab focus, and listens to the
  `wallet:refresh` event bus so cash-outs and refunds update the nav in
  real time. Flash animation on balance changes.
- useLiveWalletBalance hook now broadcasts `wallet:refresh` after every
  fetch so games, exchange panel, wallet actions, and nav all stay in
  sync without extra polling.
- PvP fund-locking (`POST /api/games/rooms`): creator funds debited
  atomically with room creation; ledger entry tagged with `gameRoomId`.
  Joiner debit happens at join. Old double-debit of the creator is gone.
- DELETE /api/games/rooms?id=... lets a creator cancel a WAITING room
  and get an idempotent refund. Coin Flip + Pong waiting screens show a
  Cancel & Refund button.
- Pong/Coin Flip recovery: expiry sweep + boot-time `recoverOrphaned
  RoomsOnBoot()` (runs before listen()) refund both parties for any
  ACTIVE/expired rooms so a server restart never strands locked credits.
- Schema migration `20260520000000_game_ledger_links` adds optional
  `gameSessionId` + `gameRoomId` FKs to LedgerEntry (with indexes) and
  extra indexes on GameSession/GameRoom for resume + sweep queries.
- GET /api/games/active returns a user's active solo session + open
  rooms (sanitized — no mine/bomb positions). Mines and Tower clients
  rehydrate on mount so a refresh mid-round resumes instead of dropping.
- ActiveGamesBanner surfaces unfinished rounds on /wallet and /casino
  with Resume / Rejoin / Cancel & refund actions.
- ExchangePanel unified with useLiveWalletBalance; per-game header gets
  an "Open wallet →" chip; Dice clears stale result on roll; Blackjack
  reveals full dealer hand on natural blackjack/push; Mines refund
  label fixed; Tower final multiplier fixed; GameHistory error path;
  Prediction "Resolved" tab.
- Site audit + redmeFIXES triage notes (REDME-FIXSES-TRIAGE.txt,
  SITE-AUDIT.txt).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-20 06:43:26 +00:00

48 lines
2.6 KiB
Plaintext

# Copy to .env and fill in values. Never commit .env.
# --- App URLs (local LAN: use your container IP or 127.0.0.1) ---
NEXT_PUBLIC_SITE_URL=http://127.0.0.1:8008
NEXTAUTH_URL=http://127.0.0.1:8008
AUTH_URL=http://127.0.0.1:8008
AUTH_SECRET=generate_a_long_random_string_min_32_chars
# --- Database (PostgreSQL) ---
DATABASE_URL=postgresql://fundraise:fundraise_local_dev@localhost:5432/fundraising
# --- Branding & campaign copy ---
NEXT_PUBLIC_APP_NAME=Democracy Rising
PUBLIC_APP_NAME=Democracy Rising
# Supporter credits (match NEXT_PUBLIC_* for browser — ticker + full name)
PUBLIC_CREDIT_TICKER=BWT
NEXT_PUBLIC_CREDIT_TICKER=BWT
PUBLIC_CREDIT_NAME=Blue Wave Token
NEXT_PUBLIC_CREDIT_NAME=Blue Wave Token
PUBLIC_CAMPAIGN_GOAL_USD=250000
# --- Legal / disclosure placeholders (not legal advice) ---
NEXT_PUBLIC_COMMITTEE_LEGAL_NAME_PLACEHOLDER=Your Committee Legal Name Here
COMMITTEE_LEGAL_NAME_PLACEHOLDER=Your Committee Legal Name Here
NEXT_PUBLIC_DISCLAIMER_TEXT=Contributions are solicited by an authorized political committee. Federal law requires political committees to report contributor information and to retain records in accordance with FEC rules. This statement is general information only and not legal, FEC, or tax advice; consult qualified counsel for your committee obligations.
DISCLAIMER_TEXT=Contributions are solicited by an authorized political committee. Federal law requires political committees to report contributor information and to retain records in accordance with FEC rules. This statement is general information only and not legal, FEC, or tax advice; consult qualified counsel for your committee obligations.
# Privacy / data-deletion requests (shown on /privacy-policy and /datadeletion)
NEXT_PUBLIC_LEGAL_CONTACT_EMAIL=privacy@example.com
# --- Stripe (test keys for development; use restricted keys in shared environments) ---
STRIPE_SECRET_KEY=sk_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
STRIPE_WEBHOOK_SECRET=whsec_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Credits: whole credits granted per CREDIT_RATIO_CENTS_PER_USD cents donated (100 = 1 credit per dollar).
CREDIT_RATIO_CENTS_PER_USD=100
# Straw poll (/vote/next-president): BLW spent per ballot (default 5).
PUBLIC_POLL_VOTE_CREDITS=5
# Optional: Stripe CLI for local webhook forwarding:
# stripe listen --forward-to 127.0.0.1:8008/api/webhooks/stripe
# --- Threads OAuth ---
THREADS_CLIENT_ID=your_threads_client_id
THREADS_CLIENT_SECRET=your_threads_client_secret
THREADS_REDIRECT_URI=https://bwt.democracyrisingbwt.us/threads-callback