feat(deploy): single-container Docker packaging (nginx + Flask + prebuilt SPA)

Add self-contained Docker deployment for EasyPanel / docker-compose:

- Dockerfile: python:3.11-slim + nginx. Serves the PREBUILT Vue SPA
  (frontend/dist, committed) via nginx and reverse-proxies /api to the Flask
  backend on 127.0.0.1:5000. No node/npm in the image (avoids Vite/npm
  flakiness in Docker builds). VOLUME /app/backend/data for persistence
  (factor vintages, dividend ledger, forward runs, prices). HEALTHCHECK hits
  /api/v1/dashboard/summary. Exposes :80.
- deploy/nginx.conf: SPA fallback + /api proxy to 127.0.0.1:5000 + gzip.
- deploy/entrypoint.sh: starts Flask (HOST=0.0.0.0:5000) + nginx foreground,
  forwards signals.
- docker-compose.yml: single service 'set50', port 8080:80, mounts
  ./backend/data for persistence, healthcheck.
- .dockerignore excludes .git/.venv/backend/data/node_modules/docs.
- .gitignore now tracks frontend/dist/ (prebuilt bundle required by the
  image); backend/data stays untracked.
- Backend runtime verified: test_client GET /api/v1/dashboard/summary=200
  (the HEALTHCHECK path). entrypoint sh -n, compose YAML parse, and all
  Dockerfile-referenced files exist. NOTE: no local docker here, so the
  image itself was not built — that happens on EasyPanel.
