18 Commits

Author SHA1 Message Date
Moko Consulting 804b131ccb feat(admin): access control — signup policy + multi-domain allow-list
Cascade Main -> Dev / Cascade main -> dev (push) Successful in 3s
Generic: Standards Compliance / Secret Scanning (push) Successful in 3s
Universal: Push Notifications / push-notify (push) Successful in 7s
Generic: Standards Compliance / License Header Validation (push) Successful in 3s
Generic: Standards Compliance / Repository Structure Validation (push) Failing after 5s
Generic: Standards Compliance / Coding Standards Check (push) Successful in 5s
Generic: Standards Compliance / Workflow Configuration Check (push) Failing after 4s
Generic: Standards Compliance / Documentation Quality Check (push) Failing after 3s
Generic: Standards Compliance / README Completeness Check (push) Failing after 3s
Deploy (Prod) / Deploy to Prod (push) Successful in 24s
Generic: Standards Compliance / Git Repository Hygiene (push) Successful in 4s
Generic: Standards Compliance / Line Length Check (push) Successful in 4s
Generic: Standards Compliance / Script Integrity Validation (push) Successful in 8s
Generic: Standards Compliance / File Naming Standards (push) Successful in 3s
Generic: Standards Compliance / Insecure Code Pattern Detection (push) Successful in 3s
Generic: Standards Compliance / Version Consistency Check (push) Successful in 41s
Generic: Standards Compliance / Dead Code Detection (push) Successful in 5s
Generic: Standards Compliance / File Size Limits (push) Successful in 3s
Generic: Standards Compliance / Binary File Detection (push) Successful in 4s
Generic: Standards Compliance / TODO/FIXME Tracking (push) Successful in 3s
Generic: Standards Compliance / Code Duplication Detection (push) Successful in 38s
Generic: Standards Compliance / Unused Dependencies Check (push) Successful in 37s
Generic: Standards Compliance / Dependency Vulnerability Scanning (push) Successful in 43s
Generic: Standards Compliance / Broken Link Detection (push) Successful in 3s
Generic: Standards Compliance / API Documentation Coverage (push) Successful in 3s
Generic: Standards Compliance / Accessibility Check (push) Successful in 3s
Generic: Standards Compliance / Performance Metrics (push) Successful in 3s
Generic: Standards Compliance / Enterprise Readiness Check (push) Successful in 40s
Generic: Standards Compliance / Repository Health Check (push) Successful in 39s
Generic: Standards Compliance / Terraform Configuration Validation (push) Successful in 7s
Generic: Standards Compliance / Code Complexity Analysis (push) Successful in 2m11s
Generic: Standards Compliance / Compliance Summary (push) Has been cancelled
Add an admin "Access" page to gate who can sign into the admin GUI via Google
OAuth. Replaces the single env-var domain check with GUI-managed policy:

- Signup mode (per-login decision): open (domain match auto-approves),
  approval (domain sign-ins queue as pending for admin approval), or
  allowlist/closed (only pre-approved emails).
- Multiple allowed domains (seeded once from MT_OAUTH_ALLOWED_DOMAIN).
- User allow-list: approve pending, add, block (kept so open-mode can't
  silently re-provision), remove. All actions audited.
- adminAuth re-validates the OAuth session against the store each request, so a
  block/removal revokes access immediately rather than at 12h cookie expiry.
  HTTP basic auth still bypasses (no lockout risk while tightening policy).

New store tables: settings (signup_mode, allowed_domains) + users. Blocked/
queued logins re-render the sign-in page with a status banner.

Tests cover domain matching (incl. suffix-spoof) and all three signup modes.

Authored-by: Moko Consulting
Claude-Session: https://claude.ai/code/session_015UauDPfYC8S2mdUhoSK8zQ
2026-07-22 08:53:41 -05:00
Moko Consulting d9bda6047f feat: per-user audit attribution, login page, chart range selector, key search
Cascade Main -> Dev / Cascade main -> dev (push) Successful in 4s
Universal: Push Notifications / push-notify (push) Successful in 2s
Generic: Standards Compliance / Secret Scanning (push) Successful in 4s
Generic: Standards Compliance / License Header Validation (push) Successful in 5s
Generic: Standards Compliance / Repository Structure Validation (push) Failing after 3s
Generic: Standards Compliance / Coding Standards Check (push) Successful in 4s
Generic: Standards Compliance / Workflow Configuration Check (push) Failing after 10s
Generic: Standards Compliance / Documentation Quality Check (push) Failing after 7s
Generic: Standards Compliance / README Completeness Check (push) Failing after 6s
Generic: Standards Compliance / Git Repository Hygiene (push) Successful in 8s
Deploy (Prod) / Deploy to Prod (push) Failing after 48s
Generic: Standards Compliance / Script Integrity Validation (push) Successful in 6s
Generic: Standards Compliance / Line Length Check (push) Successful in 6s
Generic: Standards Compliance / File Naming Standards (push) Successful in 3s
Generic: Standards Compliance / Insecure Code Pattern Detection (push) Successful in 4s
Generic: Standards Compliance / Version Consistency Check (push) Successful in 1m9s
Generic: Standards Compliance / Dead Code Detection (push) Successful in 6s
Generic: Standards Compliance / File Size Limits (push) Successful in 3s
Generic: Standards Compliance / Binary File Detection (push) Successful in 4s
Generic: Standards Compliance / TODO/FIXME Tracking (push) Successful in 4s
Generic: Standards Compliance / Code Complexity Analysis (push) Successful in 45s
Generic: Standards Compliance / Code Duplication Detection (push) Successful in 46s
Generic: Standards Compliance / Broken Link Detection (push) Successful in 3s
Generic: Standards Compliance / API Documentation Coverage (push) Successful in 3s
Generic: Standards Compliance / Accessibility Check (push) Successful in 4s
Generic: Standards Compliance / Performance Metrics (push) Successful in 3s
Generic: Standards Compliance / Dependency Vulnerability Scanning (push) Successful in 43s
Generic: Standards Compliance / Unused Dependencies Check (push) Successful in 43s
Generic: Standards Compliance / Terraform Configuration Validation (push) Successful in 7s
Generic: Standards Compliance / Enterprise Readiness Check (push) Successful in 39s
Generic: Standards Compliance / Repository Health Check (push) Successful in 38s
Generic: Standards Compliance / Compliance Summary (push) Has been cancelled
- Audit entries now record the actor (session email or 'admin (basic)'); new
  audit.actor column with a safe ALTER migration for existing DBs
