[verified] build tourism signal dashboard

This commit is contained in:
Kunthawat Greethong
2026-08-23 07:41:31 +07:00
commit 3e978c5948
19 changed files with 2597 additions and 0 deletions

67
README.md Normal file
View File

@@ -0,0 +1,67 @@
# SET50 Alternative Data Platform
Tourism-first vertical slice for a deterministic SET50 alternative-data research system.
Current scope:
```text
fixture observation
→ Tourism Pulse surprise
→ versioned exposure score
→ ranked target weights
→ English dashboard
→ internal paper ledger
```
No external webhook receiver and no live MT5 execution are enabled.
## Run the backend
```bash
python -m venv .venv
.venv/bin/pip install -r backend/requirements.txt
PAPER_WRITE_TOKEN=local-paper-token PYTHONPATH=backend .venv/bin/python backend/run.py
```
Health check:
```bash
curl http://127.0.0.1:5000/api/v1/health
```
## Run the dashboard
In a second terminal:
```bash
cd frontend
npm install
npm run dev -- --host 127.0.0.1
```
Open `http://127.0.0.1:5173`.
The frontend reads the live API through Vite's `/api` proxy. Paper writes require the operator to unlock an HttpOnly browser session using the backend `PAPER_WRITE_TOKEN`; the token is never embedded in the frontend bundle. The paper-entry action records an assumed fill in the in-memory paper ledger only.
For HTTPS/non-local deployment, set `PAPER_COOKIE_SECURE=1`. The M0 session store is intentionally in-memory and single-process; use a shared session store before running multiple workers or replicas.
## Tests and build
```bash
PYTHONPATH=backend .venv/bin/python -m unittest discover -s backend/tests -v
cd frontend && npm run build
```
## Current M0 boundary
- English UI and analysis vocabulary
- Research mode and paper mode only
- Tourism Pulse fixture adapter
- Data lineage: source, publication time, retrieval time, vintage
- Deterministic surprise × exposure × confidence score
- Paper ledger endpoint
- No LLM call yet; the deterministic result is the source of truth
- No webhook receiver yet
- No MT5 bridge yet
The next implementation step is replacing the fixture with one replayable Tourism source adapter while preserving the same snapshot contract.