This commit is contained in:
Kunthawat Greethong committed 2026-08-27 13:26:58 +07:00
1 parent f3fad16183
commit f9b8cd10b2
9 files changed
+170 -1

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
.git
.venv
.hermes
__pycache__
*.pyc
.pytest_cache
backend/.pytest_cache
backend/data
backend/.venv
frontend/node_modules
reports
.DS_Store
.env
docs
+2 -1
View File
@@ -6,5 +6,6 @@ __pycache__/
backend/.pytest_cache/ backend/.pytest_cache/
backend/data/ backend/data/
frontend/node_modules/ frontend/node_modules/
frontend/dist/ # note: frontend/dist/ is intentionally TRACKED (prebuilt static bundle used by
# the Docker image — see Dockerfile). Rebuild with `cd frontend && npm run build`.
reports/ reports/
+40
View File
@@ -0,0 +1,40 @@
# SET50 alternative-data platform - single-container image.
# Serves: built Vue SPA (frontend/dist) via nginx, proxying /api to the
# Flask backend (127.0.0.1:5000). Data persists under /app/backend/data
# (mount a volume there or set DATA_DIR to a mounted path).
#
# Build strategy: PREBUILT frontend dist (no node/npm/vite in this image) —
# build with `cd frontend && npm run build` and commit frontend/dist/.
FROM python:3.11-slim
# nginx for serving the SPA
RUN apt-get update && apt-get install -y --no-install-recommends nginx \
&& rm -rf /var/lib/apt/lists/* \
&& rm -f /etc/nginx/sites-enabled/default /etc/nginx/conf.d/default.conf 2>/dev/null || true
WORKDIR /app
# 1) frontend static (prebuilt) — must exist on-disk (committed)
COPY frontend/dist/ ./frontend/dist/
# 2) backend deps + code
COPY backend/requirements.txt ./backend/requirements.txt
RUN pip install --no-cache-dir -r backend/requirements.txt
COPY backend/ ./backend/
# 3) deploy config (nginx conf + entrypoint)
COPY deploy/nginx.conf /etc/nginx/conf.d/set50.conf
COPY deploy/entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
# persistent data (factor vintages, dividend ledger, forward runs, prices)
ENV DATA_DIR=/app/backend/data
ENV HOST=0.0.0.0
ENV PORT=5000
VOLUME ["/app/backend/data"]
EXPOSE 80
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD python -c "import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://127.0.0.1/api/v1/dashboard/summary', timeout=4).status==200 else 1)"
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
+26
View File
@@ -0,0 +1,26 @@
#!/usr/bin/env sh
set -e
# Start the Flask backend on 0.0.0.0:5000 (bind all interfaces so nginx can
# proxy to it inside the container). DATA_DIR is /app/backend/data by default
# (a mounted volume makes it survive container recreate).
cd /app/backend
export HOST="${HOST:-0.0.0.0}"
export PORT="${PORT:-5000}"
export PAPER_BIND_HOST="$HOST"
# pid1 helper: run nginx in foreground + Flask subprocess so the container
# stays alive and signals are handled. Keep it simple and robust.
# Start Flask in the background
python run.py &
FLASK_PID=$!
# Start nginx in the foreground (its own master + workers)
nginx -g "daemon off;" &
NGINX_PID=$!
# forward signals to both and wait
trap 'kill $FLASK_PID $NGINX_PID 2>/dev/null || true' INT TERM
wait $FLASK_PID
wait $NGINX_PID
+29
View File
@@ -0,0 +1,29 @@
# nginx: serve the built Vue SPA + reverse-proxy /api to the Flask backend.
server {
listen 80;
server_name _;
root /app/frontend/dist;
index index.html;
# SPA fallback: any non-API GET that isn't a real file -> index.html
location / {
try_files $uri $uri/ /index.html;
}
# API traffic goes to the Flask backend on 127.0.0.1:5000
location /api/ {
proxy_pass http://127.0.0.1:5000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 120s;
}
# never serve dotfiles
location ~ /\. { deny all; }
gzip on;
gzip_types text/css application/javascript application/json;
}
+26
View File
@@ -0,0 +1,26 @@
# Local/self-hosted single-container run for the SET50 alternative-data platform.
# Production (EasyPanel) builds from the Dockerfile directly; this compose file
# adds a persistent volume so factor vintages, the dividend ledger, forward runs
# and prices survive container recreate.
services:
set50:
build: .
image: set50-alternative-data:latest
ports:
- "8080:80"
environment:
# bind backend on all interfaces inside the container (nginx proxies /api)
HOST: "0.0.0.0"
PORT: "5000"
PAPER_BIND_HOST: "0.0.0.0"
# optional: make the dividend refresh faster for demos ()
# DIVIDEND_REFRESH_COOLDOWN_SECONDS: "300"
volumes:
- ./backend/data:/app/backend/data
restart: unless-stopped
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://127.0.0.1/api/v1/dashboard/summary', timeout=4).status==200 else 1)"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
+18
View File
@@ -0,0 +1,18 @@
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))n(l);new MutationObserver(l=>{for(const i of l)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function s(l){const i={};return l.integrity&&(i.integrity=l.integrity),l.referrerPolicy&&(i.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?i.credentials="include":l.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(l){if(l.ep)return;l.ep=!0;const i=s(l);fetch(l.href,i)}})();/**
* @vue/shared v3.5.41
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function bn(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const Q={},At=[],ze=()=>{},yl=()=>!1,Ns=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ls=e=>e.startsWith("onUpdate:"),be=Object.assign,yn=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},Ai=Object.prototype.hasOwnProperty,J=(e,t)=>Ai.call(e,t),L=Array.isArray,Mt=e=>us(e)==="[object Map]",Lt=e=>us(e)==="[object Set]",Hn=e=>us(e)==="[object Date]",V=e=>typeof e=="function",re=e=>typeof e=="string",Ge=e=>typeof e=="symbol",Z=e=>e!==null&&typeof e=="object",xl=e=>(Z(e)||V(e))&&V(e.then)&&V(e.catch),wl=Object.prototype.toString,us=e=>wl.call(e),Mi=e=>us(e).slice(8,-1),Sl=e=>us(e)==="[object Object]",xn=e=>re(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Yt=bn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),js=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},Ri=/-\w/g,Ie=js(e=>e.replace(Ri,t=>t.slice(1).toUpperCase())),Ii=/\B([A-Z])/g,Et=js(e=>e.replace(Ii,"-$1").toLowerCase()),Cl=js(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ys=js(e=>e?`on${Cl(e)}`:""),We=(e,t)=>!Object.is(e,t),Ts=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},Tl=(e,t,s,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},Vs=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Bn;const $s=()=>Bn||(Bn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ss(e){if(L(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],l=re(n)?Li(n):ss(n);if(l)for(const i in l)t[i]=l[i]}return t}else if(re(e)||Z(e))return e}const Fi=/;(?![^(]*\))/g,Di=/:([^]+)/,Ni=/\/\*[^]*?\*\//g;function Li(e){const t={};return e.replace(Ni,"").split(Fi).forEach(s=>{if(s){const n=s.split(Di);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function ee(e){let t="";if(re(e))t=e;else if(L(e))for(let s=0;s<e.length;s++){const n=ee(e[s]);n&&(t+=n+" ")}else if(Z(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const ji="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Vi=bn(ji);function El(e){return!!e||e===""}function $i(e,t){if(e.length!==t.length)return!1;let s=!0;for(let n=0;s&&n<e.length;n++)s=jt(e[n],t[n]);return s}function jt(e,t){if(e===t)return!0;let s=Hn(e),n=Hn(t);if(s||n)return s&&n?e.getTime()===t.getTime():!1;if(s=Ge(e),n=Ge(t),s||n)return e===t;if(s=L(e),n=L(t),s||n)return s&&n?$i(e,t):!1;if(s=Z(e),n=Z(t),s||n){if(!s||!n)return!1;const l=Object.keys(e).length,i=Object.keys(t).length;if(l!==i)return!1;for(const o in e){const a=e.hasOwnProperty(o),u=t.hasOwnProperty(o);if(a&&!u||!a&&u||!jt(e[o],t[o]))return!1}}return String(e)===String(t)}function wn(e,t){return e.findIndex(s=>jt(s,t))}const Ol=e=>!!(e&&e.__v_isRef===!0),_=e=>re(e)?e:e==null?"":L(e)||Z(e)&&(e.toString===wl||!V(e.toString))?Ol(e)?_(e.value):JSON.stringify(e,kl,2):String(e),kl=(e,t)=>Ol(t)?kl(e,t.value):Mt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,l],i)=>(s[Xs(n,i)+" =>"]=l,s),{})}:Lt(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>Xs(s))}:Ge(t)?Xs(t):Z(t)&&!L(t)&&!Sl(t)?String(t):t,Xs=(e,t="")=>{var s;return Ge(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};/**
* @vue/reactivity v3.5.41
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let he;class Hi{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&he&&(he.active?(this.parent=he,this.index=(he.scopes||(he.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes){const n=this.scopes.slice();for(t=0,s=n.length;t<s;t++)n[t].pause()}for(t=0,s=this.effects.length;t<s;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,s;if(this.scopes){const l=this.scopes.slice();for(t=0,s=l.length;t<s;t++)l[t].resume()}const n=this.effects.slice();for(t=0,s=n.length;t<s;t++)n[t].resume()}}run(t){if(this._active){const s=he;try{return he=this,t()}finally{he=s}}}on(){++this._on===1&&(this.prevScope=he,he=this)}off(){if(this._on>0&&--this._on===0){if(he===this)he=this.prevScope;else{let t=he;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let s,n;for(s=0,n=this.effects.length;s<n;s++)this.effects[s].stop();for(this.effects.length=0,s=0,n=this.cleanups.length;s<n;s++)this.cleanups[s]();if(this.cleanups.length=0,this.scopes){const l=this.scopes.slice();for(s=0,n=l.length;s<n;s++)l[s].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const l=this.parent.scopes.pop();l&&l!==this&&(this.parent.scopes[this.index]=l,l.index=this.index)}this.parent=void 0}}}function Bi(){return he}let te;const Zs=new WeakSet;class Pl{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,he&&(he.active?he.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Zs.has(this)&&(Zs.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Ml(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Kn(this),Rl(this);const t=te,s=Fe;te=this,Fe=!0;try{return this.fn()}finally{Il(this),te=t,Fe=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Tn(t);this.deps=this.depsTail=void 0,Kn(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Zs.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){cn(this)&&this.run()}get dirty(){return cn(this)}}let Al=0,Xt,Zt;function Ml(e,t=!1){if(e.flags|=8,t){e.next=Zt,Zt=e;return}e.next=Xt,Xt=e}function Sn(){Al++}function Cn(){if(--Al>0)return;if(Zt){let t=Zt;for(Zt=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;Xt;){let t=Xt;for(Xt=void 0;t;){const s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=s}}if(e)throw e}function Rl(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Il(e){let t,s=e.depsTail,n=s;for(;n;){const l=n.prevDep;n.version===-1?(n===s&&(s=l),Tn(n),Ki(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=l}e.deps=t,e.depsTail=s}function cn(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Fl(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Fl(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===ns)||(e.globalVersion=ns,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!cn(e))))return;e.flags|=2;const t=e.dep,s=te,n=Fe;te=e,Fe=!0;try{Rl(e);const l=e.fn(e._value);(t.version===0||We(l,e._value))&&(e.flags|=128,e._value=l,t.version++)}catch(l){throw t.version++,l}finally{te=s,Fe=n,Il(e),e.flags&=-3}}function Tn(e,t=!1){const{dep:s,prevSub:n,nextSub:l}=e;if(n&&(n.nextSub=l,e.prevSub=void 0),l&&(l.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let i=s.computed.deps;i;i=i.nextDep)Tn(i,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function Ki(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let Fe=!0;const Dl=[];function ct(){Dl.push(Fe),Fe=!1}function ut(){const e=Dl.pop();Fe=e===void 0?!0:e}function Kn(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=te;te=void 0;try{t()}finally{te=s}}}let ns=0;class Ui{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class En{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!te||!Fe||te===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==te)s=this.activeLink=new Ui(te,this),te.deps?(s.prevDep=te.depsTail,te.depsTail.nextDep=s,te.depsTail=s):te.deps=te.depsTail=s,Nl(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const n=s.nextDep;n.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=n),s.prevDep=te.depsTail,s.nextDep=void 0,te.depsTail.nextDep=s,te.depsTail=s,te.deps===s&&(te.deps=Line truncated
* @vue/runtime-core v3.5.41
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function fs(e,t,s,n){try{return n?e(...n):e()}catch(l){Bs(l,t,s)}}function Ne(e,t,s,n){if(V(e)){const l=fs(e,t,s,n);return l&&xl(l)&&l.catch(i=>{Bs(i,t,s)}),l}if(L(e)){const l=[];for(let i=0;i<e.length;i++)l.push(Ne(e[i],t,s,n));return l}}function Bs(e,t,s,n=!0){const l=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||Q;if(t){let a=t.parent;const u=t.proxy,h=`https://vuejs.org/error-reference/#runtime-${s}`;for(;a;){const p=a.ec;if(p){for(let x=0;x<p.length;x++)if(p[x](e,u,h)===!1)return}a=a.parent}if(i){ct(),fs(i,null,10,[e,u,h]),ut();return}}mo(e,s,l,n,o)}function mo(e,t,s,n=!0,l=!1){if(l)throw e;console.error(e)}const xe=[];let Be=-1;const Rt=[];let gt=null,Pt=0;const Ul=Promise.resolve();let As=null;function Wl(e){const t=As||Ul;return e?t.then(this?e.bind(this):e):t}function _o(e){let t=Be+1,s=xe.length;for(;t<s;){const n=t+s>>>1,l=xe[n],i=is(l);i<e||i===e&&l.flags&2?t=n+1:s=n}return t}function Mn(e){if(!(e.flags&1)){const t=is(e),s=xe[xe.length-1];!s||!(e.flags&2)&&t>=is(s)?xe.push(e):xe.splice(_o(t),0,e),e.flags|=1,ql()}}function ql(){As||(As=Ul.then(Jl))}function bo(e){if(!L(e))gt&&e.id===-1?gt.splice(Pt+1,0,e):e.flags&1||(Rt.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)Rt.push(e[t]);ql()}function Wn(e,t,s=Be+1){for(;s<xe.length;s++){const n=xe[s];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;xe.splice(s,1),s--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function zl(e){if(Rt.length){const t=[...new Set(Rt)].sort((s,n)=>is(s)-is(n));if(Rt.length=0,gt){for(let s=0;s<t.length;s++)gt.push(t[s]);return}for(gt=t,Pt=0;Pt<gt.length;Pt++){const s=gt[Pt];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}gt=null,Pt=0}}const is=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Jl(e){try{for(Be=0;Be<xe.length;Be++){const t=xe[Be];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),fs(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Be<xe.length;Be++){const t=xe[Be];t&&(t.flags&=-2)}Be=-1,xe.length=0,zl(),As=null,(xe.length||Rt.length)&&Jl()}}let Me=null,Gl=null;function Ms(e){const t=Me;return Me=e,Gl=e&&e.type.__scopeId||null,t}function yo(e,t=Me,s){if(!t||e._n)return e;const n=(...l)=>{n._d&&sl(-1);const i=Ms(t),o=Tt.length;let a;try{a=e(...l)}finally{for(let u=Tt.length;u>o;u--)yi();Ms(i),n._d&&sl(1)}return a};return n._n=!0,n._c=!0,n._d=!0,n}function bt(e,t){if(Me===null)return e;const s=zs(Me),n=e.dirs||(e.dirs=[]);for(let l=0;l<t.length;l++){let[i,o,a,u=Q]=t[l];i&&(V(i)&&(i={mounted:i,updated:i}),i.deep&&at(o),n.push({dir:i,instance:s,value:o,oldValue:void 0,arg:a,modifiers:u}))}return e}function yt(e,t,s,n){const l=e.dirs,i=t&&t.dirs;for(let o=0;o<l.length;o++){const a=l[o];i&&(a.oldValue=i[o].value);let u=a.dir[n];u&&(ct(),Ne(u,s,8,[e.el,a,e,t]),ut())}}function xo(e,t){if(we){let s=we.provides;const n=we.parent&&we.parent.provides;n===s&&(s=we.provides=Object.create(n)),s[e]=t}}function Es(e,t,s=!1){const n=br();if(n||It){let l=It?It._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(l&&e in l)return l[e];if(arguments.length>1)return s&&V(t)?t.call(n&&n.proxy):t}}const wo=Symbol.for("v-scx"),So=()=>Es(wo);function tn(e,t,s){return Yl(e,t,s)}function Yl(e,t,s=Q){const{immediate:n,deep:l,flush:i,once:o}=s,a=be({},s),u=t&&n||!t&&i!=="post";let h;if(as){if(i==="sync"){const I=So();h=I.__watcherHandles||(I.__watcherHandles=[])}else if(!u){const I=()=>{};return I.stop=ze,I.resume=ze,I.pause=ze,I}}const p=we;a.call=(I,U,N)=>Ne(I,p,U,N);let x=!1;i==="post"?a.scheduler=I=>{Te(I,p&&p.suspense)}:i!=="sync"&&(x=!0,a.scheduler=(I,U)=>{U?I():Mn(I)}),a.augmentJob=I=>{t&&(I.flags|=4),x&&(I.flags|=2,p&&(I.id=p.uid,I.i=p))};const A=vo(e,t,a);return as&&(h?h.push(A):u&&A()),A}function Co(e,t,s){const n=this.proxy,l=re(e)?e.includes(".")?Xl(n,e):()=>n[e]:e.bind(n,n);let i;V(t)?i=t:(i=t.handler,s=t);const o=ds(this),a=Yl(l,i.bind(n),s);return o(),a}function Xl(e,t){const s=t.split(".");return()=>{let n=e;for(let l=0;l<s.length&&n;l++)n=n[s[l]];return n}}const To=Symbol("_vte"),Ks=e=>e.__isTeleport,sn=Symbol("_leaveCb");function Eo(e){let t=e[0];if(e.length>1){for(const s of e)if(s.type!==dt){t=s;break}}return t}function Zl(e){if(!In(e))return Ks(e.type)&&e.children?Eo(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:s}=e;if(s){if(t&16)return s[0];if(t&32&&V(s.default))return s.default()}}function Rn(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const s=e.component.subTree;Rn(Ks(s.type)&&Zl(s)||s,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Ql(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function qn(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const Rs=new WeakMap;function Qt(e,t,s,n,l=!1){if(L(e)){e.forEach((N,j)=>Qt(N,t&&(L(t)?t[j]:t),s,n,l));return}if(es(n)&&!l){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Qt(e,t,s Line truncated
* @vue/runtime-dom v3.5.41
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let _n;const il=typeof window<"u"&&window.trustedTypes;if(il)try{_n=il.createPolicy("vue",{createHTML:e=>e})}catch{}const Ei=_n?e=>_n.createHTML(e):e=>e,Er="http://www.w3.org/2000/svg",Or="http://www.w3.org/1998/Math/MathML",it=typeof document<"u"?document:null,ol=it&&it.createElement("template"),kr={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const l=t==="svg"?it.createElementNS(Er,e):t==="mathml"?it.createElementNS(Or,e):s?it.createElement(e,{is:s}):it.createElement(e);return e==="select"&&n&&n.multiple!=null&&l.setAttribute("multiple",n.multiple),l},createText:e=>it.createTextNode(e),createComment:e=>it.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>it.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,l,i){const o=s?s.previousSibling:t.lastChild;if(l&&(l===i||l.nextSibling))for(;t.insertBefore(l.cloneNode(!0),s),!(l===i||!(l=l.nextSibling)););else{ol.innerHTML=Ei(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const a=ol.content;if(n==="svg"||n==="mathml"){const u=a.firstChild;for(;u.firstChild;)a.appendChild(u.firstChild);a.removeChild(u)}t.insertBefore(a,s)}return[o?o.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},Pr=Symbol("_vtc");function Ar(e,t,s){const n=e[Pr];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const rl=Symbol("_vod"),Mr=Symbol("_vsh"),Rr=Symbol(""),Ir=/(?:^|;)\s*display\s*:/;function Fr(e,t,s){const n=e.style,l=re(s);let i=!1;if(s&&!l){if(t)if(re(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();s[a]==null&&Gt(n,a,"")}else for(const o in t)s[o]==null&&Gt(n,o,"");for(const o in s){o==="display"&&(i=!0);const a=s[o];a!=null?Nr(e,o,!re(t)&&t?t[o]:void 0,a)||Gt(n,o,a):Gt(n,o,"")}}else if(l){if(t!==s){const o=n[Rr];o&&(s+=";"+o),n.cssText=s,i=Ir.test(s)}}else t&&e.removeAttribute("style");rl in e&&(e[rl]=i?n.display:"",e[Mr]&&(n.display="none"))}const al=/\s*!important$/;function Gt(e,t,s){if(L(s))s.forEach(n=>Gt(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=Dr(e,t);al.test(s)?e.setProperty(Et(n),s.replace(al,""),"important"):e[n]=s}}const cl=["Webkit","Moz","ms"],on={};function Dr(e,t){const s=on[t];if(s)return s;let n=Ie(t);if(n!=="filter"&&n in e)return on[t]=n;n=Cl(n);for(let l=0;l<cl.length;l++){const i=cl[l]+n;if(i in e)return on[t]=i}return t}function Nr(e,t,s,n){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&re(n)&&s===n}const ul="http://www.w3.org/1999/xlink";function fl(e,t,s,n,l,i=Vi(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(ul,t.slice(6,t.length)):e.setAttributeNS(ul,t,s):s==null||i&&!El(s)?e.removeAttribute(t):e.setAttribute(t,i?"":Ge(s)?String(s):s)}function dl(e,t,s,n,l){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?Ei(s):s);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const a=i==="OPTION"?e.getAttribute("value")||"":e.value,u=s==null?e.type==="checkbox"?"on":"":String(s);(a!==u||!("_value"in e))&&(e.value=u),s==null&&e.removeAttribute(t),e._value=s;return}let o=!1;if(s===""||s==null){const a=typeof e[t];a==="boolean"?s=El(s):s==null&&a==="string"?(s="",o=!0):a==="number"&&(s=0,o=!0)}try{e[t]=s}catch{}o&&e.removeAttribute(l||t)}function vt(e,t,s,n){e.addEventListener(t,s,n)}function Lr(e,t,s,n){e.removeEventListener(t,s,n)}const pl=Symbol("_vei");function jr(e,t,s,n,l=null){const i=e[pl]||(e[pl]={}),o=i[t];if(n&&o)o.value=n;else{const[a,u]=Hr(t);if(n){const h=i[t]=Ur(n,l);vt(e,a,h,u)}else o&&(Lr(e,a,o,u),i[t]=void 0)}}const Vr=/(Once|Passive|Capture)$/,$r=/^on:?(?:Once|Passive|Capture)$/;function Hr(e){let t,s;for(;(s=e.match(Vr))&&!$r.test(e);)t||(t={}),e=e.slice(0,e.length-s[1].length),t[s[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):Et(e.slice(2)),t]}let rn=0;const Br=Promise.resolve(),Kr=()=>rn||(Br.then(()=>rn=0),rn=Date.now());function Ur(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;const l=s.value;if(L(l)){const i=n.stopImmediatePropagation;n.stopImmediatePropagation=()=>{i.call(n),n._stopped=!0};const o=l.slice(),a=[n];for(let u=0;u<o.length&&!n._stopped;u++){const h=o[u];h&&Ne(h,t,5,a)}}else Ne(l,t,5,[n])};return s.value=e,s.attached=Kr(),s}const hl=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Wr=(e,t,s,n,l,i)=>{const o=l==="svg";t==="class"?Ar(e,n,o):t==="style"?Fr(e,s,n):Ns(t)?Ls(t)||jr(e,t,s,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):qr(e,t,n,o))?(dl(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&fl(e,t,n,o,i,t!=="value")):e._isVueCE&&(zr(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!re(n)))?dl(e,Ie(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._fals Line truncated
`))),e[qe]=Nt(l);const i=n||l.props&&l.props.type==="number";vt(e,t?"change":"input",o=>{o.target.composing||e[qe](an(e.value,s,i))}),(s||i)&&vt(e,"change",()=>{e.value=an(e.value,s,i)}),t||(vt(e,"compositionstart",Jr),vt(e,"compositionend",gl),vt(e,"change",gl))},mounted(e,{value:t,modifiers:{trim:s,number:n}}){const l=t??"",i=e[Ss];delete e[Ss],i!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==i?e[qe](an(e.value,s,n)):e.value=l},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:l,number:i}},o){if(e[qe]=Nt(o),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?Vs(e.value):e.value,u=t??"";if(a===u)return;const h=e.getRootNode();(h instanceof Document||h instanceof ShadowRoot)&&h.activeElement===e&&e.type!=="range"&&(n&&t===s||l&&e.value.trim()===u)||(e.value=u)}},Gr={deep:!0,created(e,t,s){e[qe]=Nt(s),vt(e,"change",()=>{const n=e._modelValue,l=cs(e),i=e.checked,o=e[qe];if(L(n)){const a=wn(n,l),u=a!==-1;if(i&&!u)o(n.concat(l));else if(!i&&u){const h=[...n];h.splice(a,1),o(h)}}else if(Lt(n)){const a=new Set(n);i?a.add(l):a.delete(l),o(a)}else o(Oi(e,i))})},mounted:vl,beforeUpdate(e,t,s){e[qe]=Nt(s),vl(e,t,s)}};function vl(e,{value:t,oldValue:s},n){e._modelValue=t;let l;if(L(t))l=wn(t,n.props.value)>-1;else if(Lt(t))l=t.has(n.props.value);else{if(t===s)return;l=jt(t,Oi(e,!0))}e.checked!==l&&(e.checked=l)}const ml={deep:!0,created(e,{value:t,modifiers:{number:s}},n){e._modelValue=t,vt(e,"change",()=>{const l=Array.prototype.filter.call(e.options,i=>i.selected).map(i=>s?Vs(cs(i)):cs(i));e[qe](e.multiple?Lt(e._modelValue)?new Set(l):l:l[0]),e._assigning=!0,Wl(()=>{e._assigning=!1})}),e[qe]=Nt(n)},mounted(e,{value:t}){_l(e,t)},beforeUpdate(e,{value:t},s){e._modelValue=t,e[qe]=Nt(s)},updated(e,{value:t}){e._assigning||_l(e,t)}};function _l(e,t){const s=e.multiple,n=L(t);if(!(s&&!n&&!Lt(t))){for(let l=0,i=e.options.length;l<i;l++){const o=e.options[l],a=cs(o);if(s)if(n){const u=typeof a;u==="string"||u==="number"?o.selected=t.some(h=>String(h)===String(a)):o.selected=wn(t,a)>-1}else o.selected=t.has(a);else if(jt(cs(o),t)){e.selectedIndex!==l&&(e.selectedIndex=l);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function cs(e){return"_value"in e?e._value:e.value}function Oi(e,t){const s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}const Yr=["ctrl","shift","alt","meta"],Xr={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Yr.some(s=>e[`${s}Key`]&&!t.includes(s))},Zr=(e,t)=>{if(!e)return e;const s=e._withMods||(e._withMods={}),n=t.join(".");return s[n]||(s[n]=((l,...i)=>{for(let o=0;o<t.length;o++){const a=Xr[t[o]];if(a&&a(l,t))return}return e(l,...i)}))},Qr=be({patchProp:Wr},kr);let bl;function ea(){return bl||(bl=or(Qr))}const ta=((...e)=>{const t=ea().createApp(...e),{mount:s}=t;return t.mount=n=>{const l=na(n);if(!l)return;const i=t._component;!V(i)&&!i.render&&!i.template&&(i.template=l.innerHTML),l.nodeType===1&&(l.textContent="");const o=s(l,!1,sa(l));return l instanceof Element&&(l.removeAttribute("v-cloak"),l.setAttribute("data-v-app","")),o},t});function sa(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function na(e){return re(e)?document.querySelector(e):e}const la={class:"app-shell"},ia={class:"content",id:"overview"},oa={class:"topbar"},ra={class:"topbar-meta"},aa={class:"as-of"},ca={key:0,class:"state-card"},ua={key:1,class:"state-card error-state"},fa={class:"kpi-grid","aria-label":"Signal summary"},da={class:"kpi-card accent-card"},pa={class:"kpi-value"},ha={class:"kpi-foot"},ga={class:"long-count"},va={class:"short-count"},ma={class:"neutral-count"},_a={class:"kpi-card"},ba={class:"kpi-value"},ya={class:"kpi-foot"},xa={class:"panel theme-panel",id:"themes"},wa={class:"panel-header signal-header"},Sa={class:"status-tag"},Ca={class:"theme-grid"},Ta={class:"theme-card-head"},Ea={class:"theme-chip"},Oa={class:"theme-label-th"},ka={class:"theme-surprise"},Pa={class:"theme-surprise-value"},Aa={class:"theme-read"},Ma={key:0,class:"theme-read-value"},Ra={key:1,class:"theme-read-value"},Ia={key:2,class:"theme-read-value"},Fa={key:3,class:"theme-read-value"},Da={key:0,class:"theme-narrative"},Na={key:0,class:"macro-panel"},La={class:"macro-chips"},ja={class:"macro-chip"},Va={class:"macro-chip"},$a={class:"macro-chip"},Ha={class:"macro-chip"},Ba={class:"macro-chip"},Ka={class:"panel stock-panel",id:"stocks"},Ua={class:"panel-header signal-header"},Wa={class:"stock-controls"},qa={class:"toggle-filter"},za={key:0,class:"empty-research"},Ja={key:1,class:"table-wrap"},Ga={class:"factor-table"},Ya=["onClick"],Xa={key:1,class:"muted-cell"},Za={class:"combined-cell"},Qa={class:"symbol-name"},ec={key:0,class:"muted-cell"},tc={class:"score-cell"},sc={key:0,cl Line truncated
+1
View File
@@ -0,0 +1 @@
@import"https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap";:root{color-scheme:dark;font-family:Manrope,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,sans-serif;color:#edf2f7;background:#0b1018;font-synthesis:none;text-rendering:optimizeLegibility;--bg: #0b1018;--panel: #111925;--panel-soft: #151f2d;--line: #263344;--line-bright: #35465c;--text: #edf2f7;--muted: #8794a6;--faint: #5b6a7e;--mint: #52d6bd;--mint-soft: rgba(82, 214, 189, .12);--amber: #e6b96c;--amber-soft: rgba(230, 185, 108, .12);--red: #ef8b8b;--red-soft: rgba(239, 139, 139, .12)}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;min-width:320px;background:var(--bg)}button,input{font:inherit}button{cursor:pointer}.app-shell{min-height:100vh;display:flex;background:radial-gradient(circle at 85% -10%,rgba(82,214,189,.08),transparent 32rem),var(--bg)}.sidebar{width:248px;flex:0 0 248px;min-height:100vh;padding:28px 18px 22px;border-right:1px solid var(--line);display:flex;flex-direction:column;background:#0b1018c2}.brand-lockup{display:flex;align-items:center;gap:11px;padding:0 9px 33px}.brand-mark{width:32px;height:32px;display:grid;place-items:center;border:1px solid rgba(82,214,189,.7);border-radius:9px;color:var(--mint);font:500 11px DM Mono,monospace;letter-spacing:-.08em;box-shadow:0 0 24px #52d6bd1f}.brand-name{font-size:13px;font-weight:800;letter-spacing:.01em}.brand-caption{margin-top:2px;color:var(--faint);font:10px DM Mono,monospace}.nav-stack{display:grid;gap:5px}.nav-item{display:flex;align-items:center;gap:11px;padding:11px 12px;border:1px solid transparent;border-radius:8px;color:var(--muted);text-decoration:none;font-size:12px;font-weight:600;transition:.2s ease}.nav-item:hover{color:var(--text);background:#ffffff06}.nav-item.active{color:var(--mint);background:var(--mint-soft);border-color:#52d6bd2e}.nav-glyph{width:16px;color:currentColor;font-size:15px;text-align:center}.sidebar-footer{margin-top:auto;padding:12px 8px 0}.mode-card{display:flex;gap:10px;align-items:center;padding:12px;border:1px solid var(--line);border-radius:10px;background:#ffffff05}.mode-dot,.freshness-dot{width:7px;height:7px;flex:0 0 7px;border-radius:99px;background:var(--mint);box-shadow:0 0 12px var(--mint)}.mode-label{font-size:11px;font-weight:700}.mode-detail,.version-line{margin-top:3px;color:var(--faint);font:10px DM Mono,monospace}.version-line{padding:14px 3px 0}.content{width:min(100%,1440px);margin:0 auto;padding:42px clamp(22px,4vw,64px) 70px}.topbar{display:flex;justify-content:space-between;gap:24px;align-items:flex-start;padding-bottom:35px}.eyebrow,.section-kicker{color:var(--mint);font:500 10px DM Mono,monospace;letter-spacing:.14em;text-transform:uppercase}h1,h2,p{margin:0}h1{margin-top:10px;font-size:clamp(28px,4vw,46px);line-height:1.04;letter-spacing:-.055em}h2{margin-top:7px;font-size:17px;letter-spacing:-.025em}.subtitle{max-width:560px;margin-top:12px;color:var(--muted);font-size:13px;line-height:1.7}.topbar-meta{text-align:right;color:var(--muted);font:10px DM Mono,monospace}.freshness-pill{display:inline-flex;align-items:center;gap:8px;padding:7px 10px;border:1px solid rgba(82,214,189,.25);border-radius:99px;color:var(--mint);background:var(--mint-soft)}.freshness-pill.pill-fixture{border-color:#e6b96c59;color:var(--amber);background:var(--amber-soft)}.freshness-pill.pill-fixture .freshness-dot{background:var(--amber);box-shadow:0 0 12px var(--amber)}.as-of{margin-top:10px}.kpi-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:12px}.kpi-card,.panel,.state-card{border:1px solid var(--line);background:linear-gradient(145deg,#151f2ddb,#0e151ff0);box-shadow:0 18px 42px #0000001f}.kpi-card{min-height:132px;padding:19px 19px 16px;border-radius:10px}.accent-card{border-color:#52d6bd4d;background:linear-gradient(145deg,#19383bcc,#0e1f26eb)}.kpi-label{color:var(--muted);font:10px DM Mono,monospace;text-transform:uppercase;letter-spacing:.08em}.kpi-value{margin-top:12px;color:var(--text);font-size:29px;font-weight:700;letter-spacing:-.055em}.kpi-unit{margin-left:4px;color:var(--mint);font:14px DM Mono,monospace}.quality-value{font-size:22px;text-transform:capitalize}.kpi-foot{margin-top:10px;color:var(--faint);font:10px DM Mono,monospace}.long-count,.positive-text{color:var(--mint)}.short-count,.negative-text{color:var(--red)}.hero-grid,.bottom-grid{display:grid;grid-template-columns:1.45fr 1fr;gap:12px;margin-bottom:12px}.panel{border-radius:10px;padding:22px}.panel-header{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}.confidence-tag,.status-tag{padding:6px 8px;color:var(--mint);border:1px solid rgba(82,214,189,.22);border-radius:6px;background:var(--mint-soft);font:10px DM Mono,monospace;white-space:nowrap}.pulse-lead{display:flex;gap:15px;align-items:baseline;margin:26px 0 25px}.pulse-number{color:var(--mint);font-size:32px;font-weight:700;letter-spacing:-.06em}.pulse-copy{max-width:380px;cLine truncated
+14
View File
@@ -0,0 +1,14 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#0b1018" />
<title>SET50 Signal Lab</title>
<script type="module" crossorigin src="/assets/index-DDItjwYy.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-z73iDem3.css">
</head>
<body>
<div id="app"></div>
</body>
</html>