- Styled /login landing page with a 'Sign in with Google' button; adminAuth
  redirects unauthenticated browsers there
- Dashboard chart range selector (24h / 7d / 30d)
- Client-side search/filter box on the API keys list

Authored-by: Moko Consulting
Claude-Session: https://claude.ai/code/session_015UauDPfYC8S2mdUhoSK8zQ
Signed-off-by: Jonathan Miller <jmiller@mokoconsulting.tech>
2026-07-21 21:35:37 -05:00
Moko Consulting 61a271f61c feat(auth): Google OAuth login for the admin UI (pure stdlib)
Cascade Main -> Dev / Cascade main -> dev (push) Successful in 7s
Generic: Standards Compliance / Secret Scanning (push) Successful in 4s
Universal: Push Notifications / push-notify (push) Successful in 9s
Generic: Standards Compliance / License Header Validation (push) Successful in 4s
Generic: Standards Compliance / Repository Structure Validation (push) Failing after 7s
Generic: Standards Compliance / Coding Standards Check (push) Successful in 6s
Generic: Standards Compliance / Workflow Configuration Check (push) Failing after 4s
Generic: Standards Compliance / Documentation Quality Check (push) Failing after 4s
Generic: Standards Compliance / README Completeness Check (push) Failing after 3s
Deploy (Prod) / Deploy to Prod (push) Successful in 31s
Generic: Standards Compliance / Git Repository Hygiene (push) Successful in 3s
Generic: Standards Compliance / Script Integrity Validation (push) Successful in 5s
Generic: Standards Compliance / Line Length Check (push) Successful in 4s
Generic: Standards Compliance / File Naming Standards (push) Successful in 3s
Generic: Standards Compliance / Insecure Code Pattern Detection (push) Successful in 3s
Generic: Standards Compliance / Version Consistency Check (push) Successful in 49s
Generic: Standards Compliance / Dead Code Detection (push) Successful in 5s
Generic: Standards Compliance / File Size Limits (push) Successful in 4s
Generic: Standards Compliance / Binary File Detection (push) Successful in 4s
Generic: Standards Compliance / TODO/FIXME Tracking (push) Successful in 3s
Generic: Standards Compliance / Code Complexity Analysis (push) Successful in 47s
Generic: Standards Compliance / Code Duplication Detection (push) Successful in 46s
Generic: Standards Compliance / Broken Link Detection (push) Successful in 3s
Generic: Standards Compliance / API Documentation Coverage (push) Successful in 3s
Generic: Standards Compliance / Accessibility Check (push) Successful in 3s
Generic: Standards Compliance / Performance Metrics (push) Successful in 2s
Generic: Standards Compliance / Dependency Vulnerability Scanning (push) Successful in 50s
Generic: Standards Compliance / Unused Dependencies Check (push) Successful in 47s
Generic: Standards Compliance / Terraform Configuration Validation (push) Successful in 8s
Generic: Standards Compliance / Enterprise Readiness Check (push) Successful in 51s
Generic: Standards Compliance / Repository Health Check (push) Successful in 1m1s
Generic: Standards Compliance / Compliance Summary (push) Has been cancelled
Adds Google OAuth2 authorization-code login alongside basic auth. adminAuth now
accepts, in order: HMAC-signed session cookie (post-OAuth) -> basic auth ->
redirect browsers to Google / 401 for API+scrapers. Domain-restricted via
MT_OAUTH_ALLOWED_DOMAIN (default mokoconsulting.tech). Config: MT_GOOGLE_CLIENT_ID/
SECRET, MT_SESSION_SECRET. Disabled (basic-auth only) until creds are set, so
existing deploys are unaffected. Sign-out link in the navbar when enabled.

Authored-by: Moko Consulting
Claude-Session: https://claude.ai/code/session_015UauDPfYC8S2mdUhoSK8zQ
Signed-off-by: Jonathan Miller <jmiller@mokoconsulting.tech>
2026-07-21 21:26:42 -05:00
Moko Consulting 538af61a67 feat: event retention, per-key chart, per-endpoint metrics, languages cache
Universal: Push Notifications / push-notify (push) Successful in 2s
Cascade Main -> Dev / Cascade main -> dev (push) Successful in 6s
Generic: Standards Compliance / License Header Validation (push) Successful in 3s
Generic: Standards Compliance / Secret Scanning (push) Successful in 4s
Generic: Standards Compliance / Repository Structure Validation (push) Failing after 3s
Generic: Standards Compliance / Coding Standards Check (push) Successful in 3s
Generic: Standards Compliance / Workflow Configuration Check (push) Failing after 6s
Generic: Standards Compliance / Documentation Quality Check (push) Failing after 7s
Generic: Standards Compliance / README Completeness Check (push) Failing after 6s
Generic: Standards Compliance / Git Repository Hygiene (push) Successful in 5s
Deploy (Prod) / Deploy to Prod (push) Successful in 41s
Generic: Standards Compliance / Script Integrity Validation (push) Successful in 6s
Generic: Standards Compliance / File Naming Standards (push) Successful in 3s
Generic: Standards Compliance / Line Length Check (push) Successful in 4s
Generic: Standards Compliance / Insecure Code Pattern Detection (push) Successful in 3s
Generic: Standards Compliance / Version Consistency Check (push) Successful in 54s
Generic: Standards Compliance / Dead Code Detection (push) Successful in 6s
Generic: Standards Compliance / File Size Limits (push) Successful in 4s
Generic: Standards Compliance / Binary File Detection (push) Successful in 5s
Generic: Standards Compliance / TODO/FIXME Tracking (push) Successful in 5s
Generic: Standards Compliance / Code Duplication Detection (push) Successful in 49s
Generic: Standards Compliance / Code Complexity Analysis (push) Successful in 56s
Generic: Standards Compliance / Broken Link Detection (push) Successful in 8s
Generic: Standards Compliance / API Documentation Coverage (push) Successful in 5s
Generic: Standards Compliance / Accessibility Check (push) Successful in 4s
Generic: Standards Compliance / Performance Metrics (push) Successful in 3s
Generic: Standards Compliance / Dependency Vulnerability Scanning (push) Successful in 57s
Generic: Standards Compliance / Unused Dependencies Check (push) Successful in 1m2s
Generic: Standards Compliance / Terraform Configuration Validation (push) Successful in 18s
Generic: Standards Compliance / Enterprise Readiness Check (push) Successful in 1m0s
Generic: Standards Compliance / Repository Health Check (push) Successful in 1m0s
Generic: Standards Compliance / Compliance Summary (push) Has been cancelled
- Retention: MT_EVENT_RETENTION_DAYS (default 30) + hourly pruner goroutine
- Per-key 24h usage chart on the key detail page (KeyUsageSeries)
- Per-endpoint request counters (endpoint_totals table, monotonic across pruning)
  exposed as mokotranslate_endpoint_requests_total{endpoint}
