import Link from "next/link"; const STACK = [ { layer: "Account Storage", what: "All accounts are stored in browser localStorage under cyberlux-accounts-v1.", how: "Passwords are hashed SHA-256 with a static pepper before storage. No server ever receives your password.", honest: "SHA-256 with a static pepper is not as strong as Argon2/bcrypt. Suitable for a local-first demo — not a production secret store.", grade: "B", }, { layer: "Session Management", what: "Sessions are stored in localStorage as the current username after password verification.", how: "No JWT or server-side token. Session is simply the username string persisted until sign-out.", honest: "There is no token expiry or rotation. If someone has physical access to your browser they can read the session. Use private/incognito mode for isolation.", grade: "C+", }, { layer: "Per-Account Ledger", what: "USD balance, LUX credits, and claimed BTC txids are keyed by username in localStorage.", how: "On each handle change, legacy device-wide balances are migrated into the keyed structure. Ledger key: cyberlux-account-ledger-v1.", honest: "Data is client-side only. Clearing localStorage wipes balances. Export your account bundle from /dashboard to back up.", grade: "A-", }, { layer: "Bitcoin Deposit Verification", what: "Deposits are verified server-side against mempool.space (on-chain) and CoinGecko (BTC/USD rate).", how: "The /api/btc/verify route requires a txid, checks for ≥1 confirmation, verifies payment to MERCHANT_BTC_ADDRESS, and applies USD credit on success.", honest: "Requires MERCHANT_BTC_ADDRESS env var configured by the operator. Without it, the endpoint returns a configuration error. One-confirmation threshold — standard.", grade: "A", }, { layer: "Vault / Receipt Store", what: "Vault is per-handle (cyberlux:vault:v2:). Stores keys, receipts, and flags.", how: "Receipts are written on checkout and mixer actions. Migration from legacy v1 (device-wide) runs once on first sign-in.", honest: "Contents are plaintext JSON in localStorage. Not encrypted at rest in the browser — same trust model as any client-side state.", grade: "B+", }, { layer: "Network Architecture", what: "Next.js app deployable behind Tor hidden services via Nginx loopbacks.", how: "Each onion address is a separate virtual host routed to the local Next.js process. Configured via systemd + nginx conf blocks documented in DEPLOY.md.", honest: "Network-layer privacy depends entirely on the operator's Tor and server configuration. The app itself does not configure Tor — see DEPLOY.md.", grade: "Operator-dependent", }, ]; const GRADE_COLOR: Record = { "A": "bg-green-900/30 text-green-400 border-green-800", "A-": "bg-green-900/20 text-green-400 border-green-800", "B+": "bg-emerald-900/20 text-emerald-400 border-emerald-800", "B": "bg-cyan-900/20 text-cyan-400 border-cyan-800", "C+": "bg-yellow-900/20 text-yellow-400 border-yellow-800", "Operator-dependent": "bg-gray-800 text-gray-400 border-gray-700", }; export default function SecurityAnalysisPage() { return (

Architecture Breakdown

Real technical analysis of the CyberLux stack

⚠️
Honest Architecture Document

This is a real technical breakdown of how CyberLux actually works — not a marketing audit. Grades reflect the actual security posture of each layer. Where limitations exist, they are explicitly noted. Read DEPLOY.md for operator-level configuration.

TECHNICAL BREAKDOWN

CyberLux Architecture

Layer-by-layer analysis of the actual security model: account storage, session management, Bitcoin verification, vault, and network architecture. Honest grades included.

{STACK.map((s) => (
{s.grade}
))}

Layer Analysis

{STACK.map((s) => (

{s.layer}

{s.what}

{s.grade}
How it works: {s.how}
Honest assessment: {s.honest}
))}

Practical OPSEC Guide

{[ { title: "Use Tor Browser on .onion deployments", body: "Safari and Chrome cannot resolve .onion hostnames. Tor Browser is required for accessing the onion version of this site." }, { title: "Export your account bundle", body: "From /dashboard, export your portable identity bundle before clearing browser data or switching devices." }, { title: "Verify the BTC address each session", body: "Before sending any Bitcoin, confirm the merchant address matches the one you used last session. Phishing clones will substitute their own address." }, { title: "localStorage is not encrypted at rest", body: "Your browser's localStorage is readable by JavaScript from the same origin. Do not store high-value secrets here beyond what the app requires." }, { title: "One-confirmation BTC threshold", body: "The deposit system credits after 1 confirmation — fast but not fully final. For large amounts, wait for 6 confirmations before spending the credited USD." }, { title: "Operator must configure .env", body: "MERCHANT_BTC_ADDRESS and optional NEXT_PUBLIC_BITCOIN_CHECKOUT_URL must be set in .env.local. Without these, Bitcoin verify returns a config error." }, ].map((item) => (
{item.title}

{item.body}

))}
ARB Academy for more →
); }