API — The Power of Execution
pages/videos/ContractBot API_ The Power of Execution_1.mp4 (max 25 MiB per file on Pages).
Architecture, APIs, monetization engine, AI decision systems, and simulation stack.
Scroll sideways for the next film — same pattern as a streaming preview row.
pages/videos/ContractBot API_ The Power of Execution_1.mp4 (max 25 MiB per file on Pages).
pages/videos/ContractBot Architecture_ The Execution Gate_1.mp4 (max 25 MiB per file on Pages).
ContractBot is an AI-driven LegalTech platform for SMB/SME organizations. It combines legal document intelligence, contract lifecycle operations, e-signature and invoicing with a self-learning monetization system.
High-level runtime and decision flow.
graph TD
A[Landing / Scan / Result] --> B[Cloudflare Workers API]
B --> C[Decision Layer: Score + Bandit + RL + Meta]
C --> D[Checkout / Subscription via Stripe]
D --> E[Webhook Feedback]
E --> C
B --> F[KV State: Features, Lifecycle, Models, Q-table]
B --> G[R2 Upload Storage]
F --> H[Analytics / Alerts / Dashboards]
F --> I[Simulation Sandbox + Digital Twin + Investor Sim]
Landing -> Scan -> Result -> Checkout
-> Webhook feedback -> Model updates
-> Decision engines (Bandit/RL/Meta)
-> Analytics + Simulation
Copy ready-to-use base URLs and environment summary.
Environment summary: - Runtime: Cloudflare Workers + Pages - Storage: KV (features/models/lifecycle), R2 (uploads) - Billing: Stripe (one-time + subscription + webhook) - Scheduling: Cron jobs (aggregation + retention)
Copy the commands below to validate integration in minutes: health, decisioning, and admin funnel.
1) Health check (public)
curl -sS "https://contractbot.eu/api/health"
2) Decisioning (public, JSON)
curl -sS -X POST "https://contractbot.eu/api/meta/decision" \
-H "Content-Type: application/json" \
-d '{"user_id":"dev_demo_user","score":78,"segment":"WARM","device":"desktop","session_id":"dev_demo_session"}'
3) Admin funnel (requires admin key)
curl -sS "https://contractbot.eu/api/admin/funnel" \ -H "x-admin-key: YOUR_ADMIN_KEY"
Auth summary: - Public endpoints: no key required (for example /api/health, /api/meta/decision) - Admin endpoints: x-admin-key header required - JSON endpoints: use Content-Type: application/json
Manual smoke test before release: open each URL and confirm expected content (not fallback landing).
/README_TECH.md, /PRODUCT_CAPABILITIES.md, /API_REFERENCE.md, /docs/INDEX.md, /docs/DEV_VIDEO_SCRIPT.md) resolve to expected doc content (not landing fallback).Quick CLI check (status + final URL): curl -I https://app.contractbot.eu/tech-docs/ curl -I https://app.contractbot.eu/investor-dashboard curl -I https://app.contractbot.eu/privacy curl -I https://app.contractbot.eu/terms curl -I https://app.contractbot.eu/dpa curl -I https://app.contractbot.eu/ai-disclaimer
Stripe is a checkout lock, not a code vault. Access control must be backend-only.
User clicks pay -> Stripe Checkout -> Stripe webhook confirms payment -> Worker stores entitlement (paid/plan/features) -> API validates entitlement before returning full result
price_id to features only in Worker/backend.These files are part of the product surface for onboarding, integrations, and enterprise demos.
Public documentation describes integration behavior, not backend implementation.
Mandatory release gate: BASE_URL="https://app.contractbot.eu" npm run check:release Deploy is valid only if: - check:docs passes - check:security passes - check:entitlement passes - protected paths return 404/403 - public docs return real content - no secret signatures are leaked