- Engine languages cached 5m (fewer round-trips; serves stale on error)

Authored-by: Moko Consulting
Claude-Session: https://claude.ai/code/session_015UauDPfYC8S2mdUhoSK8zQ
Signed-off-by: Jonathan Miller <jmiller@mokoconsulting.tech>
2026-07-21 21:16:47 -05:00
Moko Consulting 8323b4080a feat(store): migrate to SQLite (modernc pure-Go), add usage-over-time chart
Cascade Main -> Dev / Cascade main -> dev (push) Successful in 6s
Generic: Standards Compliance / Secret Scanning (push) Successful in 5s
Universal: Push Notifications / push-notify (push) Successful in 9s
Generic: Standards Compliance / License Header Validation (push) Successful in 10s
Generic: Standards Compliance / Repository Structure Validation (push) Failing after 13s
Generic: Standards Compliance / Coding Standards Check (push) Successful in 8s
Generic: Standards Compliance / Workflow Configuration Check (push) Failing after 8s
Generic: Standards Compliance / Documentation Quality Check (push) Failing after 7s
Generic: Standards Compliance / README Completeness Check (push) Failing after 6s
Deploy (Prod) / Deploy to Prod (push) Successful in 54s
Generic: Standards Compliance / Git Repository Hygiene (push) Successful in 5s
Generic: Standards Compliance / Line Length Check (push) Successful in 7s
Generic: Standards Compliance / Script Integrity Validation (push) Successful in 9s
Generic: Standards Compliance / File Naming Standards (push) Successful in 4s
Generic: Standards Compliance / Insecure Code Pattern Detection (push) Successful in 4s
Generic: Standards Compliance / Version Consistency Check (push) Successful in 1m12s
Generic: Standards Compliance / Dead Code Detection (push) Successful in 10s
Generic: Standards Compliance / File Size Limits (push) Successful in 24s
Generic: Standards Compliance / Code Complexity Analysis (push) Successful in 1m7s
Generic: Standards Compliance / Binary File Detection (push) Successful in 4s
Generic: Standards Compliance / Code Duplication Detection (push) Successful in 1m11s
Generic: Standards Compliance / TODO/FIXME Tracking (push) Successful in 4s
Generic: Standards Compliance / Broken Link Detection (push) Successful in 3s
Generic: Standards Compliance / API Documentation Coverage (push) Successful in 3s
Generic: Standards Compliance / Accessibility Check (push) Successful in 3s
Generic: Standards Compliance / Performance Metrics (push) Successful in 4s
Generic: Standards Compliance / Dependency Vulnerability Scanning (push) Successful in 56s
Generic: Standards Compliance / Unused Dependencies Check (push) Successful in 54s
Generic: Standards Compliance / Terraform Configuration Validation (push) Successful in 8s
Generic: Standards Compliance / Enterprise Readiness Check (push) Successful in 52s
Generic: Standards Compliance / Repository Health Check (push) Successful in 44s
Generic: Standards Compliance / Compliance Summary (push) Has been cancelled
Replace the JSON store with SQLite via modernc.org/sqlite (pure Go -> build stays
CGO_ENABLED=0 static; go.sum now committed/pinned). Same public store API + a new
UsageSeries for time-series. Full event log enables the 24h requests chart on the
dashboard. One-time migration imports a legacy /data/mokotranslate.json. Default
store path -> mokotranslate.db.

Authored-by: Moko Consulting
Claude-Session: https://claude.ai/code/session_015UauDPfYC8S2mdUhoSK8zQ
Signed-off-by: Jonathan Miller <jmiller@mokoconsulting.tech>
2026-07-21 20:58:22 -05:00
Moko Consulting 87b65a4f46 feat: admin audit log, languages page, readiness probe, dashboard engine widget
Cascade Main -> Dev / Cascade main -> dev (push) Successful in 5s
Generic: Standards Compliance / Secret Scanning (push) Successful in 5s
Universal: Push Notifications / push-notify (push) Successful in 7s
Generic: Standards Compliance / License Header Validation (push) Successful in 3s
Generic: Standards Compliance / Repository Structure Validation (push) Failing after 6s
Generic: Standards Compliance / Coding Standards Check (push) Successful in 8s
Generic: Standards Compliance / Workflow Configuration Check (push) Failing after 8s
Deploy (Prod) / Deploy to Prod (push) Successful in 29s
Generic: Standards Compliance / Documentation Quality Check (push) Failing after 7s
Generic: Standards Compliance / README Completeness Check (push) Failing after 5s
Generic: Standards Compliance / Git Repository Hygiene (push) Successful in 4s
Generic: Standards Compliance / Script Integrity Validation (push) Successful in 4s
Generic: Standards Compliance / Line Length Check (push) Successful in 4s
Generic: Standards Compliance / File Naming Standards (push) Successful in 4s
Generic: Standards Compliance / Insecure Code Pattern Detection (push) Successful in 3s
Generic: Standards Compliance / Version Consistency Check (push) Successful in 55s
Generic: Standards Compliance / Dead Code Detection (push) Successful in 8s
Generic: Standards Compliance / File Size Limits (push) Successful in 7s
Generic: Standards Compliance / Binary File Detection (push) Successful in 5s
Generic: Standards Compliance / Code Duplication Detection (push) Successful in 50s
Generic: Standards Compliance / Code Complexity Analysis (push) Successful in 51s
Generic: Standards Compliance / TODO/FIXME Tracking (push) Successful in 3s
Generic: Standards Compliance / Broken Link Detection (push) Successful in 3s
Generic: Standards Compliance / API Documentation Coverage (push) Successful in 3s
Generic: Standards Compliance / Accessibility Check (push) Successful in 4s
Generic: Standards Compliance / Performance Metrics (push) Successful in 4s
Generic: Standards Compliance / Unused Dependencies Check (push) Successful in 57s
Generic: Standards Compliance / Dependency Vulnerability Scanning (push) Successful in 1m0s
Generic: Standards Compliance / Enterprise Readiness Check (push) Successful in 53s
Generic: Standards Compliance / Terraform Configuration Validation (push) Successful in 7s
Generic: Standards Compliance / Repository Health Check (push) Successful in 38s
Generic: Standards Compliance / Compliance Summary (push) Has been cancelled
- Audit log: bounded ring of state-changing admin actions (key create/edit/
  disable/enable), page at /admin/audit
