Add LAMP web dashboard: bot→MySQL publisher, PHP API, numbers-only page
- webapp/: deployable LAMP app for /var/www/ — ingest.php (token-gated writes), api.php (public read-only), schema.sql (live_price + signal_reports), vanilla-JS dashboard with plain-English indicator readings, .htaccess, deploy README - web_publisher.py: fire-and-forget publisher (bounded queue + daemon thread) with plain-English payload builder; public API contractually never raises; disabled unless WEBAPP_INGEST_URL/TOKEN are set - telegram_bot.py: publish hooks (tick in WS loop, report in _update_level_cache); _candle_loop per-iteration guard so a failing scan can never kill an auto-scan loop; quiet heartbeat teardown - test_all.py: Module 13 — 6 resilience tests (never-raise contract, worker survival, candle-loop survival); suite 189/189 - .gitignore: webapp/config.php (server-side secrets) Verified end-to-end on a scratch MariaDB 10.11 + PHP 8.3 built-in server incl. headless-Firefox render of the live page. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KYNEHBuwwy6sgRM9f9sPx5
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>ForexBot2 — XAU/USD live signals</title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrap">
|
||||
|
||||
<header class="top">
|
||||
<div>
|
||||
<div class="brand">ForexBot2</div>
|
||||
<div class="pair">XAU/USD · gold spot</div>
|
||||
</div>
|
||||
<div class="hero">
|
||||
<div class="hero-price" id="hero-price">—</div>
|
||||
<div class="hero-meta">
|
||||
<span class="dot" id="feed-dot" aria-hidden="true"></span>
|
||||
<span id="feed-status">connecting…</span>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="banner hidden" id="error-banner" role="alert"></div>
|
||||
|
||||
<nav class="tf-strip" id="tf-strip" aria-label="Timeframes"></nav>
|
||||
|
||||
<main id="detail" aria-live="polite"></main>
|
||||
|
||||
<footer class="foot">
|
||||
<p>Signals refresh automatically at each candle close. Live price
|
||||
updates every ~2 seconds. All times UTC.</p>
|
||||
<p class="muted">Educational information, not financial advice.
|
||||
Trading involves substantial risk of loss.</p>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
<script src="app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user