Architecture, API, deployment, and operations.
The dashboard shows live stats and recent on-chain actions. The backend monitors market cap and, on every +$50k increment, executes: Collect creator rewards → Buy back 25% of claimed SOL → (Burn step next).
/dashboard every 5s.WALLET_ADDRESS=YourPublicKeyBase58
WALLET_PRIVATE_KEY=YourPrivateKeyBase58 # keep secret (backend env only)
SOLANA_RPC_URL=https://api.mainnet-beta.solana.com
HELIUS_API_KEY=YourHeliusKey
TOKEN_MINT=MintAddressOfYourToken
PRIORITY_FEE=0.000001
FRONTEND_ORIGIN=https://YOUR-VERCEL-APP.vercel.app
Note: Do not expose WALLET_PRIVATE_KEY in the frontend. Backend only.
{"ok": true}
Returns current metrics + recent transactions (for the horizontal cards).
{
"price_usd": 34234.23,
"volume_change_pct": 6212.5,
"buybacks_usd": 10500.0,
"burned_usd": 9500.0,
"market_cap_usd": 325000.0,
"next_goal_usd": 500000.0,
"next_goal_progress_pct": 32.5,
"supply_burned_pct": 9.1,
"transactions": [
{
"signature": "BUYBACK_....",
"kind": "buyback", // claim | buyback | burn
"amount_sol": 1.234,
"status": "confirmed",
"timestamp": "2025-09-25T18:00:00Z",
"description": "Executed buy-back of 1.234 SOL"
}
]
}
Manual trigger (useful for testing). Automatically used by the 50k workflow.
Dev-only helper to force MC thresholds while testing.
curl -X POST http://127.0.0.1:8000/simulate/bump-mc \
-H "Content-Type: application/json" \
-d '{"delta_usd":110000}'
TOKEN_MINT.transactions with a signature for Solscan.Set the backend URL in the page footer:
<script>
window.API_BASE = 'https://your-backend.onrender.com';
</script>
<script src="/app.js"></script>
UI wiring:
#statPrice, #statVolume, #statBuybacks, #statBurned ← stat pills#goalFill (width %) & #goalLabel ← “Next goal” progress#burnFill (width %) & #burnPctLabel ← “Supply burned”#txList ← cards rendered with icons + Solscan linksuvicorn main:app --host 0.0.0.0 --port $PORTFRONTEND_ORIGIN in backend env to your Vercel URL for CORS.Upstream/Portal error, verify env vars (wallet, mint, RPC, Helius key) and backend logs.