- Languages page (/admin/languages): engine's supported languages
- Readiness probe /readyz: 200 only when the engine is reachable (vs /healthz)
- Dashboard shows an engine up/down badge

Authored-by: Moko Consulting
Claude-Session: https://claude.ai/code/session_015UauDPfYC8S2mdUhoSK8zQ
Signed-off-by: Jonathan Miller <jmiller@mokoconsulting.tech>
2026-07-21 20:35:16 -05:00
Moko Consulting b2db4451fa feat: CSRF protection, status page, key expiry, and CSV export
Cascade Main -> Dev / Cascade main -> dev (push) Successful in 7s
Generic: Standards Compliance / Secret Scanning (push) Successful in 5s
Universal: Push Notifications / push-notify (push) Successful in 10s
Generic: Standards Compliance / License Header Validation (push) Successful in 4s
Generic: Standards Compliance / Repository Structure Validation (push) Failing after 7s
Generic: Standards Compliance / Coding Standards Check (push) Successful in 6s
Generic: Standards Compliance / Workflow Configuration Check (push) Failing after 5s
Deploy (Prod) / Deploy to Prod (push) Successful in 26s
Generic: Standards Compliance / Documentation Quality Check (push) Failing after 9s
Generic: Standards Compliance / README Completeness Check (push) Failing after 11s
Generic: Standards Compliance / Git Repository Hygiene (push) Successful in 17s
Generic: Standards Compliance / Line Length Check (push) Successful in 5s
Generic: Standards Compliance / File Naming Standards (push) Successful in 4s
Generic: Standards Compliance / Insecure Code Pattern Detection (push) Successful in 3s
Generic: Standards Compliance / Script Integrity Validation (push) Successful in 32s
Generic: Standards Compliance / Version Consistency Check (push) Successful in 1m4s
Generic: Standards Compliance / Dead Code Detection (push) Successful in 6s
Generic: Standards Compliance / File Size Limits (push) Successful in 3s
Generic: Standards Compliance / Binary File Detection (push) Successful in 5s
Generic: Standards Compliance / TODO/FIXME Tracking (push) Successful in 5s
Generic: Standards Compliance / Code Complexity Analysis (push) Successful in 44s
Generic: Standards Compliance / Code Duplication Detection (push) Successful in 45s
Generic: Standards Compliance / Broken Link Detection (push) Successful in 4s
Generic: Standards Compliance / API Documentation Coverage (push) Successful in 3s
Generic: Standards Compliance / Accessibility Check (push) Successful in 3s
Generic: Standards Compliance / Performance Metrics (push) Successful in 3s
Generic: Standards Compliance / Dependency Vulnerability Scanning (push) Successful in 44s
Generic: Standards Compliance / Unused Dependencies Check (push) Successful in 42s
Generic: Standards Compliance / Terraform Configuration Validation (push) Successful in 9s
Generic: Standards Compliance / Enterprise Readiness Check (push) Successful in 45s
Generic: Standards Compliance / Repository Health Check (push) Successful in 44s
Generic: Standards Compliance / Compliance Summary (push) Has been cancelled
- CSRF: per-process token via {{csrf}} template func, checked on all admin POSTs
- Status page (/admin/status): engine reachability, language count, effective config
- Key expiry: optional ExpiresAt (create: days, edit: date); enforced in Authenticate,
  shown/exported; expired keys rejected
- CSV export: /admin/keys.csv (all keys) and /admin/keys/{id}/events.csv (per-key events)

Authored-by: Moko Consulting
Claude-Session: https://claude.ai/code/session_015UauDPfYC8S2mdUhoSK8zQ
Signed-off-by: Jonathan Miller <jmiller@mokoconsulting.tech>
2026-07-21 19:19:36 -05:00
Moko Consulting 249e46d35e feat(admin): per-key detail page with edit, enable/disable, and per-key activity
Cascade Main -> Dev / Cascade main -> dev (push) Successful in 6s
Generic: Standards Compliance / Secret Scanning (push) Successful in 4s
Universal: Push Notifications / push-notify (push) Successful in 9s
Generic: Standards Compliance / License Header Validation (push) Successful in 3s
Generic: Standards Compliance / Repository Structure Validation (push) Failing after 6s
Generic: Standards Compliance / Coding Standards Check (push) Successful in 5s
Generic: Standards Compliance / Workflow Configuration Check (push) Failing after 4s
Deploy (Prod) / Deploy to Prod (push) Successful in 23s
Generic: Standards Compliance / Documentation Quality Check (push) Failing after 4s
Generic: Standards Compliance / README Completeness Check (push) Failing after 5s
Generic: Standards Compliance / Git Repository Hygiene (push) Successful in 4s
Generic: Standards Compliance / Script Integrity Validation (push) Successful in 5s
Generic: Standards Compliance / Line Length Check (push) Successful in 4s
Generic: Standards Compliance / File Naming Standards (push) Successful in 4s
Generic: Standards Compliance / Insecure Code Pattern Detection (push) Successful in 3s
Generic: Standards Compliance / Version Consistency Check (push) Successful in 50s
Generic: Standards Compliance / Dead Code Detection (push) Successful in 11s
Generic: Standards Compliance / File Size Limits (push) Successful in 4s
Generic: Standards Compliance / Binary File Detection (push) Successful in 6s
Generic: Standards Compliance / TODO/FIXME Tracking (push) Successful in 6s
Generic: Standards Compliance / Code Complexity Analysis (push) Successful in 56s
Generic: Standards Compliance / Code Duplication Detection (push) Successful in 57s
Generic: Standards Compliance / Broken Link Detection (push) Successful in 4s
Generic: Standards Compliance / API Documentation Coverage (push) Successful in 4s
Generic: Standards Compliance / Accessibility Check (push) Successful in 4s
Generic: Standards Compliance / Performance Metrics (push) Successful in 4s
Generic: Standards Compliance / Dependency Vulnerability Scanning (push) Successful in 50s
Generic: Standards Compliance / Unused Dependencies Check (push) Successful in 47s
Generic: Standards Compliance / Terraform Configuration Validation (push) Successful in 10s
Generic: Standards Compliance / Enterprise Readiness Check (push) Successful in 48s
Generic: Standards Compliance / Repository Health Check (push) Successful in 49s
Generic: Standards Compliance / Compliance Summary (push) Has been cancelled
Add GET /admin/keys/{id} (detail: editable label + rate, usage stats, this key's
recent events), POST /admin/keys/{id} (edit), and /admin/keys/{id}/enable to
complement disable. Store gains GetKey/UpdateKey/SetKeyDisabled/KeyEvents. Key
list rows now link to the detail page.

