simbiot-harness/sites/shkor-com/README.md

21 lines
2.9 KiB
Markdown

# shkor.com — Shkor Labs site
Static page (`index.html`, `styles.css`, `assets/`) + backend `api.py` (stdlib, SQLite): email capture and lab applications with KYC/KYB.
- **Live: https://shkor.com** (since 2026-10-18) — v2 at the root, docroot `/var/www/shkor-com-live` (v2 + legacy team.html/screenshots), Caddy `/etc/caddy/sites/shkor.com.caddy`, apex A → 204.168.232.21 (zone `/etc/bind/zones/db.shkor.com`; www is delegated to namebright).
Old site (nginx on 204.168.138.138, `/var/www/shkor-local`) backed up: `/var/backups/shkor-com/old-shkor-com-site-20261018.tgz` (+ zone, unit, api.py backups there).
Rollback: zone `@` A back to 204.168.138.138, bump serial, `systemctl reload named`.
Caching (Caddy): pages/CSS/JS `Cache-Control: no-cache` (always revalidated via ETag → 304), fonts `max-age=604800`; without it browsers mixed new HTML with stale CSS after updates (19.10).
- Preview: https://new.shkor.com (noindex) — docroot `/var/www/shkor-com`, Caddy `/etc/caddy/sites/new-shkor.caddy`
- Film: `assets/shkor-labs-film-en.mp4` (77 s) is built by `video/shkor-labs-site/build.py` → `out/shkor-labs-film-en.mp4` and copied to the live `assets/` at deploy (not committed here); poster `v2/assets/shkor-labs-film-poster.jpg`. The previous `simbiot-harness-enterprise-en.mp4` stays on the server so old links keep working.
- Backend: `systemd shkor-api` (/opt/shkor-subscribe/api.py) on 127.0.0.1:8097, Caddy proxies `/api/*`; DB `/var/lib/shkor-subscribe/subs.db`
- Lab applications: `v2/apply/` (3-step form) → `/api/lab/apply` → portal pipeline `/api/studio/apply` (apply42.db, ref=shkor, TG to admin)
+ Didit KYC session (Free KYC workflow, key from /root/coop/.env) and KYB session if a company is given.
Status page `v2/apply/status/?t=<token>` refreshes from Didit; poller every 10 min; TG once on Approved/Declined.
KYB is OFF until `DIDIT_KYB_WORKFLOW_ID` is set in the unit (create the workflow in Didit console + top up balance).
After publishing v2 at the root, set `PUBLIC_BASE=https://shkor.com` (Didit callback).
export: `sqlite3 /var/lib/shkor-subscribe/subs.db "select email,source,created_at from subs"`
- v2 (labs + autopilot concept): `v2/` → https://new.shkor.com/v2/ ; design direction from ui-ux-pro-max (Dark OLED + Bento + HUD, Space Grotesk)
- Update live: `cp -r v2/* /var/www/shkor-com-live/ && cp api.py /opt/shkor-subscribe/ && systemctl restart shkor-api`
- Autopilot $99 (`v2/start/`): form → Didit KYC → `/start/status/?t=` → after Approved, Stripe Checkout via portal onboarding (plan `autopilot`, return_url back here) → portal provisions tenant + Hetzner VM + agent → cloud-init callback → CloudCLI panel `<agent>.ui.shkor.com` with Claude Code + OpenCode (GLM via 9router) → status page shows panel login.
Stripe mode follows the portal's `STRIPE_MODE` (/root/coop/.env). Test: `python3 sites/shkor-com/test_autopilot.py`.