superapp-finance

crypto

270 file · 80.3 MB

Sistem informasi live — crypto-weld-phi.vercel.appBuka di tab baru

README

Cryptosphere — Private Crypto Investment Terminal

A single-owner, Bloomberg-grade crypto and macro intelligence terminal. The root page (index.html) is the canonical command center; the site is gated behind a server-side auth layer (see Authentication below).

For architecture, setup, conventions, and the live development plan, read DEVELOPER.md. The /dev page renders the project plan, health checks, and audit log at runtime.

Sections

PathRole
/Command-center dashboard (canonical home)
/bitcoin/BTC cockpit: probability, research, levels, risk, strategy, calculator, history
/bloomberg/9-workspace Bloomberg-style terminal (macro wire, IB research, cross-asset, ETF flows, econ calendar, central banks, geopolitics)
/analytics/Market, DeFi, derivatives, onchain, macro, institutional, sentiment, manipulation
/tools/Trading tools (screener, journal, portfolio, trading-bot, calculators, etc.)
/intelligence/, /research/, /knowledge/Research & education hubs
/dev/Developer area (project plan, health checks, audit log)

Authentication

Real authentication is enforced server-side by Vercel Edge middleware (middleware.js): protected HTML is never served until a signed crypto_session cookie is valid. Login flows through /login.htmlPOST /api/login (scrypt verify, IP rate-limit, signed cookie). Logout via /api/logout.

First-time setup (production)

  1. Generate credentials locally:
    node scripts/hash-password.mjs
    
  2. In the Vercel dashboard set these environment variables:
    • CRYPTO_PASSWORD_HASH (scrypt hash from step 1)
    • CRYPTO_SESSION_SECRET (32-byte hex from step 1)
    • DATABASE_URL (Neon Postgres)
  3. Deploy. Visit / → you should be redirected to /login.html.

The legacy plaintext credential is considered compromised (it lived in git history). Do not reuse it.

Intel Snapshot Pipeline

A resilient crypto intelligence snapshot generator feeds the dashboards:

  • Script: scripts/build-intel-snapshot.mjs
  • Output: assets/data/intel-snapshot.json
  • Covers: market breadth, derivatives, stablecoins, on-chain, DeFi TVL, macro (Fed + BLS + FRED), Fed liquidity / cross-asset pulse + FOMC schedule, BTC psychological milestones + halving-cycle history, spot ETF flow proxy, influencer track-record engine, cross-source signal-reliability matrix, regulatory wire (SEC + Fed), and a cross-source synthesis lab.

Manual refresh

node scripts/build-intel-snapshot.mjs

Automated refresh (GitHub Actions)

  • File: .github/workflows/intel-snapshot-refresh.yml
  • Trigger: every 6 hours + manual (workflow_dispatch)
  • Behavior: rebuild snapshot, commit + push only when the JSON changes.

A second workflow (.github/workflows/btc-history-refresh.yml) rebuilds the BTC price-action history dataset in assets/data/btc-history/*.json.

Data layer (Vercel serverless)

EndpointPurpose
/api/snapshotLatest intel snapshot (Neon → static JSON fallback)
/api/coingecko/:path*Same-origin CoinGecko proxy (cached at edge)
/api/probability-historyProbability history (Neon, GET/POST)
/api/login, /api/logoutServer-side auth
/api/snapshot-builder-webhookIngests snapshots from GitHub Actions

Notes

  • This site is private/educational and not indexed (see robots.txt).
  • Each data panel labels its source freshness honestly (live / snapshot / delayed / illustrative).
  • See DEVELOPER.md for the "merge before delete" convention and the parked-items list used to coordinate multi-agent work.

File Utama

  • .dockerignore
  • .env.example
  • .env.local.example
  • .gitignore
  • .vercelignore
  • 404.html
  • CRYPTO_FEATURE_AUDIT.md
  • DEVELOPER.md