Authored-by: Moko Consulting
Claude-Session: https://claude.ai/code/session_015UauDPfYC8S2mdUhoSK8zQ
Signed-off-by: Jonathan Miller <jmiller@mokoconsulting.tech>
2026-07-21 19:03:38 -05:00
Moko Consulting a0ece121f4 feat: add translation playground + Prometheus /metrics
Add a direct engine client (gateway.Client) used by two new admin features:
- /admin/playground: browser translation tester (server-side engine call, no key)
- /metrics: Prometheus text-format counters (total + per-key requests/chars,
  engine reachability), admin-auth protected for the Moko monitoring stack

Authored-by: Moko Consulting
Claude-Session: https://claude.ai/code/session_015UauDPfYC8S2mdUhoSK8zQ
Signed-off-by: Jonathan Miller <jmiller@mokoconsulting.tech>
2026-07-21 17:31:03 -05:00
jmiller d63a47ee44 chore: delete orphan .mokogit/workflows/ci-go.yml [skip ci] 2026-07-21 22:13:34 +00:00
Moko Consulting 9b2eeb19e6 fix(ui): vendor assets under static/vendors (dodge Composer 'vendor/' gitignore)
Cascade Main -> Dev / Cascade main -> dev (push) Successful in 6s
Universal: Push Notifications / push-notify (push) Successful in 2s
Deploy (Prod) / Deploy to Prod (push) Successful in 37s
Generic: Standards Compliance / License Header Validation (push) Successful in 4s
Generic: Standards Compliance / Repository Structure Validation (push) Failing after 3s
Generic: Standards Compliance / Coding Standards Check (push) Successful in 4s
Generic: Standards Compliance / Secret Scanning (push) Successful in 40s
Generic: Standards Compliance / Workflow Configuration Check (push) Failing after 4s
Generic: Standards Compliance / Documentation Quality Check (push) Failing after 6s
Generic: Standards Compliance / README Completeness Check (push) Failing after 3s
Generic: Standards Compliance / Git Repository Hygiene (push) Successful in 3s
Generic: Standards Compliance / Script Integrity Validation (push) Successful in 5s
Generic: Standards Compliance / Line Length Check (push) Successful in 4s
Generic: Standards Compliance / File Naming Standards (push) Successful in 3s
Generic: Standards Compliance / Insecure Code Pattern Detection (push) Successful in 3s
Generic: Standards Compliance / Version Consistency Check (push) Successful in 48s
Generic: Standards Compliance / Dead Code Detection (push) Successful in 5s
Generic: Standards Compliance / File Size Limits (push) Successful in 3s
Generic: Standards Compliance / Binary File Detection (push) Successful in 4s
Generic: Standards Compliance / Code Complexity Analysis (push) Successful in 47s
Generic: Standards Compliance / TODO/FIXME Tracking (push) Successful in 3s
Generic: Standards Compliance / Code Duplication Detection (push) Successful in 47s
Generic: Standards Compliance / Broken Link Detection (push) Successful in 3s
Generic: Standards Compliance / API Documentation Coverage (push) Successful in 4s
Generic: Standards Compliance / Accessibility Check (push) Successful in 4s
Generic: Standards Compliance / Performance Metrics (push) Successful in 3s
Generic: Standards Compliance / Unused Dependencies Check (push) Successful in 59s
Generic: Standards Compliance / Dependency Vulnerability Scanning (push) Successful in 1m4s
Generic: Standards Compliance / Terraform Configuration Validation (push) Successful in 9s
Generic: Standards Compliance / Enterprise Readiness Check (push) Successful in 58s
Generic: Standards Compliance / Repository Health Check (push) Successful in 53s
Generic: Standards Compliance / Compliance Summary (push) Has been cancelled
The prior commit's assets fell under the template .gitignore 'vendor/' rule and
never got committed, leaving /static/vendor/* 404. Rename to static/vendors/
(also matches the 'vendors folder' intent) and reference /static/vendors/.

Authored-by: Moko Consulting
Claude-Session: https://claude.ai/code/session_015UauDPfYC8S2mdUhoSK8zQ
Signed-off-by: Jonathan Miller <jmiller@mokoconsulting.tech>
2026-07-21 16:14:03 -05:00
Moko Consulting 7a5645d515 feat(ui): vendor Bootstrap + Font Awesome locally, adopt MokoOnyx theming structure
Cascade Main -> Dev / Cascade main -> dev (push) Successful in 11s
Universal: Push Notifications / push-notify (push) Successful in 2s
Generic: Standards Compliance / Secret Scanning (push) Successful in 4s
Generic: Standards Compliance / License Header Validation (push) Successful in 4s
Generic: Standards Compliance / Repository Structure Validation (push) Failing after 3s
Deploy (Prod) / Deploy to Prod (push) Successful in 28s
Generic: Standards Compliance / Coding Standards Check (push) Successful in 4s
Generic: Standards Compliance / Documentation Quality Check (push) Failing after 3s
Generic: Standards Compliance / Workflow Configuration Check (push) Failing after 5s
Generic: Standards Compliance / README Completeness Check (push) Failing after 3s
Generic: Standards Compliance / Git Repository Hygiene (push) Successful in 3s
Generic: Standards Compliance / Line Length Check (push) Successful in 4s
Generic: Standards Compliance / Script Integrity Validation (push) Successful in 5s
Generic: Standards Compliance / File Naming Standards (push) Successful in 3s
Generic: Standards Compliance / Insecure Code Pattern Detection (push) Successful in 3s
Generic: Standards Compliance / Version Consistency Check (push) Successful in 52s
Generic: Standards Compliance / Dead Code Detection (push) Successful in 6s
Generic: Standards Compliance / File Size Limits (push) Successful in 4s
Generic: Standards Compliance / Binary File Detection (push) Successful in 4s
Generic: Standards Compliance / Code Complexity Analysis (push) Successful in 51s
Generic: Standards Compliance / Code Duplication Detection (push) Successful in 51s
Generic: Standards Compliance / TODO/FIXME Tracking (push) Successful in 3s
Generic: Standards Compliance / Broken Link Detection (push) Successful in 3s
Generic: Standards Compliance / API Documentation Coverage (push) Successful in 3s
Generic: Standards Compliance / Accessibility Check (push) Successful in 4s
Generic: Standards Compliance / Performance Metrics (push) Successful in 3s
Generic: Standards Compliance / Unused Dependencies Check (push) Successful in 56s
Generic: Standards Compliance / Dependency Vulnerability Scanning (push) Successful in 59s
Generic: Standards Compliance / Terraform Configuration Validation (push) Successful in 9s
Generic: Standards Compliance / Enterprise Readiness Check (push) Successful in 1m0s
Generic: Standards Compliance / Repository Health Check (push) Successful in 59s
Generic: Standards Compliance / Compliance Summary (push) Has been cancelled
Drop the CDN links. Vendor Bootstrap 5.3.3, Font Awesome 7.3.1 (css + webfonts),
and the MokoOnyx theme token files (theme/{light,dark}.standard.css) under
source/httpapi/static/vendor/, embedded via //go:embed all:static and served at
/static/. A bridge stylesheet maps MokoOnyx tokens (--color-primary,
--accent-color-primary, --body-bg, ...) onto Bootstrap's --bs-* vars per
data-bs-theme, so the switcher recolors the whole admin from the MokoOnyx
palette. Brand logo added to the navbar.

Authored-by: Moko Consulting
Claude-Session: https://claude.ai/code/session_015UauDPfYC8S2mdUhoSK8zQ
Signed-off-by: Jonathan Miller <jmiller@mokoconsulting.tech>
2026-07-21 16:12:35 -05:00
Moko Consulting 9d5c6707df feat(ratelimit): implement per-key sliding-window limiter
Cascade Main -> Dev / Cascade main -> dev (push) Successful in 6s
Universal: Push Notifications / push-notify (push) Successful in 2s
Generic: Standards Compliance / Secret Scanning (push) Successful in 4s
Generic: Standards Compliance / License Header Validation (push) Successful in 5s
Generic: Standards Compliance / Repository Structure Validation (push) Failing after 3s
Generic: Standards Compliance / Coding Standards Check (push) Successful in 3s
Generic: Standards Compliance / Workflow Configuration Check (push) Failing after 4s
Generic: Standards Compliance / Documentation Quality Check (push) Failing after 4s
Generic: Standards Compliance / README Completeness Check (push) Failing after 3s
Generic: Standards Compliance / Git Repository Hygiene (push) Successful in 3s
Generic: Standards Compliance / Script Integrity Validation (push) Successful in 6s
Generic: Standards Compliance / Line Length Check (push) Successful in 5s
Generic: Standards Compliance / File Naming Standards (push) Successful in 4s
Generic: Standards Compliance / Insecure Code Pattern Detection (push) Successful in 4s
Generic: Standards Compliance / Version Consistency Check (push) Successful in 47s
Generic: Standards Compliance / Dead Code Detection (push) Successful in 6s
Generic: Standards Compliance / File Size Limits (push) Successful in 5s
Generic: Standards Compliance / Binary File Detection (push) Successful in 4s
Generic: Standards Compliance / TODO/FIXME Tracking (push) Successful in 2s
Generic: Standards Compliance / Code Complexity Analysis (push) Successful in 47s
Generic: Standards Compliance / Code Duplication Detection (push) Successful in 47s
Generic: Standards Compliance / Broken Link Detection (push) Successful in 4s
Generic: Standards Compliance / API Documentation Coverage (push) Successful in 3s
Generic: Standards Compliance / Accessibility Check (push) Successful in 4s
Generic: Standards Compliance / Performance Metrics (push) Successful in 3s
Generic: Standards Compliance / Dependency Vulnerability Scanning (push) Successful in 44s
Generic: Standards Compliance / Unused Dependencies Check (push) Successful in 50s
Generic: Standards Compliance / Terraform Configuration Validation (push) Successful in 11s
Generic: Standards Compliance / Enterprise Readiness Check (push) Successful in 47s
Generic: Standards Compliance / Repository Health Check (push) Successful in 47s
Deploy (Prod) / Deploy to Prod (push) Successful in 33s
Generic: Standards Compliance / Compliance Summary (push) Has been cancelled
Replace the allow-all stub with a sliding-window log: keep each key's recent
hit timestamps, trim the >60s-old leading prefix, reject once the remaining
count reaches limitPerMin (<=0 = unlimited). Precise per rolling 60s, no
fixed-window edge burst. Adds a unit test.

Authored-by: Moko Consulting
Claude-Session: https://claude.ai/code/session_015UauDPfYC8S2mdUhoSK8zQ
Signed-off-by: Jonathan Miller <jmiller@mokoconsulting.tech>
2026-07-21 16:02:31 -05:00
Moko Consulting d5933c0375 fix: own /data as app (uid 10001) in image so fresh volumes are writable
Cascade Main -> Dev / Cascade main -> dev (push) Successful in 9s
Universal: Push Notifications / push-notify (push) Successful in 1s
Deploy (Prod) / Deploy to Prod (push) Failing after 11s
Generic: Standards Compliance / Secret Scanning (push) Successful in 6s
Generic: Standards Compliance / License Header Validation (push) Successful in 5s
Generic: Standards Compliance / Repository Structure Validation (push) Failing after 4s
Generic: Standards Compliance / Coding Standards Check (push) Successful in 4s
Generic: Standards Compliance / Workflow Configuration Check (push) Failing after 3s
Generic: Standards Compliance / Documentation Quality Check (push) Failing after 3s
Generic: Standards Compliance / README Completeness Check (push) Failing after 6s
Generic: Standards Compliance / Git Repository Hygiene (push) Successful in 5s
Generic: Standards Compliance / Script Integrity Validation (push) Successful in 5s
Generic: Standards Compliance / Line Length Check (push) Successful in 8s
Generic: Standards Compliance / File Naming Standards (push) Successful in 7s
Generic: Standards Compliance / Insecure Code Pattern Detection (push) Successful in 6s
Generic: Standards Compliance / Version Consistency Check (push) Successful in 1m13s
Generic: Standards Compliance / Code Complexity Analysis (push) Successful in 1m4s
Generic: Standards Compliance / Dead Code Detection (push) Successful in 8s
Generic: Standards Compliance / File Size Limits (push) Successful in 4s
Generic: Standards Compliance / Code Duplication Detection (push) Successful in 53s
Generic: Standards Compliance / TODO/FIXME Tracking (push) Successful in 4s
Generic: Standards Compliance / Binary File Detection (push) Successful in 6s
Generic: Standards Compliance / Broken Link Detection (push) Successful in 3s
Generic: Standards Compliance / API Documentation Coverage (push) Successful in 3s
Generic: Standards Compliance / Accessibility Check (push) Successful in 4s
Generic: Standards Compliance / Performance Metrics (push) Successful in 3s
Generic: Standards Compliance / Unused Dependencies Check (push) Successful in 1m0s
Generic: Standards Compliance / Dependency Vulnerability Scanning (push) Successful in 1m6s
Generic: Standards Compliance / Enterprise Readiness Check (push) Successful in 1m20s
Generic: Standards Compliance / Terraform Configuration Validation (push) Successful in 31s
Generic: Standards Compliance / Repository Health Check (push) Successful in 1m4s
Generic: Standards Compliance / Compliance Summary (push) Has been cancelled
A root-owned named volume made the first store write fail with HTTP 500 (the
container runs as app). Create + chown /data before VOLUME so a fresh volume
inherits app ownership.

Authored-by: Moko Consulting
Claude-Session: https://claude.ai/code/session_015UauDPfYC8S2mdUhoSK8zQ
Signed-off-by: Jonathan Miller <jmiller@mokoconsulting.tech>
2026-07-21 15:53:25 -05:00
Moko Consulting 0afe20ed26 fix: drop LT_LOAD_ONLY='' from reference compose (empty = zero models, crashes LT)
Cascade Main -> Dev / Cascade main -> dev (push) Successful in 4s
Deploy (Prod) / Deploy to Prod (push) Has been skipped
Universal: Push Notifications / push-notify (push) Successful in 2s
Generic: Standards Compliance / Secret Scanning (push) Successful in 3s
Generic: Standards Compliance / Repository Structure Validation (push) Failing after 5s
Generic: Standards Compliance / License Header Validation (push) Successful in 9s
Generic: Standards Compliance / Coding Standards Check (push) Successful in 4s
Generic: Standards Compliance / Workflow Configuration Check (push) Failing after 5s
Generic: Standards Compliance / Documentation Quality Check (push) Failing after 4s
Generic: Standards Compliance / README Completeness Check (push) Failing after 4s
Generic: Standards Compliance / Git Repository Hygiene (push) Successful in 4s
Generic: Standards Compliance / Script Integrity Validation (push) Successful in 5s
Generic: Standards Compliance / Line Length Check (push) Successful in 4s
Generic: Standards Compliance / File Naming Standards (push) Successful in 3s
Generic: Standards Compliance / Insecure Code Pattern Detection (push) Successful in 3s
Generic: Standards Compliance / Version Consistency Check (push) Successful in 48s
Generic: Standards Compliance / Dead Code Detection (push) Successful in 6s
Generic: Standards Compliance / File Size Limits (push) Successful in 4s
Generic: Standards Compliance / Binary File Detection (push) Successful in 4s
Generic: Standards Compliance / TODO/FIXME Tracking (push) Successful in 4s
Generic: Standards Compliance / Code Duplication Detection (push) Successful in 53s
Generic: Standards Compliance / Code Complexity Analysis (push) Successful in 54s
Generic: Standards Compliance / Broken Link Detection (push) Successful in 4s
Generic: Standards Compliance / API Documentation Coverage (push) Successful in 3s
Generic: Standards Compliance / Accessibility Check (push) Successful in 4s
Generic: Standards Compliance / Performance Metrics (push) Successful in 3s
Generic: Standards Compliance / Dependency Vulnerability Scanning (push) Successful in 52s
Generic: Standards Compliance / Unused Dependencies Check (push) Successful in 56s
Generic: Standards Compliance / Terraform Configuration Validation (push) Successful in 18s
Generic: Standards Compliance / Enterprise Readiness Check (push) Successful in 1m3s
Generic: Standards Compliance / Repository Health Check (push) Successful in 1m8s
Generic: Standards Compliance / Compliance Summary (push) Has been cancelled
Authored-by: Moko Consulting
Claude-Session: https://claude.ai/code/session_015UauDPfYC8S2mdUhoSK8zQ
Signed-off-by: Jonathan Miller <jmiller@mokoconsulting.tech>
2026-07-21 15:01:54 -05:00
Moko Consulting 35e8e16ccf feat(ui): rebuild admin GUI on Bootstrap 5 + Font Awesome 7 with MokoOnyx theme switcher
Deploy (Prod) / Deploy to Prod (push) Has been skipped
Cascade Main -> Dev / Cascade main -> dev (push) Successful in 4s
Generic: Standards Compliance / Secret Scanning (push) Successful in 3s
Generic: Standards Compliance / License Header Validation (push) Successful in 3s
Universal: Push Notifications / push-notify (push) Successful in 7s
Generic: Standards Compliance / Repository Structure Validation (push) Failing after 3s
Generic: Standards Compliance / Coding Standards Check (push) Successful in 3s
Generic: Standards Compliance / Workflow Configuration Check (push) Failing after 3s
Generic: Standards Compliance / Documentation Quality Check (push) Failing after 2s
Generic: Standards Compliance / README Completeness Check (push) Failing after 2s
Generic: Standards Compliance / Git Repository Hygiene (push) Successful in 3s
Generic: Standards Compliance / Line Length Check (push) Successful in 4s
Generic: Standards Compliance / Script Integrity Validation (push) Successful in 5s
Generic: Standards Compliance / File Naming Standards (push) Successful in 3s
Generic: Standards Compliance / Insecure Code Pattern Detection (push) Successful in 4s
Generic: Standards Compliance / Version Consistency Check (push) Successful in 50s
Generic: Standards Compliance / Dead Code Detection (push) Successful in 5s
Generic: Standards Compliance / Code Duplication Detection (push) Successful in 42s
Generic: Standards Compliance / File Size Limits (push) Successful in 4s
Generic: Standards Compliance / Binary File Detection (push) Successful in 4s
Generic: Standards Compliance / TODO/FIXME Tracking (push) Successful in 3s
Generic: Standards Compliance / Code Complexity Analysis (push) Successful in 49s
Generic: Standards Compliance / Broken Link Detection (push) Successful in 4s
Generic: Standards Compliance / API Documentation Coverage (push) Successful in 4s
Generic: Standards Compliance / Accessibility Check (push) Successful in 3s
Generic: Standards Compliance / Performance Metrics (push) Successful in 3s
Generic: Standards Compliance / Unused Dependencies Check (push) Successful in 39s
Generic: Standards Compliance / Dependency Vulnerability Scanning (push) Successful in 42s
Generic: Standards Compliance / Terraform Configuration Validation (push) Successful in 7s
Generic: Standards Compliance / Enterprise Readiness Check (push) Successful in 44s
Generic: Standards Compliance / Repository Health Check (push) Successful in 1m25s
Generic: Standards Compliance / Compliance Summary (push) Has been cancelled
Replace the hand-rolled CSS with the MokoOnyx stack (Bootstrap 5.3, Font Awesome
7.3.1) and brand tokens (--mk-primary #112855, --mk-accent #3f8ff0). Adds a
light/dark/auto theme switcher using Bootstrap's data-bs-theme with OS-preference
detection and localStorage persistence, matching MokoOnyx's dark-mode behaviour.
Navbar, metric cards, tables, key-create form and one-time-key banner are now
Bootstrap components with FA icons. External assets pinned with SRI + crossorigin.

Authored-by: Moko Consulting
Claude-Session: https://claude.ai/code/session_015UauDPfYC8S2mdUhoSK8zQ
Signed-off-by: Jonathan Miller <jmiller@mokoconsulting.tech>
2026-07-21 14:08:09 -05:00
Moko Consulting 4d8c6073a9 feat: scaffold MokoTranslate — Go admin GUI + gateway for LibreTranslate
Deploy (Prod) / Deploy to Prod (push) Has been skipped
Cascade Main -> Dev / Cascade main -> dev (push) Successful in 7s
Generic: Standards Compliance / Secret Scanning (push) Successful in 6s
Universal: Push Notifications / push-notify (push) Successful in 9s
Generic: Standards Compliance / License Header Validation (push) Successful in 4s
Generic: Standards Compliance / Repository Structure Validation (push) Failing after 3s
Generic: Standards Compliance / Workflow Configuration Check (push) Failing after 4s
Generic: Standards Compliance / Coding Standards Check (push) Successful in 5s
Generic: Standards Compliance / Documentation Quality Check (push) Failing after 3s
Generic: Standards Compliance / README Completeness Check (push) Failing after 3s
Generic: Standards Compliance / Git Repository Hygiene (push) Successful in 4s
Generic: Standards Compliance / Script Integrity Validation (push) Successful in 6s
Generic: Standards Compliance / Line Length Check (push) Successful in 6s
Generic: Standards Compliance / File Naming Standards (push) Successful in 6s
Generic: Standards Compliance / Insecure Code Pattern Detection (push) Successful in 4s
Generic: Standards Compliance / Version Consistency Check (push) Successful in 46s
Generic: Standards Compliance / Dead Code Detection (push) Successful in 9s
Generic: Standards Compliance / File Size Limits (push) Successful in 4s
Generic: Standards Compliance / Binary File Detection (push) Successful in 5s
Generic: Standards Compliance / TODO/FIXME Tracking (push) Successful in 6s
Generic: Standards Compliance / Code Complexity Analysis (push) Successful in 1m2s
Generic: Standards Compliance / Code Duplication Detection (push) Successful in 1m22s
Generic: Standards Compliance / Broken Link Detection (push) Successful in 7s
Generic: Standards Compliance / API Documentation Coverage (push) Successful in 6s
Generic: Standards Compliance / Accessibility Check (push) Successful in 8s
Generic: Standards Compliance / Performance Metrics (push) Successful in 7s
Generic: Standards Compliance / Dependency Vulnerability Scanning (push) Successful in 1m24s
Generic: Standards Compliance / Unused Dependencies Check (push) Successful in 1m22s
Generic: Standards Compliance / Terraform Configuration Validation (push) Successful in 30s
Generic: Standards Compliance / Enterprise Readiness Check (push) Successful in 2m3s
Generic: Standards Compliance / Repository Health Check (push) Successful in 1m58s
Generic: Standards Compliance / Compliance Summary (push) Has been cancelled
LibreTranslate has no admin web GUI (only a translation playground; keys via
the ltmanage CLI + SQLite, metrics via a raw Prometheus endpoint). MokoTranslate
is the public front door for a private LibreTranslate engine: it owns API-key
auth, per-key rate limits and usage logging, and serves a browser dashboard.

- pure standard-library JSON store (zero third-party deps, no go.sum) holding
  keys (SHA-256 hashed), per-key aggregate usage, and a bounded event ring
- reverse-proxy gateway to /translate, /detect, /languages, etc.
- config via MT_* env vars; graceful shutdown; /healthz
- Dockerfile (CGO_ENABLED=0 static) + reference docker-compose (LT kept private)
- seeded MokoStandards scaffolding from Template-Go (.mokogit suite, dotfiles),
  .moko-platform set to "go"
- ci-go.yml Go pipeline (vet/gofmt/build/test/image); rate-limit strategy left
  as a documented TODO in middleware.go

Authored-by: Moko Consulting
Claude-Session: https://claude.ai/code/session_015UauDPfYC8S2mdUhoSK8zQ
Signed-off-by: Jonathan Miller <jmiller@mokoconsulting.tech>
2026-07-21 13:45:22 -05:00
jmiller aab05454a0 Initial commit 2026-07-21 18:25:34 +00:00