oneie 3.7.0 → 3.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -9
- package/dist/commands/agent.d.ts +2 -0
- package/dist/commands/agent.d.ts.map +1 -1
- package/dist/commands/agent.js +44 -0
- package/dist/commands/agent.js.map +1 -1
- package/dist/commands/bounty.d.ts +4 -0
- package/dist/commands/bounty.d.ts.map +1 -0
- package/dist/commands/bounty.js +24 -0
- package/dist/commands/bounty.js.map +1 -0
- package/dist/commands/capabilities.d.ts +4 -0
- package/dist/commands/capabilities.d.ts.map +1 -0
- package/dist/commands/capabilities.js +18 -0
- package/dist/commands/capabilities.js.map +1 -0
- package/dist/commands/commend.d.ts +4 -0
- package/dist/commands/commend.d.ts.map +1 -0
- package/dist/commands/commend.js +13 -0
- package/dist/commands/commend.js.map +1 -0
- package/dist/commands/completion.d.ts +4 -0
- package/dist/commands/completion.d.ts.map +1 -0
- package/dist/commands/completion.js +49 -0
- package/dist/commands/completion.js.map +1 -0
- package/dist/commands/config.d.ts +4 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +78 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/doctor.d.ts +4 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +72 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/export.d.ts +4 -0
- package/dist/commands/export.d.ts.map +1 -0
- package/dist/commands/export.js +15 -0
- package/dist/commands/export.js.map +1 -0
- package/dist/commands/fade.d.ts.map +1 -1
- package/dist/commands/fade.js +8 -4
- package/dist/commands/fade.js.map +1 -1
- package/dist/commands/flag.d.ts +4 -0
- package/dist/commands/flag.d.ts.map +1 -0
- package/dist/commands/flag.js +13 -0
- package/dist/commands/flag.js.map +1 -0
- package/dist/commands/health.d.ts +4 -0
- package/dist/commands/health.d.ts.map +1 -0
- package/dist/commands/health.js +11 -0
- package/dist/commands/health.js.map +1 -0
- package/dist/commands/highways.d.ts.map +1 -1
- package/dist/commands/highways.js +7 -4
- package/dist/commands/highways.js.map +1 -1
- package/dist/commands/hire.d.ts +4 -0
- package/dist/commands/hire.d.ts.map +1 -0
- package/dist/commands/hire.js +16 -0
- package/dist/commands/hire.js.map +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +69 -42
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/mark.d.ts.map +1 -1
- package/dist/commands/mark.js +7 -7
- package/dist/commands/mark.js.map +1 -1
- package/dist/commands/pay.d.ts +4 -0
- package/dist/commands/pay.d.ts.map +1 -0
- package/dist/commands/pay.js +21 -0
- package/dist/commands/pay.js.map +1 -0
- package/dist/commands/pipe.d.ts +4 -0
- package/dist/commands/pipe.d.ts.map +1 -0
- package/dist/commands/pipe.js +35 -0
- package/dist/commands/pipe.js.map +1 -0
- package/dist/commands/publish.d.ts +4 -0
- package/dist/commands/publish.d.ts.map +1 -0
- package/dist/commands/publish.js +23 -0
- package/dist/commands/publish.js.map +1 -0
- package/dist/commands/repl.d.ts +4 -0
- package/dist/commands/repl.d.ts.map +1 -0
- package/dist/commands/repl.js +56 -0
- package/dist/commands/repl.js.map +1 -0
- package/dist/commands/revenue.d.ts +4 -0
- package/dist/commands/revenue.d.ts.map +1 -0
- package/dist/commands/revenue.js +11 -0
- package/dist/commands/revenue.js.map +1 -0
- package/dist/commands/stats.d.ts +4 -0
- package/dist/commands/stats.d.ts.map +1 -0
- package/dist/commands/stats.js +11 -0
- package/dist/commands/stats.js.map +1 -0
- package/dist/commands/status.d.ts +4 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +18 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/tail.d.ts +4 -0
- package/dist/commands/tail.d.ts.map +1 -0
- package/dist/commands/tail.js +51 -0
- package/dist/commands/tail.js.map +1 -0
- package/dist/commands/warn.d.ts.map +1 -1
- package/dist/commands/warn.js +6 -6
- package/dist/commands/warn.js.map +1 -1
- package/dist/index.js +61 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/args.d.ts +1 -0
- package/dist/lib/args.d.ts.map +1 -1
- package/dist/lib/args.js +3 -0
- package/dist/lib/args.js.map +1 -1
- package/dist/lib/output.d.ts +5 -0
- package/dist/lib/output.d.ts.map +1 -0
- package/dist/lib/output.js +32 -0
- package/dist/lib/output.js.map +1 -0
- package/dist/lib/sdk.d.ts +10 -0
- package/dist/lib/sdk.d.ts.map +1 -0
- package/dist/lib/sdk.js +22 -0
- package/dist/lib/sdk.js.map +1 -0
- package/dist/utils/installation-setup.d.ts +15 -0
- package/dist/utils/installation-setup.d.ts.map +1 -1
- package/dist/utils/installation-setup.js +63 -0
- package/dist/utils/installation-setup.js.map +1 -1
- package/package.json +3 -18
- package/.claude/agents/TROUBLESHOOTING.md +0 -530
- package/.claude/agents/agent-backend.md +0 -574
- package/.claude/agents/agent-builder.md +0 -911
- package/.claude/agents/agent-claude.md +0 -645
- package/.claude/agents/agent-clean.md +0 -477
- package/.claude/agents/agent-clone.md +0 -554
- package/.claude/agents/agent-designer.md +0 -1080
- package/.claude/agents/agent-director.md +0 -2254
- package/.claude/agents/agent-documenter.md +0 -688
- package/.claude/agents/agent-frontend.md +0 -1199
- package/.claude/agents/agent-integrator.md +0 -670
- package/.claude/agents/agent-lawyer.md +0 -1320
- package/.claude/agents/agent-news.md +0 -363
- package/.claude/agents/agent-onboard.md +0 -613
- package/.claude/agents/agent-ontology.md +0 -585
- package/.claude/agents/agent-ops.md +0 -1275
- package/.claude/agents/agent-problem-solver.md +0 -669
- package/.claude/agents/agent-quality.md +0 -1042
- package/.claude/agents/agent-sales.md +0 -507
- package/.claude/agents/agent-writer.md +0 -1068
- package/.claude/commands/cascade.md +0 -742
- package/.claude/commands/chat.md +0 -728
- package/.claude/commands/commit.md +0 -95
- package/.claude/commands/create.md +0 -544
- package/.claude/commands/deploy.md +0 -309
- package/.claude/commands/fast.md +0 -636
- package/.claude/commands/mcp-on.md +0 -191
- package/.claude/commands/media-upload.md +0 -186
- package/.claude/commands/news.md +0 -274
- package/.claude/commands/onboard.md +0 -440
- package/.claude/commands/one.md +0 -398
- package/.claude/commands/optimize.md +0 -74
- package/.claude/commands/plan.md +0 -719
- package/.claude/commands/push.md +0 -214
- package/.claude/commands/release.md +0 -105
- package/.claude/commands/review.md +0 -99
- package/.claude/commands/server.md +0 -487
- package/.claude/commands/start.md +0 -227
- package/.claude/commands/test.md +0 -197
- package/.claude/commands/validate.md +0 -140
- package/.claude/hooks/.last-news-context +0 -1
- package/.claude/hooks/PULL-BEFORE-PUSH-GUIDE.md +0 -473
- package/.claude/hooks/README-knowledge-hooks.md +0 -451
- package/.claude/hooks/README-news-generation.md +0 -364
- package/.claude/hooks/README-root-cleanup.md +0 -200
- package/.claude/hooks/README.md +0 -284
- package/.claude/hooks/__pycache__/todo.cpython-312.pyc +0 -0
- package/.claude/hooks/__pycache__/todo.cpython-313.pyc +0 -0
- package/.claude/hooks/auto-format.sh +0 -106
- package/.claude/hooks/check-filenames.py +0 -177
- package/.claude/hooks/clean-post.py +0 -468
- package/.claude/hooks/clean-pre.py +0 -393
- package/.claude/hooks/clean-root-markdown.sh +0 -73
- package/.claude/hooks/commit-push.sh +0 -95
- package/.claude/hooks/done.py +0 -236
- package/.claude/hooks/format-hook.sh +0 -163
- package/.claude/hooks/formatting.py +0 -187
- package/.claude/hooks/hook-logger.sh +0 -173
- package/.claude/hooks/knowledge-post.py +0 -355
- package/.claude/hooks/knowledge-pre.py +0 -245
- package/.claude/hooks/mcp-on.sh +0 -134
- package/.claude/hooks/notification-hook.sh +0 -279
- package/.claude/hooks/ontology-validation.py +0 -255
- package/.claude/hooks/push.sh +0 -153
- package/.claude/hooks/release-cli.sh +0 -205
- package/.claude/hooks/root-cleanup.py +0 -217
- package/.claude/hooks/security-hook.sh +0 -397
- package/.claude/hooks/tag-all-docs.py +0 -464
- package/.claude/hooks/test-validate-ontology.sh +0 -170
- package/.claude/hooks/todo.py +0 -368
- package/.claude/hooks/track-changes.sh +0 -101
- package/.claude/hooks/validate-imports.py +0 -182
- package/.claude/hooks/validate-ontology-structure-summary.md +0 -243
- package/.claude/hooks/validate-ontology-structure.py +0 -558
- package/.claude/hooks/validate-ontology-structure.py.backup +0 -518
- package/.claude/hooks/validate-ontology.py +0 -140
- package/.claude/hooks/write-news.sh +0 -194
- package/.claude/skills/INDEX.md +0 -523
- package/.claude/skills/REGISTRY.md +0 -529
- package/.claude/skills/agent-backend-create-mutation.md +0 -319
- package/.claude/skills/agent-designer-create-wireframe.md +0 -341
- package/.claude/skills/agent-frontend-create-page.md +0 -413
- package/.claude/skills/agents/README.md +0 -238
- package/.claude/skills/astro/add-content-collection.md +0 -30
- package/.claude/skills/astro/check-build.md +0 -29
- package/.claude/skills/astro/create-component.md +0 -29
- package/.claude/skills/astro/create-page.md +0 -30
- package/.claude/skills/astro/optimize-performance.md +0 -21
- package/.claude/skills/convex/check-deployment.md +0 -46
- package/.claude/skills/convex/create-mutation.md +0 -405
- package/.claude/skills/convex/create-query.md +0 -52
- package/.claude/skills/convex/read-schema.md +0 -373
- package/.claude/skills/convex/test-function.md +0 -50
- package/.claude/skills/deployment/check-deployment-health.md +0 -20
- package/.claude/skills/deployment/create-release.md +0 -21
- package/.claude/skills/deployment/deploy-cloudflare.md +0 -31
- package/.claude/skills/deployment/deploy-convex.md +0 -30
- package/.claude/skills/deployment/sync-repositories.md +0 -19
- package/.claude/skills/design/check-accessibility.md +0 -21
- package/.claude/skills/design/create-component-spec.md +0 -27
- package/.claude/skills/design/generate-design-tokens.md +0 -24
- package/.claude/skills/design/generate-wireframe.md +0 -30
- package/.claude/skills/documentation/create-migration-guide.md +0 -20
- package/.claude/skills/documentation/generate-api-docs.md +0 -27
- package/.claude/skills/documentation/generate-readme.md +0 -22
- package/.claude/skills/documentation/update-knowledge.md +0 -20
- package/.claude/skills/integration/connect-external-system.md +0 -21
- package/.claude/skills/integration/implement-a2a.md +0 -20
- package/.claude/skills/integration/implement-acp.md +0 -20
- package/.claude/skills/integration/verify-integration.md +0 -20
- package/.claude/skills/ontology/README.md +0 -255
- package/.claude/skills/ontology/check-dimension.md +0 -307
- package/.claude/skills/ontology/generate-entity-type.md +0 -339
- package/.claude/skills/ontology/validate-schema.md +0 -229
- package/.claude/skills/ontology/verify-relationships.md +0 -310
- package/.claude/skills/problem-solving/analyze-test-failure.md +0 -21
- package/.claude/skills/problem-solving/identify-root-cause.md +0 -20
- package/.claude/skills/problem-solving/propose-solution.md +0 -29
- package/.claude/skills/problem-solving/verify-fix.md +0 -21
- package/.claude/skills/sales/generate-demo-script.md +0 -21
- package/.claude/skills/sales/qualify-lead.md +0 -30
- package/.claude/skills/sales/track-trial.md +0 -20
- package/.claude/skills/sales/verify-kyc.md +0 -20
- package/.claude/skills/testing/analyze-coverage.md +0 -24
- package/.claude/skills/testing/generate-tests.md +0 -24
- package/.claude/skills/testing/run-tests.md +0 -27
- package/.claude/skills/testing/validate-e2e.md +0 -25
- package/AGENTS.md +0 -60
- package/CLAUDE.md +0 -130
- package/CREATE-WEBSITE.md +0 -458
- package/SECURITY.md +0 -31
- package/folders.yaml +0 -92
- package/one/README.md +0 -760
- package/one/actors/anthony-o-connell.md +0 -469
- package/one/actors/people.md +0 -590
- package/one/events/0-changes.md +0 -2764
- package/one/events/1-PROJECTS-START-HERE.md +0 -384
- package/one/events/1-projects-developer-quickstart.md +0 -620
- package/one/events/1-projects-feature.md +0 -2047
- package/one/events/1-projects-team-briefing.md +0 -583
- package/one/events/2024-10-14-deployment-plan.md +0 -330
- package/one/events/2024-10-14-deployment-success.md +0 -447
- package/one/events/2024-10-14-final-sync-complete.md +0 -250
- package/one/events/2024-10-14-release-v2.0.6.md +0 -414
- package/one/events/2024-10-15-agent-clean-v2-summary.md +0 -495
- package/one/events/2024-10-15-handoff-to-clean.md +0 -347
- package/one/events/2024-10-15-package-manager-tests.md +0 -442
- package/one/events/2024-10-15-release-command-complete.md +0 -416
- package/one/events/2025-10-15-private-files-secured.md +0 -359
- package/one/events/2025-10-15-unignore-public-group-docs.md +0 -298
- package/one/events/2025-11-08-backend-claude-refactor.md +0 -242
- package/one/events/2025-11-08-parallel-agent-implementation.md +0 -620
- package/one/events/2025-11-10-ai-integration-status-report.md +0 -241
- package/one/events/ACCESSIBILITY_CHECKLIST.md +0 -275
- package/one/events/ACCESSIBILITY_FIXES_SUMMARY.md +0 -293
- package/one/events/ALIGNMENT_REPORT_PROBLEM_SOLVER.md +0 -335
- package/one/events/ALIGNMENT_SUMMARY.md +0 -280
- package/one/events/API_ROUTES_FIXES_SUMMARY.md +0 -280
- package/one/events/ASTRO-INTEGRATION-EXAMPLES.md +0 -654
- package/one/events/AUDIT-ONTOLOGY-ALIGNMENT.md +0 -598
- package/one/events/AUDIT_PLAN_COMPLETION-20251108-125555.md +0 -262
- package/one/events/BEFORE_AFTER_COMPARISON.md +0 -978
- package/one/events/CART-DRAWER-INTEGRATION-GUIDE.md +0 -372
- package/one/events/CASCADE-2-BACKEND-AGNOSTIC.md +0 -430
- package/one/events/CHARTS-READY-TO-USE-20251106-080939.md +0 -184
- package/one/events/CHARTS-SUMMARY-20251106-080938.md +0 -196
- package/one/events/CLAUDE copy.md +0 -897
- package/one/events/CLEANUP-RELEASE-V2.0.8.md +0 -308
- package/one/events/CLOUDFLARE-FS-FIX-20251106-100516.md +0 -75
- package/one/events/COMPONENT_SHOWCASE-20251106-080938.md +0 -629
- package/one/events/CONNECTIONS_DEMO.md +0 -519
- package/one/events/CREATE-WEBSITE.md +0 -460
- package/one/events/CRITICAL-FIXES-COMPLETE.md +0 -571
- package/one/events/CUSTOM-DOMAIN.md +0 -375
- package/one/events/DELIVERABLES.md +0 -450
- package/one/events/DELIVERABLES.txt +0 -273
- package/one/events/DEMO-GROUPS-PAGE.md +0 -410
- package/one/events/DEMO-TESTING-SUMMARY.md +0 -536
- package/one/events/DEMO_COMPONENTS.md +0 -505
- package/one/events/DEMO_HOOKS_INDEX.md +0 -352
- package/one/events/DEMO_INFRASTRUCTURE.md +0 -923
- package/one/events/DEMO_INFRASTRUCTURE_SUMMARY.md +0 -588
- package/one/events/DEMO_INTEGRATION_CHECKLIST.md +0 -449
- package/one/events/DEMO_QUICK_REFERENCE.md +0 -459
- package/one/events/DEMO_SETUP.md +0 -494
- package/one/events/DEPLOYMENT copy.md +0 -444
- package/one/events/DEPLOYMENT.md +0 -196
- package/one/events/DESIGN-DELIVERABLES-20251106-080938.md +0 -557
- package/one/events/DESIGN-EXECUTIVE-SUMMARY-20251106-080938.md +0 -484
- package/one/events/DOCS-SYSTEM-GUIDE-20251105-142103.md +0 -458
- package/one/events/DOCUMENTER-DELIVERY-SUMMARY.md +0 -481
- package/one/events/DOCUMENTER-EXECUTION-GUIDE.md +0 -394
- package/one/events/DOCUMENTER-TASK-BREAKDOWN.md +0 -783
- package/one/events/ECOMMERCE-BEFORE-AFTER.md +0 -267
- package/one/events/ECOMMERCE-DEMO-PLAN.md +0 -243
- package/one/events/ECOMMERCE-ENHANCEMENTS.md +0 -594
- package/one/events/ECOMMERCE-HIGH-CONVERTING-ELEMENTS.md +0 -439
- package/one/events/ECOMMERCE-LIVE-DEMO.md +0 -381
- package/one/events/ECOMMERCE-QUICKSTART.md +0 -376
- package/one/events/ECOMMERCE-README.md +0 -354
- package/one/events/ECOMMERCE-REFACTOR-SUMMARY.md +0 -214
- package/one/events/ECOMMERCE-SETUP-SUMMARY.md +0 -414
- package/one/events/ECOMMERCE-TEMPLATE-COMPLETE.md +0 -753
- package/one/events/ECOMMERCE-TEMPLATES-SUMMARY.md +0 -941
- package/one/events/EFFECT_TS_API_PATTERN.md +0 -496
- package/one/events/EXECUTION-READY.md +0 -359
- package/one/events/EXECUTION-SUMMARY.md +0 -478
- package/one/events/FEATURE-2-4-COMPLETE.md +0 -320
- package/one/events/FEATURE_2_3_COMPLETE.md +0 -593
- package/one/events/FILE-REFERENCE-20251105-142103.md +0 -325
- package/one/events/GRADIENT-TEXT-PERMANENT-FIX.md +0 -241
- package/one/events/GROUPS-MIGRATION.md +0 -643
- package/one/events/GROUPS_DEMO_IMPLEMENTATION.md +0 -432
- package/one/events/HANDOFF.md +0 -331
- package/one/events/HOOKS-DEMO.md +0 -459
- package/one/events/IMPLEMENTATION-CHECKLIST-20251105-142103.md +0 -274
- package/one/events/IMPLEMENTATION-REPORT-DOCS-20251105-142102.md +0 -394
- package/one/events/IMPLEMENTATION-SUMMARY-FINAL.md +0 -568
- package/one/events/IMPLEMENTATION_SUMMARY-20251106-080938.md +0 -571
- package/one/events/IMPLEMENTATION_SUMMARY.md +0 -547
- package/one/events/INDEX-ALL-AGENTS.md +0 -190
- package/one/events/INDEX-FRONTEND-TESTING.md +0 -524
- package/one/events/INDEX-PROBLEM-SOLVER.md +0 -488
- package/one/events/INDEX-QUALITY-AGENT-INFER65.md +0 -455
- package/one/events/INDEX.md +0 -295
- package/one/events/INDEX_QUICK_START_REDESIGN-20251106-080939.md +0 -342
- package/one/events/INSTALL-TESTS.md +0 -311
- package/one/events/INSTALLATION_FOLDERS.md +0 -534
- package/one/events/INSTALLATION_FOLDERS_FILES.md +0 -223
- package/one/events/INSTALLATION_FOLDERS_SUMMARY.md +0 -437
- package/one/events/INTEGRATION-ARCHITECTURE.md +0 -579
- package/one/events/INTEGRATION-CHECKLIST.md +0 -1252
- package/one/events/INTEGRATION-ORCHESTRATION.md +0 -2641
- package/one/events/INTEGRATION-SUMMARY.md +0 -671
- package/one/events/LANDING-PAGE-EXAMPLE-OUTPUT.md +0 -684
- package/one/events/LANDING-PAGE-IMPLEMENTATION.md +0 -660
- package/one/events/LANDING-PAGE-QUICKSTART.md +0 -425
- package/one/events/LICENSE.md +0 -107
- package/one/events/MASTER-COORDINATION-PLAN.md +0 -613
- package/one/events/MASTER-ORCHESTRATION-INFER65.md +0 -441
- package/one/events/MASTER-PLAN-SUMMARY.md +0 -309
- package/one/events/MCP-CONFIGURATION.md +0 -354
- package/one/events/MCP-SETUP-COMPLETE.md +0 -223
- package/one/events/MIGRATION-REPORT.md +0 -453
- package/one/events/MIGRATION.md +0 -87
- package/one/events/MULTI-ONTOLOGY-COMPLETE-GUIDE.md +0 -1663
- package/one/events/MULTI-ONTOLOGY-IMPLEMENTATION-COMPLETE.md +0 -643
- package/one/events/NEWS-COMMANDS.md +0 -506
- package/one/events/NEWS-SYSTEM-SUMMARY.md +0 -480
- package/one/events/NODE-UPGRADE.md +0 -129
- package/one/events/ONBOARDING-IMPLEMENTATION-COMPLETE copy.md +0 -416
- package/one/events/ONTOLOGY-HOOKS-README.md +0 -718
- package/one/events/ONTOLOGY-INTEGRATION-MANIFEST.md +0 -383
- package/one/events/ONTOLOGY-TUTORIALS-SUMMARY.md +0 -569
- package/one/events/ONTOLOGY-TYPE-GENERATOR-SUMMARY.md +0 -491
- package/one/events/ONTOLOGY_DISCOVERY_IMPLEMENTATION.md +0 -504
- package/one/events/ONTOLOGY_DISCOVERY_QUICKSTART.md +0 -221
- package/one/events/PACKAGE-STRUCTURE.md +0 -328
- package/one/events/PLAN-COMPLETE.md +0 -429
- package/one/events/PLAYBOOK-SETUP-SUMMARY.md +0 -349
- package/one/events/PROBLEM-SOLVER-EXECUTIVE-SUMMARY.md +0 -484
- package/one/events/PROBLEM-SOLVER-QUICKSTART.md +0 -420
- package/one/events/PROJECTS-PLAN-SUMMARY.md +0 -480
- package/one/events/PROMPT_FIX_FRONTEND_ONLY.md +0 -585
- package/one/events/QA-CHECKLIST.md +0 -692
- package/one/events/QUALITY-AGENT-SUMMARY.md +0 -334
- package/one/events/QUALITY-EXECUTION-CHECKLIST.md +0 -593
- package/one/events/QUICK-REFERENCE-FRONTEND-TESTING.md +0 -475
- package/one/events/QUICK-START-ONTOLOGY.md +0 -426
- package/one/events/QUICK_START_REDESIGN-20251106-080938.md +0 -400
- package/one/events/README-PROBLEM-SOLVER.md +0 -394
- package/one/events/README-archived.md +0 -537
- package/one/events/README_QUICK_START_REDESIGN-20251106-080938.md +0 -484
- package/one/events/SEARCH_DEMO_CODE_REFERENCE.md +0 -657
- package/one/events/SEARCH_DEMO_DELIVERY.md +0 -433
- package/one/events/SEARCH_DEMO_SUMMARY.md +0 -321
- package/one/events/SEARCH_DEMO_VISUAL_GUIDE.md +0 -399
- package/one/events/SECURITY-AUDIT-FIXES.md +0 -394
- package/one/events/SECURITY-SCAN-COMPLETE.md +0 -299
- package/one/events/SHOP-BUILD-STATUS.md +0 -132
- package/one/events/SHOP-PREMIUM-UPDATE.md +0 -165
- package/one/events/SIMPLE_FIX_FRONTEND_ONLY.md +0 -280
- package/one/events/SITE-WIDE-GRADIENT-FIX.md +0 -317
- package/one/events/SPECIALIST-QUICK-REFERENCE.md +0 -678
- package/one/events/STORE-PRODUCTION-READY-STATUS.md +0 -377
- package/one/events/STRIPE-INTEGRATION.md +0 -432
- package/one/events/STRIPE-PAYMENT-METHODS-GUIDE.md +0 -447
- package/one/events/STRIPE-SETUP-GUIDE.md +0 -480
- package/one/events/TEST-PLAN-INDEX.md +0 -364
- package/one/events/TEST-PLAN.md +0 -1435
- package/one/events/TEST-SUMMARY.md +0 -411
- package/one/events/TESTING-DELIVERY.txt +0 -372
- package/one/events/TESTS-QUICK-REF.md +0 -280
- package/one/events/TRANSITIONS-QUICK-START.md +0 -159
- package/one/events/TRANSPARENCY-FIXES.md +0 -293
- package/one/events/TYPESCRIPT_FIXES.md +0 -170
- package/one/events/TYPESCRIPT_FIXES_COMPLETE.txt +0 -412
- package/one/events/TYPESCRIPT_FIXES_INDEX.md +0 -359
- package/one/events/VERIFICATION_CHECKLIST-20251106-080938.md +0 -326
- package/one/events/VIEW-TRANSITIONS.md +0 -446
- package/one/events/agent-command-implementation.md +0 -305
- package/one/events/agent-director-enhancement-summary.md +0 -404
- package/one/events/agent-director-routing-update.md +0 -214
- package/one/events/agent-onboard-implementation-summary.md +0 -475
- package/one/events/agent-ontology-alignment-completion.md +0 -263
- package/one/events/ai-integration-complete.md +0 -294
- package/one/events/ai-integration-lessons-learned.md +0 -511
- package/one/events/backend-integration-tests.md +0 -624
- package/one/events/backend-structure-diagram.txt +0 -393
- package/one/events/backend-structure-summary.txt +0 -269
- package/one/events/bullfm-video-podcast-analysis.md +0 -319
- package/one/events/clean-agent-ontology-cleanup-report.md +0 -371
- package/one/events/clean-agent-todo-analysis-summary.md +0 -336
- package/one/events/cloudflare-automation-complete.md +0 -350
- package/one/events/cloudflare-pages-infrastructure-setup.md +0 -282
- package/one/events/contact-page-complete.md +0 -316
- package/one/events/convex-analysis-index.md +0 -322
- package/one/events/convex-structure-analysis.md +0 -718
- package/one/events/creation-instructions-9-todos.md +0 -906
- package/one/events/cycle-3-video-player-port-20251108.md +0 -368
- package/one/events/cycle-3-video-player-port-complete-20251108.md +0 -334
- package/one/events/deployment-installation-folders.md +0 -178
- package/one/events/deployment-ops-summary.md +0 -386
- package/one/events/deployment-verification.md +0 -366
- package/one/events/design-spec-complete.md +0 -226
- package/one/events/documentation-audit-index.md +0 -473
- package/one/events/documentation-audit-summary.md +0 -417
- package/one/events/documentation-improvement-roadmap.md +0 -906
- package/one/events/documentation-standards-compliance-report.md +0 -538
- package/one/events/documentation-updates.md +0 -370
- package/one/events/events.md +0 -563
- package/one/events/fix-product-hydration-20251106.md +0 -211
- package/one/events/frontend-effects-complete.md +0 -584
- package/one/events/frontend-effects-orchestration.md +0 -1356
- package/one/events/frontend-effects-risk-register.md +0 -1055
- package/one/events/frontend-effects-week1-assignments.md +0 -1594
- package/one/events/hook-ontology-alignment-summary.md +0 -528
- package/one/events/installation-folders-workflow-integration.md +0 -458
- package/one/events/landing-page-generator.md +0 -476
- package/one/events/legal-assessment-2025-10-16.md +0 -1917
- package/one/events/master-coordination-plan.json +0 -1078
- package/one/events/master-plan-9-todos.md +0 -900
- package/one/events/mobile-performance-optimization.md +0 -179
- package/one/events/onboarding-implementation-complete.md +0 -523
- package/one/events/ontology-audit-agent-clone.md +0 -323
- package/one/events/ontology-test-examples.md +0 -580
- package/one/events/phase1-backend-implementation-complete.md +0 -536
- package/one/events/plan-completion-audit.md +0 -707
- package/one/events/plan-files-updated.md +0 -273
- package/one/events/production-readiness-plan.md +0 -389
- package/one/events/readme.md +0 -100
- package/one/events/release.md +0 -272
- package/one/events/root-cleanup-alignment-report.md +0 -265
- package/one/events/security-fixes-2025-01-15.md +0 -226
- package/one/events/separate-implementation-status.md +0 -555
- package/one/events/server-command-optimization-20251108.md +0 -150
- package/one/events/session-summary-2025-10-18.md +0 -366
- package/one/events/skills-complete.md +0 -351
- package/one/events/skills-infer-6-10-summary.md +0 -70
- package/one/events/skills-phase1-complete.md +0 -281
- package/one/events/specialist-assignments.md +0 -766
- package/one/events/structural-analysis-architecture-vs-plans.md +0 -600
- package/one/events/test-dashboard.md +0 -363
- package/one/events/test-index.md +0 -421
- package/one/events/test-report-ontology.md +0 -611
- package/one/events/testing-summary.md +0 -388
- package/one/events/todo-agent-builder.md +0 -1180
- package/one/events/todo-agent-director.md +0 -164
- package/one/events/todo-agent-documenter.md +0 -1815
- package/one/events/todo-agent-frontend.md +0 -1542
- package/one/events/todo-agent-problem-solver.md +0 -1682
- package/one/events/todo-agent-quality.md +0 -1647
- package/one/events/todo-refactoring-complete.md +0 -408
- package/one/events/wave1-backend-implementation-complete.md +0 -698
- package/one/events/web-AI_INTEGRATION_PHASE2_SUMMARY-20251111-152540.md +0 -529
- package/one/events/web-BUY-IN-CHATGPT-README-20251116-235241.md +0 -491
- package/one/events/web-CHARTS-IMPLEMENTATION-20251106-080939.md +0 -576
- package/one/events/web-CHARTS-QUICKSTART-20251106-080939.md +0 -416
- package/one/events/web-CODE-HIGHLIGHTING-SUMMARY-20251111-152540.md +0 -442
- package/one/events/web-DEPLOYMENT_SUMMARY-20251116-005428.md +0 -290
- package/one/events/web-DESIGN-SUMMARY-20251106-080939.md +0 -514
- package/one/events/web-README-AI-INTEGRATION-20251111-152540.md +0 -196
- package/one/events/web-RECHARTS-INTEGRATION-20251111-152540.md +0 -265
- package/one/events/web-RELEASE_OPTIMIZATION_PLAN-20251116-005428.md +0 -447
- package/one/events/web-TEST-CLEANUP-20251105-143205.md +0 -3
- package/one/events/web-USING-ANY-COMPONENT-IN-CHAT-20251111-152540.md +0 -561
- package/one/events/web-test-code-highlighting-20251111-152540.md +0 -231
- package/one/groups/features.md +0 -2904
- package/one/groups/groups.md +0 -587
- package/one/groups/one.md +0 -619
- package/one/groups/strategy-copy.md +0 -887
- package/one/learning/.obsidian/app.json +0 -1
- package/one/learning/.obsidian/appearance.json +0 -1
- package/one/learning/.obsidian/core-plugins.json +0 -33
- package/one/learning/.obsidian/ecommerce-ontology.md +0 -210
- package/one/learning/.obsidian/workspace.json +0 -211
- package/one/learning/100-inference-quick-reference.md +0 -449
- package/one/learning/ag-ui-protocol.md +0 -613
- package/one/learning/agent-onboard-usage.md +0 -630
- package/one/learning/agentic-commerce.md +0 -146
- package/one/learning/ai-agents-vs-memecoins-thesis.md +0 -683
- package/one/learning/ai-api-reference.md +0 -715
- package/one/learning/ai-platform.md +0 -323
- package/one/learning/ai-quickstart.md +0 -355
- package/one/learning/ai-sdk-implementation.md +0 -436
- package/one/learning/ai-token-crypto-analysis-framework.md +0 -1191
- package/one/learning/ai-token-paradigm-shift-2025.md +0 -732
- package/one/learning/altcoin-cycle-prediction-ontology.md +0 -884
- package/one/learning/altcoin-cycle-trading-strategy.md +0 -642
- package/one/learning/architecture-any-backend.md +0 -1589
- package/one/learning/architecture-diagram.md +0 -404
- package/one/learning/architecture-frontend.md +0 -1014
- package/one/learning/architecture.md +0 -1742
- package/one/learning/archived/ontology.old.md +0 -2840
- package/one/learning/astro-effect-complete-vision.md +0 -2148
- package/one/learning/astro-effect-simple-architecture.md +0 -750
- package/one/learning/audit-agent-onboard-alignment.md +0 -481
- package/one/learning/audit-agent-sales-alignment.md +0 -444
- package/one/learning/backend-api-reference.md +0 -728
- package/one/learning/cascading-context-specification.md +0 -1617
- package/one/learning/claude-code-integration.md +0 -1293
- package/one/learning/cli-claude-handoff.md +0 -736
- package/one/learning/context-engineering.md +0 -610
- package/one/learning/crypto-analysis-strategy.md +0 -1276
- package/one/learning/crypto-cycle-2024-2025-analysis.md +0 -44
- package/one/learning/crypto.md +0 -978
- package/one/learning/develop/design.md +0 -364
- package/one/learning/develop/index.md +0 -145
- package/one/learning/development-commands.md +0 -251
- package/one/learning/docs.md +0 -627
- package/one/learning/dsl.md +0 -1678
- package/one/learning/event-driven-documentation.md +0 -270
- package/one/learning/files.md +0 -2489
- package/one/learning/frontend.md +0 -1056
- package/one/learning/games-english.md +0 -691
- package/one/learning/games.md +0 -1082
- package/one/learning/generative-ui-patterns.md +0 -559
- package/one/learning/guidelines.md +0 -314
- package/one/learning/hono.md +0 -2127
- package/one/learning/implementation-examples.md +0 -2554
- package/one/learning/installation-folders.md +0 -366
- package/one/learning/institutional-cycle-paradigm-2025.md +0 -555
- package/one/learning/knowledge.md +0 -660
- package/one/learning/language.md +0 -998
- package/one/learning/lessons-learned.md +0 -378
- package/one/learning/lessons-website-building-focus.md +0 -382
- package/one/learning/merge-report.md +0 -254
- package/one/learning/metadata-system.md +0 -504
- package/one/learning/nine-padel-playbook.md +0 -229
- package/one/learning/one-protocol-ai-agents.md +0 -892
- package/one/learning/one-protocol-executive-report.md +0 -617
- package/one/learning/one-protocol-standard.md +0 -869
- package/one/learning/one-protocol-whitepaper.md +0 -756
- package/one/learning/ontology-blog.yaml +0 -47
- package/one/learning/ontology-cheatsheet.md +0 -617
- package/one/learning/ontology-community.yaml +0 -65
- package/one/learning/ontology-core-universal.md +0 -740
- package/one/learning/ontology-core.yaml +0 -63
- package/one/learning/ontology-courses.yaml +0 -76
- package/one/learning/ontology-creator.md +0 -402
- package/one/learning/ontology-crypto.md +0 -1603
- package/one/learning/ontology-developer-guide.md +0 -814
- package/one/learning/ontology-documentation.md +0 -377
- package/one/learning/ontology-ecommerce.md +0 -269
- package/one/learning/ontology-education-game.md +0 -1654
- package/one/learning/ontology-education.md +0 -938
- package/one/learning/ontology-engineering-specification.md +0 -1310
- package/one/learning/ontology-engineering.md +0 -1676
- package/one/learning/ontology-files.yaml +0 -525
- package/one/learning/ontology-frontend-master.md +0 -2898
- package/one/learning/ontology-frontend-specifications.md +0 -2196
- package/one/learning/ontology-frontend.md +0 -2475
- package/one/learning/ontology-index.md +0 -397
- package/one/learning/ontology-minimal.yaml +0 -301
- package/one/learning/ontology-portfolio.yaml +0 -45
- package/one/learning/ontology-quickstart.md +0 -602
- package/one/learning/ontology-release.md +0 -317
- package/one/learning/ontology-shop.yaml +0 -148
- package/one/learning/ontology-tokens.yaml +0 -51
- package/one/learning/ontology-tutorial.md +0 -455
- package/one/learning/ontology-v2.md +0 -4449
- package/one/learning/ontology-video-script.md +0 -939
- package/one/learning/ontology-visual-guide.md +0 -378
- package/one/learning/ontology.md +0 -3847
- package/one/learning/ontology.yaml +0 -1653
- package/one/learning/parallel-agents.md +0 -932
- package/one/learning/patterns/backend/convex-mutation-pattern.md +0 -130
- package/one/learning/patterns/backend/convex-query-pattern.md +0 -143
- package/one/learning/patterns/backend/mutation-template.md +0 -249
- package/one/learning/patterns/backend/query-template.md +0 -286
- package/one/learning/patterns/backend/service-template.md +0 -258
- package/one/learning/patterns/design/component-architecture.md +0 -435
- package/one/learning/patterns/design/index.md +0 -160
- package/one/learning/patterns/design/test-driven-design-pattern.md +0 -196
- package/one/learning/patterns/design/wireframe-template.md +0 -250
- package/one/learning/patterns/frontend/component-template.md +0 -246
- package/one/learning/patterns/frontend/form-template.md +0 -348
- package/one/learning/patterns/frontend/page-template.md +0 -209
- package/one/learning/patterns/frontend/react-component-pattern.md +0 -188
- package/one/learning/patterns/test/acceptance-criteria-template.md +0 -396
- package/one/learning/patterns/test/technical-test-template.md +0 -566
- package/one/learning/patterns/test/test-driven-pattern.md +0 -160
- package/one/learning/patterns/test/user-flow-template.md +0 -272
- package/one/learning/performance.md +0 -459
- package/one/learning/provider-agnostic-content.md +0 -995
- package/one/learning/provider-creation-guide.md +0 -1082
- package/one/learning/quality-loop.md +0 -419
- package/one/learning/quick-start-ontology-mapping.md +0 -773
- package/one/learning/readme-architecture.md +0 -158
- package/one/learning/readme.md +0 -149
- package/one/learning/rules.md +0 -644
- package/one/learning/score.md +0 -85
- package/one/learning/specifications.md +0 -873
- package/one/learning/tags.md +0 -148
- package/one/learning/todo-template.md +0 -269
- package/one/learning/todo.md +0 -269
- package/one/learning/troubleshooting.md +0 -434
- package/one/learning/typescript-patterns.md +0 -321
- package/one/learning/universal-generation-language.md +0 -827
- package/one/learning/x402-research.md +0 -104
- package/one/license.md +0 -107
- package/one/paths/a2a.md +0 -600
- package/one/paths/acp.md +0 -808
- package/one/paths/acps.md +0 -749
- package/one/paths/agentkit.md +0 -367
- package/one/paths/agui.md +0 -785
- package/one/paths/any-backend.md +0 -1720
- package/one/paths/ap2.md +0 -1072
- package/one/paths/api/queries-reference.md +0 -860
- package/one/paths/api-docs.md +0 -1909
- package/one/paths/api-reference.md +0 -1029
- package/one/paths/api.md +0 -2208
- package/one/paths/architecture-diagram.md +0 -112
- package/one/paths/communications.md +0 -467
- package/one/paths/connections.md +0 -357
- package/one/paths/copilotkit.md +0 -1577
- package/one/paths/cryptonetworks.md +0 -799
- package/one/paths/documentation.md +0 -1138
- package/one/paths/effect.md +0 -297
- package/one/paths/elizaos.md +0 -1308
- package/one/paths/groups.md +0 -814
- package/one/paths/inference.md +0 -76
- package/one/paths/integration-examples.md +0 -893
- package/one/paths/integration-guide.md +0 -887
- package/one/paths/integration-phase2.md +0 -754
- package/one/paths/kyc.md +0 -650
- package/one/paths/mcp.md +0 -860
- package/one/paths/membership.md +0 -1170
- package/one/paths/middleware.md +0 -1085
- package/one/paths/multitenant.md +0 -1359
- package/one/paths/n8n.md +0 -1033
- package/one/paths/patterns.md +0 -107
- package/one/paths/protocols.md +0 -297
- package/one/paths/relationships.md +0 -125
- package/one/paths/schema.md +0 -605
- package/one/paths/service-layer.md +0 -568
- package/one/paths/vectors.md +0 -225
- package/one/paths/wordpress.md +0 -1320
- package/one/paths/workflow-copy.md +0 -923
- package/one/paths/workflow-examples.md +0 -759
- package/one/paths/workflow-onboarding.md +0 -701
- package/one/paths/workflow.md +0 -923
- package/one/paths/workflows/delegation.md +0 -903
- package/one/paths/workflows/frontend.md +0 -1055
- package/one/paths/workflows/strategy.md +0 -921
- package/one/paths/workflows/tasks.md +0 -716
- package/one/paths/x402-baazar.md +0 -131
- package/one/paths/x402.md +0 -1353
- package/one/things/ALIGNMENT_AUDIT_QUALITY_AGENT.md +0 -401
- package/one/things/AUDIT_AGENT_INTEGRATOR_ALIGNMENT.md +0 -588
- package/one/things/AUDIT_REPORT_AGENT_CLEAN.md +0 -461
- package/one/things/CHECKLIST.md +0 -407
- package/one/things/IMPLEMENTATION_STATUS.md +0 -379
- package/one/things/ONE.md +0 -529
- package/one/things/agents/agent-backend.md +0 -1501
- package/one/things/agents/agent-builder.md +0 -1064
- package/one/things/agents/agent-clean.md +0 -1112
- package/one/things/agents/agent-clone.md +0 -1324
- package/one/things/agents/agent-deploy.md +0 -986
- package/one/things/agents/agent-designer.md +0 -2305
- package/one/things/agents/agent-director.md +0 -1526
- package/one/things/agents/agent-documenter.md +0 -1129
- package/one/things/agents/agent-frontend.md +0 -1201
- package/one/things/agents/agent-integrator.md +0 -1269
- package/one/things/agents/agent-lawyer.md +0 -1371
- package/one/things/agents/agent-problem-solver.md +0 -1457
- package/one/things/agents/agent-quality.md +0 -1483
- package/one/things/agents/agent-sales.md +0 -1074
- package/one/things/cascade/cascade.yaml +0 -481
- package/one/things/cascade/docs/examples/1-1-agent-prompts/design.md +0 -523
- package/one/things/cascade/docs/examples/1-1-agent-prompts/tests.md +0 -314
- package/one/things/cascade/docs/examples/1-1-agent-prompts.md +0 -562
- package/one/things/cascade/docs/examples/1-2-yaml-orchestrator/design.md +0 -543
- package/one/things/cascade/docs/examples/1-2-yaml-orchestrator/tests.md +0 -272
- package/one/things/cascade/docs/examples/1-2-yaml-orchestrator.md +0 -548
- package/one/things/cascade/docs/examples/1-3-event-coordination/design.md +0 -586
- package/one/things/cascade/docs/examples/1-3-event-coordination/tests.md +0 -267
- package/one/things/cascade/docs/examples/1-3-event-coordination.md +0 -547
- package/one/things/cascade/docs/examples/1-4-knowledge-management/design.md +0 -665
- package/one/things/cascade/docs/examples/1-4-knowledge-management/tests.md +0 -236
- package/one/things/cascade/docs/examples/1-4-knowledge-management.md +0 -652
- package/one/things/cascade/docs/examples/1-5-quality-loops/design.md +0 -860
- package/one/things/cascade/docs/examples/1-5-quality-loops/tests.md +0 -255
- package/one/things/cascade/docs/examples/1-5-quality-loops.md +0 -725
- package/one/things/cascade/docs/examples/1-6-numbering-structure/design.md +0 -659
- package/one/things/cascade/docs/examples/1-6-numbering-structure/tests.md +0 -256
- package/one/things/cascade/docs/examples/1-6-numbering-structure.md +0 -639
- package/one/things/cascade/docs/examples/readme.md +0 -259
- package/one/things/cascade/docs/getting-started.md +0 -533
- package/one/things/cascade/docs/workflow.md +0 -1378
- package/one/things/cascade/readme.md +0 -379
- package/one/things/cascade/templates/feature-template.md +0 -289
- package/one/things/claude/agents/advocacy-activation-manager.md +0 -710
- package/one/things/claude/agents/advocacy-campaign-designer.md +0 -688
- package/one/things/claude/agents/analyst.md +0 -508
- package/one/things/claude/agents/architect.md +0 -505
- package/one/things/claude/agents/brand-identity-specialist.md +0 -538
- package/one/things/claude/agents/bstp-token-strategist.md +0 -690
- package/one/things/claude/agents/builder-repo.md +0 -532
- package/one/things/claude/agents/bullstamp-community-builder.md +0 -597
- package/one/things/claude/agents/bullstamp-marketing-orchestrator.md +0 -529
- package/one/things/claude/agents/bulltilt-platform-growth.md +0 -590
- package/one/things/claude/agents/company-bullstamp-character.md +0 -602
- package/one/things/claude/agents/company-bullstamp-community.md +0 -307
- package/one/things/claude/agents/company-bullstamp-marketing.md +0 -307
- package/one/things/claude/agents/company-bullstamp-token.md +0 -307
- package/one/things/claude/agents/company-bulltilt-growth.md +0 -307
- package/one/things/claude/agents/content-bibliography-formatter.md +0 -404
- package/one/things/claude/agents/content-calendar-planner.md +0 -473
- package/one/things/claude/agents/content-chapter-formatter.md +0 -513
- package/one/things/claude/agents/content-formatter.md +0 -571
- package/one/things/claude/agents/content-hook-specialist.md +0 -485
- package/one/things/claude/agents/content-image-formatter.md +0 -560
- package/one/things/claude/agents/content-introduction-formatter.md +0 -510
- package/one/things/claude/agents/content-multiplication-engine.md +0 -579
- package/one/things/claude/agents/content-playbook-writer.md +0 -473
- package/one/things/claude/agents/content-team-manager.md +0 -647
- package/one/things/claude/agents/content-toc-formatter.md +0 -547
- package/one/things/claude/agents/convex-backend-specialist.md +0 -2725
- package/one/things/claude/agents/core-manager.md +0 -607
- package/one/things/claude/agents/core-master.md +0 -426
- package/one/things/claude/agents/cross-functional-manager.md +0 -476
- package/one/things/claude/agents/crypto-airdrop-strategist.md +0 -622
- package/one/things/claude/agents/crypto-analytics-educator.md +0 -596
- package/one/things/claude/agents/crypto-architecture-specialist.md +0 -497
- package/one/things/claude/agents/crypto-community-analyst.md +0 -314
- package/one/things/claude/agents/crypto-community-psychologist.md +0 -546
- package/one/things/claude/agents/crypto-dex-optimization-expert.md +0 -579
- package/one/things/claude/agents/crypto-dex-optimizer.md +0 -307
- package/one/things/claude/agents/crypto-diamond-formation-specialist.md +0 -552
- package/one/things/claude/agents/crypto-diamond-hands.md +0 -307
- package/one/things/claude/agents/crypto-ecosystem-expansion-manager.md +0 -597
- package/one/things/claude/agents/crypto-engagement-specialist.md +0 -581
- package/one/things/claude/agents/crypto-market-researcher.md +0 -307
- package/one/things/claude/agents/crypto-marketing-orchestrator.md +0 -563
- package/one/things/claude/agents/crypto-network-effect-amplifier.md +0 -614
- package/one/things/claude/agents/crypto-optimization-analyst.md +0 -597
- package/one/things/claude/agents/crypto-strategic-synthesizer.md +0 -556
- package/one/things/claude/agents/crypto-team-manager.md +0 -392
- package/one/things/claude/agents/crypto-token-analyst.md +0 -319
- package/one/things/claude/agents/crypto-viral-content-creator.md +0 -549
- package/one/things/claude/agents/crypto-wallet-identification-expert.md +0 -527
- package/one/things/claude/agents/crypto-wallet-identifier.md +0 -307
- package/one/things/claude/agents/customer-journey-designer.md +0 -474
- package/one/things/claude/agents/customer-success-manager.md +0 -574
- package/one/things/claude/agents/dev.md +0 -406
- package/one/things/claude/agents/documenter.md +0 -548
- package/one/things/claude/agents/elevate-marketing-orchestrator.md +0 -403
- package/one/things/claude/agents/engagement-specialist.md +0 -502
- package/one/things/claude/agents/engineering-architect.md +0 -387
- package/one/things/claude/agents/engineering-business-analyst.md +0 -527
- package/one/things/claude/agents/engineering-developer.md +0 -386
- package/one/things/claude/agents/engineering-director.md +0 -322
- package/one/things/claude/agents/engineering-ingestor.md +0 -659
- package/one/things/claude/agents/engineering-product-manager.md +0 -525
- package/one/things/claude/agents/engineering-product-owner.md +0 -527
- package/one/things/claude/agents/engineering-project-coordinator.md +0 -525
- package/one/things/claude/agents/engineering-quality-assurance.md +0 -392
- package/one/things/claude/agents/engineering-team-manager.md +0 -515
- package/one/things/claude/agents/engineering-user-experience.md +0 -386
- package/one/things/claude/agents/framework-elevate-manager.md +0 -309
- package/one/things/claude/agents/improver.md +0 -805
- package/one/things/claude/agents/intelligence-team-manager.md +0 -390
- package/one/things/claude/agents/lead-capture-expert.md +0 -459
- package/one/things/claude/agents/lead-magnet-creator.md +0 -446
- package/one/things/claude/agents/market-research-analyst.md +0 -435
- package/one/things/claude/agents/marketing-brand-identity.md +0 -344
- package/one/things/claude/agents/marketing-content-hooks.md +0 -455
- package/one/things/claude/agents/marketing-content-multiplier.md +0 -331
- package/one/things/claude/agents/marketing-content-poster.md +0 -372
- package/one/things/claude/agents/marketing-customer-journey.md +0 -331
- package/one/things/claude/agents/marketing-director.md +0 -402
- package/one/things/claude/agents/marketing-engagement.md +0 -331
- package/one/things/claude/agents/marketing-lead-capture.md +0 -331
- package/one/things/claude/agents/marketing-lead-magnet.md +0 -331
- package/one/things/claude/agents/marketing-network-effects.md +0 -331
- package/one/things/claude/agents/marketing-nurture-campaigns.md +0 -331
- package/one/things/claude/agents/marketing-share-optimizer.md +0 -331
- package/one/things/claude/agents/marketing-team-manager.md +0 -451
- package/one/things/claude/agents/marketing-viral-growth.md +0 -232
- package/one/things/claude/agents/mission-commander.md +0 -378
- package/one/things/claude/agents/network-effect-analyst.md +0 -604
- package/one/things/claude/agents/nextjs-15-specialist.md +0 -1634
- package/one/things/claude/agents/npx.md +0 -946
- package/one/things/claude/agents/nurture-campaign-manager.md +0 -554
- package/one/things/claude/agents/one-master.md +0 -378
- package/one/things/claude/agents/one-orchestrator.md +0 -345
- package/one/things/claude/agents/one.md +0 -658
- package/one/things/claude/agents/playbook-generator.md +0 -526
- package/one/things/claude/agents/pm.md +0 -349
- package/one/things/claude/agents/po.md +0 -370
- package/one/things/claude/agents/qa.md +0 -361
- package/one/things/claude/agents/research-foundation-analyst.md +0 -324
- package/one/things/claude/agents/research-intelligence-gatherer.md +0 -435
- package/one/things/claude/agents/research-market-analyst.md +0 -324
- package/one/things/claude/agents/research-team-manager.md +0 -489
- package/one/things/claude/agents/sales-environment-optimizer.md +0 -519
- package/one/things/claude/agents/sales-team-manager.md +0 -407
- package/one/things/claude/agents/sales-upsell-strategist.md +0 -324
- package/one/things/claude/agents/service-advocacy-campaigns.md +0 -324
- package/one/things/claude/agents/service-advocacy-manager.md +0 -324
- package/one/things/claude/agents/service-success-manager.md +0 -324
- package/one/things/claude/agents/service-team-manager.md +0 -405
- package/one/things/claude/agents/shadcn-ui-design-system-specialist.md +0 -2357
- package/one/things/claude/agents/share-optimization-specialist.md +0 -576
- package/one/things/claude/agents/sm.md +0 -352
- package/one/things/claude/agents/story-teller.md +0 -498
- package/one/things/claude/agents/task-master.md +0 -621
- package/one/things/claude/agents/tauri-cross-platform-specialist.md +0 -1912
- package/one/things/claude/agents/tester.md +0 -595
- package/one/things/claude/agents/the-bull-character-manager.md +0 -603
- package/one/things/claude/agents/tools-playbook-generator.md +0 -492
- package/one/things/claude/agents/turbo-repo-builder.md +0 -346
- package/one/things/claude/agents/upsell-strategist.md +0 -503
- package/one/things/claude/agents/ux-expert.md +0 -360
- package/one/things/claude/agents/viral-growth-orchestrator.md +0 -520
- package/one/things/claude/claude-code-hooks-development.json +0 -21
- package/one/things/claude/claude-code-hooks-production.json +0 -21
- package/one/things/claude/claude-code-hooks.json +0 -25
- package/one/things/claude/commands/agent.md +0 -124
- package/one/things/claude/commands/cascade-status.md +0 -153
- package/one/things/claude/commands/ingest.md +0 -343
- package/one/things/claude/commands/ingestor.md +0 -158
- package/one/things/claude/commands/mission.md +0 -103
- package/one/things/claude/commands/npx.md +0 -156
- package/one/things/claude/commands/one.md +0 -486
- package/one/things/claude/commands/quality-check.md +0 -252
- package/one/things/claude/commands/smart-route.md +0 -261
- package/one/things/claude/commands/start.md +0 -139
- package/one/things/claude/commands/story.md +0 -103
- package/one/things/claude/commands/task.md +0 -193
- package/one/things/claude/hook-bypass.json +0 -32
- package/one/things/claude/hooks/agent-hook-config.json +0 -427
- package/one/things/claude/hooks/build-hook.sh +0 -156
- package/one/things/claude/hooks/cleanup-hook.sh +0 -201
- package/one/things/claude/hooks/file-organization-hook.sh +0 -80
- package/one/things/claude/hooks/format-hook.sh +0 -43
- package/one/things/claude/hooks/hook-bypass.sh +0 -293
- package/one/things/claude/hooks/hook-debouncer.sh +0 -62
- package/one/things/claude/hooks/hook-logger.sh +0 -89
- package/one/things/claude/hooks/lint-hook.sh +0 -140
- package/one/things/claude/hooks/notification-hook.sh +0 -204
- package/one/things/claude/hooks/ontology-validation-hook.sh +0 -86
- package/one/things/claude/hooks/performance-metrics.json +0 -25
- package/one/things/claude/hooks/security-hook.sh +0 -256
- package/one/things/claude/hooks/story-validation-hook-enhanced.sh +0 -210
- package/one/things/claude/hooks/story-validation-hook.sh +0 -145
- package/one/things/claude/hooks/test-hook.sh +0 -145
- package/one/things/claude/hooks/test-story-validation.sh +0 -170
- package/one/things/claude/settings-local.json +0 -86
- package/one/things/cli/cli-code.md +0 -677
- package/one/things/cli/cli-compiler-code.md +0 -677
- package/one/things/cli/cli.md +0 -871
- package/one/things/components/card-shadcn.md +0 -953
- package/one/things/components/card.md +0 -1041
- package/one/things/components.md +0 -1743
- package/one/things/componets.md +0 -19
- package/one/things/contracts/Move.toml +0 -12
- package/one/things/contracts/README.md +0 -288
- package/one/things/contracts/one.move +0 -762
- package/one/things/contracts/sdk.ts +0 -579
- package/one/things/creator-diagram.md +0 -184
- package/one/things/crypto/FEATURES.md +0 -78
- package/one/things/crypto/ONECORE.md +0 -62
- package/one/things/crypto/ONECOREFAQ.md +0 -22
- package/one/things/crypto/ONECOREHOW.md +0 -46
- package/one/things/crypto/ONEENTERPRISE.md +0 -64
- package/one/things/crypto/ONEENTERPRISEFAQ.md +0 -64
- package/one/things/crypto/ONEENTERPRISEHOW.md +0 -53
- package/one/things/crypto/ONEPRO.md +0 -60
- package/one/things/crypto/ONEPROFAQ.md +0 -22
- package/one/things/crypto/ONEPROHOW.md +0 -53
- package/one/things/crypto/READMEAGENCY.md +0 -64
- package/one/things/crypto/VSL.md +0 -45
- package/one/things/crypto/WebsiteCopy.md +0 -176
- package/one/things/demo-accessibility-animations.md +0 -1025
- package/one/things/demo-components.md +0 -1310
- package/one/things/demo-design-summary.md +0 -692
- package/one/things/demo-design-system.md +0 -973
- package/one/things/demo-page-layouts.md +0 -1016
- package/one/things/design-system.md +0 -832
- package/one/things/designs/accessibility-audit.md +0 -877
- package/one/things/designs/component-specifications.md +0 -855
- package/one/things/designs/design-overview.md +0 -377
- package/one/things/designs/design-tokens.md +0 -448
- package/one/things/designs/wireframes-dashboard.md +0 -710
- package/one/things/docs/api-requests.md +0 -987
- package/one/things/docs/ecommerce/ARCHITECTURE-DIAGRAM.md +0 -485
- package/one/things/docs/ecommerce/CONVERSION-ELEMENTS-IMPLEMENTATION.md +0 -465
- package/one/things/docs/ecommerce/CONVERSION-ELEMENTS-SUMMARY.md +0 -425
- package/one/things/docs/ecommerce/CONVERSION-UX-IMPLEMENTATION-SUMMARY.md +0 -451
- package/one/things/docs/ecommerce/FEATURE-SUMMARY.md +0 -536
- package/one/things/docs/ecommerce/IMPLEMENTATION-NOTES.md +0 -650
- package/one/things/docs/ecommerce/INTEGRATION-EXAMPLE.md +0 -473
- package/one/things/docs/ecommerce/QUICK-START.md +0 -405
- package/one/things/docs/ecommerce/URGENCY-IMPLEMENTATION-SUMMARY.md +0 -567
- package/one/things/docs/ecommerce/URGENCY-QUICK-REFERENCE.md +0 -271
- package/one/things/docs/ecommerce/USAGE-EXAMPLE.astro +0 -171
- package/one/things/docs/ecommerce/demo.astro +0 -309
- package/one/things/examples/children/lemonade-stand.md +0 -404
- package/one/things/examples/enterprise/crm-saas.md +0 -1444
- package/one/things/features/1-1-agent-prompts.md +0 -562
- package/one/things/features/1-2-yaml-orchestrator.md +0 -548
- package/one/things/features/1-3-event-coordination.md +0 -547
- package/one/things/features/1-4-knowledge-management.md +0 -652
- package/one/things/features/1-5-quality-loops.md +0 -725
- package/one/things/features/1-6-numbering-structure.md +0 -639
- package/one/things/features/2-1-dataprovider-interface.md +0 -2583
- package/one/things/features/2-2-config-system.md +0 -3242
- package/one/things/features/2-3-effectts-services.md +0 -1645
- package/one/things/features/2-4-react-hooks.md +0 -2136
- package/one/things/features/2-5-auth-migration.md +0 -2144
- package/one/things/features/2-6-dashboard-migration.md +0 -2084
- package/one/things/features/2-7-alternative-providers.md +0 -2578
- package/one/things/features/2-7-implementation-report.md +0 -724
- package/one/things/features/2-cli.md +0 -1720
- package/one/things/features/2-design.md +0 -1770
- package/one/things/features/2-tests.md +0 -576
- package/one/things/features/AUTH_HOOKS_IMPLEMENTATION.md +0 -576
- package/one/things/features/DECOUPLING.md +0 -290
- package/one/things/features/DEPLOYMENT.md +0 -470
- package/one/things/features/IMPLEMENTATION_SUMMARY.md +0 -362
- package/one/things/features/improve.md +0 -861
- package/one/things/features/remove-convex-deps.md +0 -63
- package/one/things/features/top-features.md +0 -87
- package/one/things/features/use-one-backend.md +0 -1217
- package/one/things/features-in-english.md +0 -200
- package/one/things/files.yaml +0 -721
- package/one/things/ideas/1-create-workflow.md +0 -207
- package/one/things/ideas/2-backend-agnostic-frontend.md +0 -439
- package/one/things/implementation/backend-guide.md +0 -457
- package/one/things/interface.md +0 -257
- package/one/things/landing-page-implementation.md +0 -455
- package/one/things/legal/README.md +0 -234
- package/one/things/legal/privacy-policy.md +0 -1227
- package/one/things/legal/terms-of-service.md +0 -1432
- package/one/things/master-workflow-plan.md +0 -806
- package/one/things/pay.one.ie.md +0 -53
- package/one/things/plans/0-in-sync.md +0 -136
- package/one/things/plans/0-timeline.md +0 -36
- package/one/things/plans/1-create-workflow.md +0 -732
- package/one/things/plans/QUICK-START-SIMPLIFICATION.md +0 -333
- package/one/things/plans/README-SIMPLIFICATION.md +0 -349
- package/one/things/plans/SIMPLIFICATION-EXAMPLES.md +0 -16
- package/one/things/plans/SIMPLIFICATION-SUMMARY.md +0 -455
- package/one/things/plans/ai-elements-integration.md +0 -483
- package/one/things/plans/ai-elements.md +0 -1278
- package/one/things/plans/ai-integration-plan.md +0 -263
- package/one/things/plans/ai-integration.md +0 -996
- package/one/things/plans/ai-sdk.md +0 -798
- package/one/things/plans/ai-tools.md +0 -621
- package/one/things/plans/app.md +0 -832
- package/one/things/plans/architecture-summary.md +0 -312
- package/one/things/plans/async-ai-agents.md +0 -233
- package/one/things/plans/backend-agnostic-frontend.md +0 -390
- package/one/things/plans/backend-cleanup-quickstart.md +0 -380
- package/one/things/plans/backend-ontology-conformance.md +0 -475
- package/one/things/plans/backend-status.md +0 -599
- package/one/things/plans/backend-structure.md +0 -847
- package/one/things/plans/backend-target-structure.md +0 -482
- package/one/things/plans/backend.md +0 -1175
- package/one/things/plans/better-auth-any-backend-revised.md +0 -1103
- package/one/things/plans/better-auth-any-backend.md +0 -1896
- package/one/things/plans/better-auth-available-features.md +0 -273
- package/one/things/plans/big-plan.md +0 -52
- package/one/things/plans/cli-updates-required.md +0 -320
- package/one/things/plans/complete-step-by-step.md +0 -1409
- package/one/things/plans/components.md +0 -709
- package/one/things/plans/convex-agents.md +0 -1034
- package/one/things/plans/convex-better-auth.md +0 -1141
- package/one/things/plans/convex-on-off.md +0 -407
- package/one/things/plans/crypto-token-researcher.md +0 -629
- package/one/things/plans/data-quality-metrics.md +0 -745
- package/one/things/plans/deep-researcher-agent.md +0 -466
- package/one/things/plans/deploy-to-cloudflare.md +0 -623
- package/one/things/plans/deployment-architecture.md +0 -469
- package/one/things/plans/desktop.md +0 -1139
- package/one/things/plans/development-plan.md +0 -1283
- package/one/things/plans/development-workflow-tldr.md +0 -207
- package/one/things/plans/development-workflow.md +0 -959
- package/one/things/plans/dsl-claude-code.md +0 -1011
- package/one/things/plans/effect-components.md +0 -1743
- package/one/things/plans/effect-patterns-reference.md +0 -2235
- package/one/things/plans/effect.md +0 -1806
- package/one/things/plans/email.md +0 -966
- package/one/things/plans/enhance-auth.md +0 -1692
- package/one/things/plans/execution-strategy.md +0 -1291
- package/one/things/plans/existing-infrastructure.md +0 -712
- package/one/things/plans/feature-based-sites.md +0 -894
- package/one/things/plans/frontend-effects.md +0 -1276
- package/one/things/plans/group-folder-multi-tenancy.md +0 -893
- package/one/things/plans/improve-codebase.md +0 -1811
- package/one/things/plans/install-components.md +0 -215
- package/one/things/plans/integrate-frontend-and-backend.md +0 -603
- package/one/things/plans/landing.md +0 -820
- package/one/things/plans/layout.md +0 -249
- package/one/things/plans/mail-backend.md +0 -1361
- package/one/things/plans/mail.md +0 -2677
- package/one/things/plans/mcp-clear-context-prompt.md +0 -81
- package/one/things/plans/mcp-simple.md +0 -248
- package/one/things/plans/multi-ontology-architecture.md +0 -885
- package/one/things/plans/next-features.md +0 -114
- package/one/things/plans/npx-agent-safety.md +0 -785
- package/one/things/plans/npx-agent.md +0 -1089
- package/one/things/plans/onboarding.md +0 -51
- package/one/things/plans/one-protocol-and-payone-usage.md +0 -82
- package/one/things/plans/one.md +0 -677
- package/one/things/plans/ontology-6-dimensions.md +0 -2201
- package/one/things/plans/ontology-compliance-audit.md +0 -342
- package/one/things/plans/ontology-driven-strategy.md +0 -882
- package/one/things/plans/ontology-refine.md +0 -586
- package/one/things/plans/ontology-ui-approach.md +0 -375
- package/one/things/plans/open-agent.md +0 -840
- package/one/things/plans/performace.md +0 -122
- package/one/things/plans/phase-1-foundation.md +0 -620
- package/one/things/plans/phase-3-implementation.md +0 -1037
- package/one/things/plans/plan-connect-to-api.md +0 -146
- package/one/things/plans/quick-wins.md +0 -1428
- package/one/things/plans/r2.md +0 -777
- package/one/things/plans/readme-backend-cleanup.md +0 -402
- package/one/things/plans/release.md +0 -507
- package/one/things/plans/remove-backend-development-from-agents.md +0 -1331
- package/one/things/plans/repos.md +0 -98
- package/one/things/plans/separate-copy-2.md +0 -1349
- package/one/things/plans/separate-copy-3.md +0 -2479
- package/one/things/plans/separate-copy.md +0 -1349
- package/one/things/plans/separate-demo.md +0 -864
- package/one/things/plans/separate.md +0 -1999
- package/one/things/plans/sequence.md +0 -2040
- package/one/things/plans/shadcn-integration-summary.md +0 -510
- package/one/things/plans/sidebar.md +0 -206
- package/one/things/plans/skills.md +0 -709
- package/one/things/plans/small-fixes.md +0 -23
- package/one/things/plans/start-new.md +0 -764
- package/one/things/plans/switch-off-auth.md +0 -42
- package/one/things/plans/sync-checklist.md +0 -351
- package/one/things/plans/test-backend-connection.md +0 -514
- package/one/things/plans/unified-implementation-plan.md +0 -934
- package/one/things/plans/update-demos.md +0 -581
- package/one/things/plans/use-our-backend.md +0 -572
- package/one/things/plans/video-backend.md +0 -638
- package/one/things/plans/video-frontend.md +0 -490
- package/one/things/plans/video-old-archived.md +0 -656
- package/one/things/plans/wave1-onboarding-100-inferences.md +0 -1686
- package/one/things/plans/wave1-onboarding-vision.md +0 -744
- package/one/things/plans/wave1-orchestration-summary.md +0 -604
- package/one/things/plans/wave1-specialist-assignments.md +0 -1413
- package/one/things/plans/workflow-files.md +0 -1210
- package/one/things/plans/workflow.md +0 -1378
- package/one/things/plans-u.md +0 -905
- package/one/things/products/Blockchain Products.md +0 -6278
- package/one/things/products/cascade-landing-page.md +0 -841
- package/one/things/products/cascade.md +0 -1568
- package/one/things/products/context-engineering.md +0 -1488
- package/one/things/products/onthology.md +0 -15
- package/one/things/products/ontology-ui-shadcn.md +0 -1302
- package/one/things/products/ontology-ui.md +0 -1429
- package/one/things/products/ontology.md +0 -789
- package/one/things/products/sdk.md +0 -573
- package/one/things/promptkit.md +0 -930
- package/one/things/repos/all-repos.md +0 -0
- package/one/things/scripts-clean-mac.sh +0 -409
- package/one/things/service-providers-new.md +0 -1052
- package/one/things/service-providers.md +0 -1121
- package/one/things/structure.md +0 -532
- package/one/things/system.md +0 -618
- package/one/things/templates.md +0 -294
- package/one/things/tests/2-1-dataprovider-interface.md +0 -1216
- package/one/things/tests/2-1-test-analysis.md +0 -544
- package/one/things/things.md +0 -384
- package/one/things/todo-acp-integration.md +0 -744
- package/one/things/todo-ai.md +0 -933
- package/one/things/todo-api.md +0 -1078
- package/one/things/todo-assignment.md +0 -580
- package/one/things/todo-buy-chatgpt.md +0 -1450
- package/one/things/todo-components.md +0 -1683
- package/one/things/todo-connections.md +0 -278
- package/one/things/todo-ecommerce-frontend.md +0 -1313
- package/one/things/todo-ecommerce.md +0 -569
- package/one/things/todo-effects.md +0 -1075
- package/one/things/todo-frontend-effects.md +0 -977
- package/one/things/todo-landing-page.md +0 -1091
- package/one/things/todo-mail.md +0 -1160
- package/one/things/todo-master-plan.md +0 -490
- package/one/things/todo-onboard.md +0 -666
- package/one/things/todo-one-ie.md +0 -538
- package/one/things/todo-page.md +0 -606
- package/one/things/todo-plans.md +0 -282
- package/one/things/todo-projects.md +0 -241
- package/one/things/todo-refactoring-plan.md +0 -366
- package/one/things/todo-release.md +0 -654
- package/one/things/todo-sequence.md +0 -1621
- package/one/things/todo-use-our-backend.md +0 -1908
- package/one/things/todo-workflow.md +0 -626
- package/one/things/todo-x402.md +0 -2047
- package/one/things/todo.md +0 -21
- package/one/things/video/scripts-crypto.md +0 -835
- package/one/things/video-script-backup.md +0 -318
- package/one/things/video-script-demo.md +0 -382
- package/one/things/video-script-ontology.md +0 -333
- package/one/things/video-script.md +0 -361
package/one/paths/any-backend.md
DELETED
|
@@ -1,1720 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Any Backend
|
|
3
|
-
dimension: connections
|
|
4
|
-
category: any-backend.md
|
|
5
|
-
tags: ai, architecture, backend, convex, frontend
|
|
6
|
-
related_dimensions: events
|
|
7
|
-
scope: global
|
|
8
|
-
created: 2025-11-03
|
|
9
|
-
updated: 2025-11-03
|
|
10
|
-
version: 1.0.0
|
|
11
|
-
ai_context: |
|
|
12
|
-
This document is part of the connections dimension in the any-backend.md category.
|
|
13
|
-
Location: one/connections/any-backend.md
|
|
14
|
-
Purpose: Documents connecting one to any backend
|
|
15
|
-
Related dimensions: events
|
|
16
|
-
For AI agents: Read this to understand any backend.
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
# Connecting ONE to Any Backend
|
|
20
|
-
|
|
21
|
-
**Universal backend adapter pattern for ONE platform**
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
## Executive Summary
|
|
26
|
-
|
|
27
|
-
ONE's frontend is **100% backend-agnostic**. This guide shows how to connect to **any backend** (databases, APIs, CMS platforms, SaaS tools) by implementing the universal `DataProvider` interface.
|
|
28
|
-
|
|
29
|
-
**Key Principle:** Frontend talks to `DataProvider` interface. You implement `DataProvider` for your backend. Done.
|
|
30
|
-
|
|
31
|
-
**Supported Backends:**
|
|
32
|
-
- ✅ **Databases**: Convex, Supabase, Neon, PlanetScale, MongoDB, PostgreSQL, MySQL
|
|
33
|
-
- ✅ **CMS**: WordPress, Strapi, Contentful, Sanity, Ghost, Prismic
|
|
34
|
-
- ✅ **Headless**: Notion, Airtable, Google Sheets, Excel Online
|
|
35
|
-
- ✅ **SaaS APIs**: Salesforce, HubSpot, Shopify, Stripe
|
|
36
|
-
- ✅ **Custom**: Your own REST/GraphQL API
|
|
37
|
-
|
|
38
|
-
**What This Achieves:**
|
|
39
|
-
- Change backend with ONE line of code
|
|
40
|
-
- Use multiple backends simultaneously
|
|
41
|
-
- Mix backends (WordPress + Supabase + Custom API)
|
|
42
|
-
- No vendor lock-in
|
|
43
|
-
|
|
44
|
-
---
|
|
45
|
-
|
|
46
|
-
## Table of Contents
|
|
47
|
-
|
|
48
|
-
1. [Architecture Overview](#architecture-overview)
|
|
49
|
-
2. [DataProvider Interface](#dataprovider-interface)
|
|
50
|
-
3. [Implementation Patterns](#implementation-patterns)
|
|
51
|
-
4. [Database Backends](#database-backends)
|
|
52
|
-
5. [CMS Backends](#cms-backends)
|
|
53
|
-
6. [SaaS API Backends](#saas-api-backends)
|
|
54
|
-
7. [Custom Backends](#custom-backends)
|
|
55
|
-
8. [Multi-Backend Setup](#multi-backend-setup)
|
|
56
|
-
9. [Testing](#testing)
|
|
57
|
-
10. [Deployment](#deployment)
|
|
58
|
-
|
|
59
|
-
---
|
|
60
|
-
|
|
61
|
-
## Architecture Overview
|
|
62
|
-
|
|
63
|
-
### The Universal Pattern
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
┌────────────────────────────────────────────────┐
|
|
67
|
-
│ ONE Frontend (Astro + React) │
|
|
68
|
-
│ ✅ Renders UI │
|
|
69
|
-
│ ✅ Calls DataProvider interface │
|
|
70
|
-
│ ✅ Backend-agnostic components │
|
|
71
|
-
│ ❌ NO backend-specific code │
|
|
72
|
-
└────────────────┬───────────────────────────────┘
|
|
73
|
-
│ DataProvider Interface
|
|
74
|
-
│ (Universal API = ONE Ontology)
|
|
75
|
-
↓
|
|
76
|
-
┌────────────────────────────────────────────────┐
|
|
77
|
-
│ Provider Layer (You Implement) │
|
|
78
|
-
│ - things.get(id) │
|
|
79
|
-
│ - things.list(type) │
|
|
80
|
-
│ - things.create(data) │
|
|
81
|
-
│ - connections.create(from, to) │
|
|
82
|
-
│ - events.log(event) │
|
|
83
|
-
│ - knowledge.search(query) │
|
|
84
|
-
└────────────────┬───────────────────────────────┘
|
|
85
|
-
│ Backend-Specific Implementation
|
|
86
|
-
┌───────────┼───────────┬───────────┬───────────┐
|
|
87
|
-
↓ ↓ ↓ ↓ ↓
|
|
88
|
-
┌─────────┐ ┌─────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
|
|
89
|
-
│ Convex │ │Supabase │ │WordPress │ │ Notion │ │ Custom │
|
|
90
|
-
│ │ │ │ │ │ │ │ │ API │
|
|
91
|
-
└─────────┘ └─────────┘ └──────────┘ └──────────┘ └──────────┘
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
**Key Insight:** Frontend never imports backend-specific code. Only imports `DataProvider` interface.
|
|
95
|
-
|
|
96
|
-
---
|
|
97
|
-
|
|
98
|
-
## DataProvider Interface
|
|
99
|
-
|
|
100
|
-
### The Contract
|
|
101
|
-
|
|
102
|
-
```typescript
|
|
103
|
-
// frontend/src/providers/DataProvider.ts
|
|
104
|
-
import { Effect } from 'effect'
|
|
105
|
-
import { ThingType, ConnectionType, EventType } from '@/ontology/types'
|
|
106
|
-
|
|
107
|
-
// Error types (universal)
|
|
108
|
-
export class ThingNotFoundError {
|
|
109
|
-
readonly _tag = 'ThingNotFoundError'
|
|
110
|
-
constructor(readonly thingId: string) {}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export class UnauthorizedError {
|
|
114
|
-
readonly _tag = 'UnauthorizedError'
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
export class ConnectionCreateError {
|
|
118
|
-
readonly _tag = 'ConnectionCreateError'
|
|
119
|
-
constructor(readonly reason: string) {}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
// Thing (universal data structure)
|
|
123
|
-
export interface Thing {
|
|
124
|
-
_id: string
|
|
125
|
-
type: ThingType
|
|
126
|
-
name: string
|
|
127
|
-
properties: Record<string, any>
|
|
128
|
-
status: 'active' | 'inactive' | 'archived'
|
|
129
|
-
createdAt: number
|
|
130
|
-
updatedAt: number
|
|
131
|
-
createdBy?: string
|
|
132
|
-
groupId?: string
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
// Connection (universal relationship)
|
|
136
|
-
export interface Connection {
|
|
137
|
-
_id: string
|
|
138
|
-
fromThingId: string
|
|
139
|
-
toThingId: string
|
|
140
|
-
relationshipType: ConnectionType
|
|
141
|
-
metadata?: Record<string, any>
|
|
142
|
-
createdAt: number
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
// Event (universal activity)
|
|
146
|
-
export interface Event {
|
|
147
|
-
_id: string
|
|
148
|
-
type: EventType
|
|
149
|
-
actorId: string
|
|
150
|
-
targetId?: string
|
|
151
|
-
metadata?: Record<string, any>
|
|
152
|
-
timestamp: number
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
// Knowledge (universal search result)
|
|
156
|
-
export interface KnowledgeMatch {
|
|
157
|
-
thingId: string
|
|
158
|
-
score: number
|
|
159
|
-
text: string
|
|
160
|
-
metadata?: Record<string, any>
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
// ============================================
|
|
164
|
-
// DataProvider Interface
|
|
165
|
-
// ============================================
|
|
166
|
-
export interface DataProvider {
|
|
167
|
-
// Things operations
|
|
168
|
-
things: {
|
|
169
|
-
get: (id: string) => Effect.Effect<Thing, ThingNotFoundError | UnauthorizedError>
|
|
170
|
-
|
|
171
|
-
list: (params: {
|
|
172
|
-
type: ThingType
|
|
173
|
-
groupId?: string
|
|
174
|
-
filters?: Record<string, any>
|
|
175
|
-
limit?: number
|
|
176
|
-
offset?: number
|
|
177
|
-
}) => Effect.Effect<Thing[], Error>
|
|
178
|
-
|
|
179
|
-
create: (input: {
|
|
180
|
-
type: ThingType
|
|
181
|
-
name: string
|
|
182
|
-
properties: Record<string, any>
|
|
183
|
-
groupId?: string
|
|
184
|
-
}) => Effect.Effect<string, ConnectionCreateError>
|
|
185
|
-
|
|
186
|
-
update: (
|
|
187
|
-
id: string,
|
|
188
|
-
updates: Partial<Thing>
|
|
189
|
-
) => Effect.Effect<void, Error>
|
|
190
|
-
|
|
191
|
-
delete: (id: string) => Effect.Effect<void, Error>
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
// Connections operations
|
|
195
|
-
connections: {
|
|
196
|
-
create: (input: {
|
|
197
|
-
fromThingId: string
|
|
198
|
-
toThingId: string
|
|
199
|
-
relationshipType: ConnectionType
|
|
200
|
-
metadata?: Record<string, any>
|
|
201
|
-
}) => Effect.Effect<string, ConnectionCreateError>
|
|
202
|
-
|
|
203
|
-
getRelated: (params: {
|
|
204
|
-
thingId: string
|
|
205
|
-
relationshipType: ConnectionType
|
|
206
|
-
direction: 'from' | 'to' | 'both'
|
|
207
|
-
}) => Effect.Effect<Thing[], Error>
|
|
208
|
-
|
|
209
|
-
getCount: (
|
|
210
|
-
thingId: string,
|
|
211
|
-
relationshipType: ConnectionType
|
|
212
|
-
) => Effect.Effect<number, Error>
|
|
213
|
-
|
|
214
|
-
delete: (id: string) => Effect.Effect<void, Error>
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
// Events operations
|
|
218
|
-
events: {
|
|
219
|
-
log: (event: {
|
|
220
|
-
type: EventType
|
|
221
|
-
actorId: string
|
|
222
|
-
targetId?: string
|
|
223
|
-
metadata?: Record<string, any>
|
|
224
|
-
}) => Effect.Effect<void, Error>
|
|
225
|
-
|
|
226
|
-
query: (params: {
|
|
227
|
-
type?: EventType
|
|
228
|
-
actorId?: string
|
|
229
|
-
targetId?: string
|
|
230
|
-
from?: Date
|
|
231
|
-
to?: Date
|
|
232
|
-
}) => Effect.Effect<Event[], Error>
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
// Knowledge operations
|
|
236
|
-
knowledge: {
|
|
237
|
-
embed: (params: {
|
|
238
|
-
text: string
|
|
239
|
-
sourceThingId: string
|
|
240
|
-
labels?: string[]
|
|
241
|
-
}) => Effect.Effect<string, Error>
|
|
242
|
-
|
|
243
|
-
search: (
|
|
244
|
-
query: string,
|
|
245
|
-
limit?: number
|
|
246
|
-
) => Effect.Effect<KnowledgeMatch[], Error>
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
// Optional: Real-time subscriptions
|
|
250
|
-
subscriptions?: {
|
|
251
|
-
watchThing: (id: string) => Effect.Effect<Observable<Thing>, Error>
|
|
252
|
-
watchList: (type: ThingType) => Effect.Effect<Observable<Thing[]>, Error>
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
**That's it!** Implement this interface for ANY backend.
|
|
258
|
-
|
|
259
|
-
---
|
|
260
|
-
|
|
261
|
-
## Implementation Patterns
|
|
262
|
-
|
|
263
|
-
### Pattern 1: REST API Backend
|
|
264
|
-
|
|
265
|
-
```typescript
|
|
266
|
-
// frontend/src/providers/rest/RestProvider.ts
|
|
267
|
-
import { Effect, Layer } from 'effect'
|
|
268
|
-
import { DataProvider, Thing, ThingNotFoundError } from '../DataProvider'
|
|
269
|
-
|
|
270
|
-
export class RestProvider implements DataProvider {
|
|
271
|
-
constructor(
|
|
272
|
-
private baseUrl: string,
|
|
273
|
-
private apiKey: string
|
|
274
|
-
) {}
|
|
275
|
-
|
|
276
|
-
things = {
|
|
277
|
-
get: (id: string) =>
|
|
278
|
-
Effect.gen(this, function* () {
|
|
279
|
-
const response = yield* Effect.tryPromise({
|
|
280
|
-
try: () =>
|
|
281
|
-
fetch(`${this.baseUrl}/things/${id}`, {
|
|
282
|
-
headers: {
|
|
283
|
-
'Authorization': `Bearer ${this.apiKey}`,
|
|
284
|
-
'Content-Type': 'application/json'
|
|
285
|
-
}
|
|
286
|
-
}),
|
|
287
|
-
catch: (error) => new Error(String(error))
|
|
288
|
-
})
|
|
289
|
-
|
|
290
|
-
if (!response.ok) {
|
|
291
|
-
if (response.status === 404) {
|
|
292
|
-
return yield* Effect.fail(new ThingNotFoundError(id))
|
|
293
|
-
}
|
|
294
|
-
return yield* Effect.fail(new Error(`HTTP ${response.status}`))
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
const data = yield* Effect.tryPromise({
|
|
298
|
-
try: () => response.json(),
|
|
299
|
-
catch: (error) => new Error(String(error))
|
|
300
|
-
})
|
|
301
|
-
|
|
302
|
-
// Transform API response → ONE Thing
|
|
303
|
-
return this.transformToThing(data)
|
|
304
|
-
}),
|
|
305
|
-
|
|
306
|
-
list: (params) =>
|
|
307
|
-
Effect.gen(this, function* () {
|
|
308
|
-
const query = new URLSearchParams({
|
|
309
|
-
type: params.type,
|
|
310
|
-
limit: String(params.limit || 10),
|
|
311
|
-
...(params.groupId && { org: params.groupId })
|
|
312
|
-
})
|
|
313
|
-
|
|
314
|
-
const response = yield* Effect.tryPromise({
|
|
315
|
-
try: () =>
|
|
316
|
-
fetch(`${this.baseUrl}/things?${query}`, {
|
|
317
|
-
headers: {
|
|
318
|
-
'Authorization': `Bearer ${this.apiKey}`
|
|
319
|
-
}
|
|
320
|
-
}),
|
|
321
|
-
catch: (error) => new Error(String(error))
|
|
322
|
-
})
|
|
323
|
-
|
|
324
|
-
const data = yield* Effect.tryPromise({
|
|
325
|
-
try: () => response.json(),
|
|
326
|
-
catch: (error) => new Error(String(error))
|
|
327
|
-
})
|
|
328
|
-
|
|
329
|
-
return data.items.map((item: any) => this.transformToThing(item))
|
|
330
|
-
}),
|
|
331
|
-
|
|
332
|
-
create: (input) =>
|
|
333
|
-
Effect.gen(this, function* () {
|
|
334
|
-
const response = yield* Effect.tryPromise({
|
|
335
|
-
try: () =>
|
|
336
|
-
fetch(`${this.baseUrl}/things`, {
|
|
337
|
-
method: 'POST',
|
|
338
|
-
headers: {
|
|
339
|
-
'Authorization': `Bearer ${this.apiKey}`,
|
|
340
|
-
'Content-Type': 'application/json'
|
|
341
|
-
},
|
|
342
|
-
body: JSON.stringify({
|
|
343
|
-
type: input.type,
|
|
344
|
-
name: input.name,
|
|
345
|
-
properties: input.properties,
|
|
346
|
-
groupId: input.groupId
|
|
347
|
-
})
|
|
348
|
-
}),
|
|
349
|
-
catch: (error) => new Error(String(error))
|
|
350
|
-
})
|
|
351
|
-
|
|
352
|
-
const data = yield* Effect.tryPromise({
|
|
353
|
-
try: () => response.json(),
|
|
354
|
-
catch: (error) => new Error(String(error))
|
|
355
|
-
})
|
|
356
|
-
|
|
357
|
-
return data.id
|
|
358
|
-
}),
|
|
359
|
-
|
|
360
|
-
update: (id, updates) =>
|
|
361
|
-
Effect.gen(this, function* () {
|
|
362
|
-
yield* Effect.tryPromise({
|
|
363
|
-
try: () =>
|
|
364
|
-
fetch(`${this.baseUrl}/things/${id}`, {
|
|
365
|
-
method: 'PATCH',
|
|
366
|
-
headers: {
|
|
367
|
-
'Authorization': `Bearer ${this.apiKey}`,
|
|
368
|
-
'Content-Type': 'application/json'
|
|
369
|
-
},
|
|
370
|
-
body: JSON.stringify(updates)
|
|
371
|
-
}),
|
|
372
|
-
catch: (error) => new Error(String(error))
|
|
373
|
-
})
|
|
374
|
-
}),
|
|
375
|
-
|
|
376
|
-
delete: (id) =>
|
|
377
|
-
Effect.gen(this, function* () {
|
|
378
|
-
yield* Effect.tryPromise({
|
|
379
|
-
try: () =>
|
|
380
|
-
fetch(`${this.baseUrl}/things/${id}`, {
|
|
381
|
-
method: 'DELETE',
|
|
382
|
-
headers: {
|
|
383
|
-
'Authorization': `Bearer ${this.apiKey}`
|
|
384
|
-
}
|
|
385
|
-
}),
|
|
386
|
-
catch: (error) => new Error(String(error))
|
|
387
|
-
})
|
|
388
|
-
})
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
connections = {
|
|
392
|
-
// Similar REST API implementations
|
|
393
|
-
create: (input) => { /* POST /connections */ },
|
|
394
|
-
getRelated: (params) => { /* GET /things/:id/related */ },
|
|
395
|
-
getCount: (thingId, type) => { /* GET /things/:id/connections/count */ },
|
|
396
|
-
delete: (id) => { /* DELETE /connections/:id */ }
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
events = {
|
|
400
|
-
log: (event) => { /* POST /events */ },
|
|
401
|
-
query: (params) => { /* GET /events */ }
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
knowledge = {
|
|
405
|
-
embed: (params) => { /* POST /knowledge/embed */ },
|
|
406
|
-
search: (query, limit) => { /* GET /knowledge/search */ }
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
// Helper: Transform API data → ONE Thing
|
|
410
|
-
private transformToThing(data: any): Thing {
|
|
411
|
-
return {
|
|
412
|
-
_id: data.id,
|
|
413
|
-
type: data.type,
|
|
414
|
-
name: data.name || data.title,
|
|
415
|
-
properties: data.attributes || data.properties || {},
|
|
416
|
-
status: data.status || 'active',
|
|
417
|
-
createdAt: new Date(data.created_at).getTime(),
|
|
418
|
-
updatedAt: new Date(data.updated_at).getTime(),
|
|
419
|
-
createdBy: data.created_by,
|
|
420
|
-
groupId: data.organization_id
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
// Factory function
|
|
426
|
-
export function restProvider(config: { url: string; apiKey: string }) {
|
|
427
|
-
return Layer.succeed(DataProvider, new RestProvider(config.url, config.apiKey))
|
|
428
|
-
}
|
|
429
|
-
```
|
|
430
|
-
|
|
431
|
-
### Pattern 2: GraphQL Backend
|
|
432
|
-
|
|
433
|
-
```typescript
|
|
434
|
-
// frontend/src/providers/graphql/GraphQLProvider.ts
|
|
435
|
-
import { Effect, Layer } from 'effect'
|
|
436
|
-
import { DataProvider, Thing } from '../DataProvider'
|
|
437
|
-
|
|
438
|
-
export class GraphQLProvider implements DataProvider {
|
|
439
|
-
constructor(
|
|
440
|
-
private endpoint: string,
|
|
441
|
-
private headers: Record<string, string>
|
|
442
|
-
) {}
|
|
443
|
-
|
|
444
|
-
things = {
|
|
445
|
-
get: (id: string) =>
|
|
446
|
-
Effect.gen(this, function* () {
|
|
447
|
-
const query = `
|
|
448
|
-
query GetThing($id: ID!) {
|
|
449
|
-
thing(id: $id) {
|
|
450
|
-
id
|
|
451
|
-
type
|
|
452
|
-
name
|
|
453
|
-
properties
|
|
454
|
-
status
|
|
455
|
-
createdAt
|
|
456
|
-
updatedAt
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
`
|
|
460
|
-
|
|
461
|
-
const response = yield* Effect.tryPromise({
|
|
462
|
-
try: () =>
|
|
463
|
-
fetch(this.endpoint, {
|
|
464
|
-
method: 'POST',
|
|
465
|
-
headers: {
|
|
466
|
-
...this.headers,
|
|
467
|
-
'Content-Type': 'application/json'
|
|
468
|
-
},
|
|
469
|
-
body: JSON.stringify({
|
|
470
|
-
query,
|
|
471
|
-
variables: { id }
|
|
472
|
-
})
|
|
473
|
-
}),
|
|
474
|
-
catch: (error) => new Error(String(error))
|
|
475
|
-
})
|
|
476
|
-
|
|
477
|
-
const data = yield* Effect.tryPromise({
|
|
478
|
-
try: () => response.json(),
|
|
479
|
-
catch: (error) => new Error(String(error))
|
|
480
|
-
})
|
|
481
|
-
|
|
482
|
-
if (data.errors) {
|
|
483
|
-
return yield* Effect.fail(new Error(data.errors[0].message))
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
return this.transformToThing(data.data.thing)
|
|
487
|
-
}),
|
|
488
|
-
|
|
489
|
-
list: (params) =>
|
|
490
|
-
Effect.gen(this, function* () {
|
|
491
|
-
const query = `
|
|
492
|
-
query ListThings($type: String!, $limit: Int, $orgId: ID) {
|
|
493
|
-
things(type: $type, limit: $limit, groupId: $orgId) {
|
|
494
|
-
nodes {
|
|
495
|
-
id
|
|
496
|
-
type
|
|
497
|
-
name
|
|
498
|
-
properties
|
|
499
|
-
status
|
|
500
|
-
createdAt
|
|
501
|
-
updatedAt
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
`
|
|
506
|
-
|
|
507
|
-
const response = yield* Effect.tryPromise({
|
|
508
|
-
try: () =>
|
|
509
|
-
fetch(this.endpoint, {
|
|
510
|
-
method: 'POST',
|
|
511
|
-
headers: {
|
|
512
|
-
...this.headers,
|
|
513
|
-
'Content-Type': 'application/json'
|
|
514
|
-
},
|
|
515
|
-
body: JSON.stringify({
|
|
516
|
-
query,
|
|
517
|
-
variables: {
|
|
518
|
-
type: params.type,
|
|
519
|
-
limit: params.limit || 10,
|
|
520
|
-
orgId: params.groupId
|
|
521
|
-
}
|
|
522
|
-
})
|
|
523
|
-
}),
|
|
524
|
-
catch: (error) => new Error(String(error))
|
|
525
|
-
})
|
|
526
|
-
|
|
527
|
-
const data = yield* Effect.tryPromise({
|
|
528
|
-
try: () => response.json(),
|
|
529
|
-
catch: (error) => new Error(String(error))
|
|
530
|
-
})
|
|
531
|
-
|
|
532
|
-
return data.data.things.nodes.map((node: any) =>
|
|
533
|
-
this.transformToThing(node)
|
|
534
|
-
)
|
|
535
|
-
}),
|
|
536
|
-
|
|
537
|
-
create: (input) =>
|
|
538
|
-
Effect.gen(this, function* () {
|
|
539
|
-
const mutation = `
|
|
540
|
-
mutation CreateThing($input: CreateThingInput!) {
|
|
541
|
-
createThing(input: $input) {
|
|
542
|
-
id
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
`
|
|
546
|
-
|
|
547
|
-
const response = yield* Effect.tryPromise({
|
|
548
|
-
try: () =>
|
|
549
|
-
fetch(this.endpoint, {
|
|
550
|
-
method: 'POST',
|
|
551
|
-
headers: {
|
|
552
|
-
...this.headers,
|
|
553
|
-
'Content-Type': 'application/json'
|
|
554
|
-
},
|
|
555
|
-
body: JSON.stringify({
|
|
556
|
-
query: mutation,
|
|
557
|
-
variables: {
|
|
558
|
-
input: {
|
|
559
|
-
type: input.type,
|
|
560
|
-
name: input.name,
|
|
561
|
-
properties: input.properties,
|
|
562
|
-
groupId: input.groupId
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
})
|
|
566
|
-
}),
|
|
567
|
-
catch: (error) => new Error(String(error))
|
|
568
|
-
})
|
|
569
|
-
|
|
570
|
-
const data = yield* Effect.tryPromise({
|
|
571
|
-
try: () => response.json(),
|
|
572
|
-
catch: (error) => new Error(String(error))
|
|
573
|
-
})
|
|
574
|
-
|
|
575
|
-
return data.data.createThing.id
|
|
576
|
-
}),
|
|
577
|
-
|
|
578
|
-
update: (id, updates) => { /* Similar mutation */ },
|
|
579
|
-
delete: (id) => { /* Similar mutation */ }
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
// connections, events, knowledge...
|
|
583
|
-
|
|
584
|
-
private transformToThing(data: any): Thing {
|
|
585
|
-
return {
|
|
586
|
-
_id: data.id,
|
|
587
|
-
type: data.type,
|
|
588
|
-
name: data.name,
|
|
589
|
-
properties: JSON.parse(data.properties || '{}'),
|
|
590
|
-
status: data.status,
|
|
591
|
-
createdAt: new Date(data.createdAt).getTime(),
|
|
592
|
-
updatedAt: new Date(data.updatedAt).getTime()
|
|
593
|
-
}
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
// Factory
|
|
598
|
-
export function graphqlProvider(config: {
|
|
599
|
-
endpoint: string
|
|
600
|
-
headers: Record<string, string>
|
|
601
|
-
}) {
|
|
602
|
-
return Layer.succeed(
|
|
603
|
-
DataProvider,
|
|
604
|
-
new GraphQLProvider(config.endpoint, config.headers)
|
|
605
|
-
)
|
|
606
|
-
}
|
|
607
|
-
```
|
|
608
|
-
|
|
609
|
-
### Pattern 3: SQL Database (Direct)
|
|
610
|
-
|
|
611
|
-
```typescript
|
|
612
|
-
// frontend/src/providers/postgres/PostgresProvider.ts
|
|
613
|
-
import { Effect, Layer } from 'effect'
|
|
614
|
-
import { Pool } from 'pg'
|
|
615
|
-
import { DataProvider, Thing } from '../DataProvider'
|
|
616
|
-
|
|
617
|
-
export class PostgresProvider implements DataProvider {
|
|
618
|
-
private pool: Pool
|
|
619
|
-
|
|
620
|
-
constructor(connectionString: string) {
|
|
621
|
-
this.pool = new Pool({ connectionString })
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
things = {
|
|
625
|
-
get: (id: string) =>
|
|
626
|
-
Effect.gen(this, function* () {
|
|
627
|
-
const result = yield* Effect.tryPromise({
|
|
628
|
-
try: () =>
|
|
629
|
-
this.pool.query('SELECT * FROM things WHERE id = $1', [id]),
|
|
630
|
-
catch: (error) => new Error(String(error))
|
|
631
|
-
})
|
|
632
|
-
|
|
633
|
-
if (result.rows.length === 0) {
|
|
634
|
-
return yield* Effect.fail(new ThingNotFoundError(id))
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
return this.rowToThing(result.rows[0])
|
|
638
|
-
}),
|
|
639
|
-
|
|
640
|
-
list: (params) =>
|
|
641
|
-
Effect.gen(this, function* () {
|
|
642
|
-
const query = `
|
|
643
|
-
SELECT * FROM things
|
|
644
|
-
WHERE type = $1
|
|
645
|
-
${params.groupId ? 'AND organization_id = $2' : ''}
|
|
646
|
-
LIMIT $${params.groupId ? '3' : '2'}
|
|
647
|
-
`
|
|
648
|
-
|
|
649
|
-
const values = [
|
|
650
|
-
params.type,
|
|
651
|
-
...(params.groupId ? [params.groupId] : []),
|
|
652
|
-
params.limit || 10
|
|
653
|
-
]
|
|
654
|
-
|
|
655
|
-
const result = yield* Effect.tryPromise({
|
|
656
|
-
try: () => this.pool.query(query, values),
|
|
657
|
-
catch: (error) => new Error(String(error))
|
|
658
|
-
})
|
|
659
|
-
|
|
660
|
-
return result.rows.map(row => this.rowToThing(row))
|
|
661
|
-
}),
|
|
662
|
-
|
|
663
|
-
create: (input) =>
|
|
664
|
-
Effect.gen(this, function* () {
|
|
665
|
-
const result = yield* Effect.tryPromise({
|
|
666
|
-
try: () =>
|
|
667
|
-
this.pool.query(
|
|
668
|
-
`INSERT INTO things (type, name, properties, organization_id, status, created_at, updated_at)
|
|
669
|
-
VALUES ($1, $2, $3, $4, $5, NOW(), NOW())
|
|
670
|
-
RETURNING id`,
|
|
671
|
-
[
|
|
672
|
-
input.type,
|
|
673
|
-
input.name,
|
|
674
|
-
JSON.stringify(input.properties),
|
|
675
|
-
input.groupId,
|
|
676
|
-
'active'
|
|
677
|
-
]
|
|
678
|
-
),
|
|
679
|
-
catch: (error) => new Error(String(error))
|
|
680
|
-
})
|
|
681
|
-
|
|
682
|
-
return result.rows[0].id
|
|
683
|
-
}),
|
|
684
|
-
|
|
685
|
-
update: (id, updates) => { /* UPDATE query */ },
|
|
686
|
-
delete: (id) => { /* DELETE query */ }
|
|
687
|
-
}
|
|
688
|
-
|
|
689
|
-
connections = {
|
|
690
|
-
create: (input) =>
|
|
691
|
-
Effect.gen(this, function* () {
|
|
692
|
-
const result = yield* Effect.tryPromise({
|
|
693
|
-
try: () =>
|
|
694
|
-
this.pool.query(
|
|
695
|
-
`INSERT INTO connections (from_thing_id, to_thing_id, relationship_type, metadata, created_at)
|
|
696
|
-
VALUES ($1, $2, $3, $4, NOW())
|
|
697
|
-
RETURNING id`,
|
|
698
|
-
[
|
|
699
|
-
input.fromThingId,
|
|
700
|
-
input.toThingId,
|
|
701
|
-
input.relationshipType,
|
|
702
|
-
JSON.stringify(input.metadata || {})
|
|
703
|
-
]
|
|
704
|
-
),
|
|
705
|
-
catch: (error) => new Error(String(error))
|
|
706
|
-
})
|
|
707
|
-
|
|
708
|
-
return result.rows[0].id
|
|
709
|
-
}),
|
|
710
|
-
|
|
711
|
-
getRelated: (params) => { /* JOIN query */ },
|
|
712
|
-
getCount: (thingId, type) => { /* COUNT query */ },
|
|
713
|
-
delete: (id) => { /* DELETE query */ }
|
|
714
|
-
}
|
|
715
|
-
|
|
716
|
-
events = {
|
|
717
|
-
log: (event) => { /* INSERT INTO events */ },
|
|
718
|
-
query: (params) => { /* SELECT FROM events */ }
|
|
719
|
-
}
|
|
720
|
-
|
|
721
|
-
knowledge = {
|
|
722
|
-
embed: (params) => { /* Store embedding, use pgvector */ },
|
|
723
|
-
search: (query, limit) => { /* Vector similarity search */ }
|
|
724
|
-
}
|
|
725
|
-
|
|
726
|
-
private rowToThing(row: any): Thing {
|
|
727
|
-
return {
|
|
728
|
-
_id: row.id,
|
|
729
|
-
type: row.type,
|
|
730
|
-
name: row.name,
|
|
731
|
-
properties: JSON.parse(row.properties || '{}'),
|
|
732
|
-
status: row.status,
|
|
733
|
-
createdAt: new Date(row.created_at).getTime(),
|
|
734
|
-
updatedAt: new Date(row.updated_at).getTime(),
|
|
735
|
-
groupId: row.organization_id
|
|
736
|
-
}
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
// Factory
|
|
741
|
-
export function postgresProvider(config: { connectionString: string }) {
|
|
742
|
-
return Layer.succeed(
|
|
743
|
-
DataProvider,
|
|
744
|
-
new PostgresProvider(config.connectionString)
|
|
745
|
-
)
|
|
746
|
-
}
|
|
747
|
-
```
|
|
748
|
-
|
|
749
|
-
---
|
|
750
|
-
|
|
751
|
-
## Database Backends
|
|
752
|
-
|
|
753
|
-
### Supabase
|
|
754
|
-
|
|
755
|
-
```typescript
|
|
756
|
-
// frontend/src/providers/supabase/SupabaseProvider.ts
|
|
757
|
-
import { createClient } from '@supabase/supabase-js'
|
|
758
|
-
import { Effect, Layer } from 'effect'
|
|
759
|
-
import { DataProvider } from '../DataProvider'
|
|
760
|
-
|
|
761
|
-
export class SupabaseProvider implements DataProvider {
|
|
762
|
-
private supabase
|
|
763
|
-
|
|
764
|
-
constructor(url: string, anonKey: string) {
|
|
765
|
-
this.supabase = createClient(url, anonKey)
|
|
766
|
-
}
|
|
767
|
-
|
|
768
|
-
things = {
|
|
769
|
-
get: (id: string) =>
|
|
770
|
-
Effect.gen(this, function* () {
|
|
771
|
-
const { data, error } = yield* Effect.tryPromise({
|
|
772
|
-
try: () =>
|
|
773
|
-
this.supabase.from('things').select('*').eq('id', id).single(),
|
|
774
|
-
catch: (err) => new Error(String(err))
|
|
775
|
-
})
|
|
776
|
-
|
|
777
|
-
if (error) {
|
|
778
|
-
return yield* Effect.fail(new ThingNotFoundError(id))
|
|
779
|
-
}
|
|
780
|
-
|
|
781
|
-
return this.transformToThing(data)
|
|
782
|
-
}),
|
|
783
|
-
|
|
784
|
-
list: (params) =>
|
|
785
|
-
Effect.gen(this, function* () {
|
|
786
|
-
let query = this.supabase
|
|
787
|
-
.from('things')
|
|
788
|
-
.select('*')
|
|
789
|
-
.eq('type', params.type)
|
|
790
|
-
|
|
791
|
-
if (params.groupId) {
|
|
792
|
-
query = query.eq('organization_id', params.groupId)
|
|
793
|
-
}
|
|
794
|
-
|
|
795
|
-
const { data, error } = yield* Effect.tryPromise({
|
|
796
|
-
try: () => query.limit(params.limit || 10),
|
|
797
|
-
catch: (err) => new Error(String(err))
|
|
798
|
-
})
|
|
799
|
-
|
|
800
|
-
if (error) {
|
|
801
|
-
return yield* Effect.fail(new Error(error.message))
|
|
802
|
-
}
|
|
803
|
-
|
|
804
|
-
return data.map(row => this.transformToThing(row))
|
|
805
|
-
}),
|
|
806
|
-
|
|
807
|
-
// create, update, delete...
|
|
808
|
-
}
|
|
809
|
-
|
|
810
|
-
// ✅ Supabase supports real-time!
|
|
811
|
-
subscriptions = {
|
|
812
|
-
watchThing: (id: string) =>
|
|
813
|
-
Effect.gen(this, function* () {
|
|
814
|
-
// Supabase real-time subscription
|
|
815
|
-
const channel = this.supabase
|
|
816
|
-
.channel(`thing:${id}`)
|
|
817
|
-
.on('postgres_changes', {
|
|
818
|
-
event: '*',
|
|
819
|
-
schema: 'public',
|
|
820
|
-
table: 'things',
|
|
821
|
-
filter: `id=eq.${id}`
|
|
822
|
-
}, (payload) => {
|
|
823
|
-
// Emit updates via Observable
|
|
824
|
-
})
|
|
825
|
-
|
|
826
|
-
yield* Effect.tryPromise({
|
|
827
|
-
try: () => channel.subscribe(),
|
|
828
|
-
catch: (err) => new Error(String(err))
|
|
829
|
-
})
|
|
830
|
-
|
|
831
|
-
// Return observable
|
|
832
|
-
})
|
|
833
|
-
}
|
|
834
|
-
|
|
835
|
-
// ... rest of implementation
|
|
836
|
-
}
|
|
837
|
-
|
|
838
|
-
export function supabaseProvider(config: { url: string; anonKey: string }) {
|
|
839
|
-
return Layer.succeed(
|
|
840
|
-
DataProvider,
|
|
841
|
-
new SupabaseProvider(config.url, config.anonKey)
|
|
842
|
-
)
|
|
843
|
-
}
|
|
844
|
-
```
|
|
845
|
-
|
|
846
|
-
### Neon (Serverless Postgres)
|
|
847
|
-
|
|
848
|
-
```typescript
|
|
849
|
-
// frontend/src/providers/neon/NeonProvider.ts
|
|
850
|
-
import { neon } from '@neondatabase/serverless'
|
|
851
|
-
import { Effect, Layer } from 'effect'
|
|
852
|
-
import { DataProvider } from '../DataProvider'
|
|
853
|
-
|
|
854
|
-
export class NeonProvider implements DataProvider {
|
|
855
|
-
private sql
|
|
856
|
-
|
|
857
|
-
constructor(connectionString: string) {
|
|
858
|
-
this.sql = neon(connectionString)
|
|
859
|
-
}
|
|
860
|
-
|
|
861
|
-
things = {
|
|
862
|
-
get: (id: string) =>
|
|
863
|
-
Effect.gen(this, function* () {
|
|
864
|
-
const rows = yield* Effect.tryPromise({
|
|
865
|
-
try: () => this.sql`SELECT * FROM things WHERE id = ${id}`,
|
|
866
|
-
catch: (error) => new Error(String(error))
|
|
867
|
-
})
|
|
868
|
-
|
|
869
|
-
if (rows.length === 0) {
|
|
870
|
-
return yield* Effect.fail(new ThingNotFoundError(id))
|
|
871
|
-
}
|
|
872
|
-
|
|
873
|
-
return this.transformToThing(rows[0])
|
|
874
|
-
}),
|
|
875
|
-
|
|
876
|
-
list: (params) =>
|
|
877
|
-
Effect.gen(this, function* () {
|
|
878
|
-
const rows = yield* Effect.tryPromise({
|
|
879
|
-
try: () => this.sql`
|
|
880
|
-
SELECT * FROM things
|
|
881
|
-
WHERE type = ${params.type}
|
|
882
|
-
${params.groupId ? this.sql`AND organization_id = ${params.groupId}` : this.sql``}
|
|
883
|
-
LIMIT ${params.limit || 10}
|
|
884
|
-
`,
|
|
885
|
-
catch: (error) => new Error(String(error))
|
|
886
|
-
})
|
|
887
|
-
|
|
888
|
-
return rows.map(row => this.transformToThing(row))
|
|
889
|
-
}),
|
|
890
|
-
|
|
891
|
-
// create, update, delete...
|
|
892
|
-
}
|
|
893
|
-
|
|
894
|
-
// ... rest of implementation
|
|
895
|
-
}
|
|
896
|
-
|
|
897
|
-
export function neonProvider(config: { connectionString: string }) {
|
|
898
|
-
return Layer.succeed(DataProvider, new NeonProvider(config.connectionString))
|
|
899
|
-
}
|
|
900
|
-
```
|
|
901
|
-
|
|
902
|
-
### PlanetScale (MySQL)
|
|
903
|
-
|
|
904
|
-
```typescript
|
|
905
|
-
// frontend/src/providers/planetscale/PlanetScaleProvider.ts
|
|
906
|
-
import { connect } from '@planetscale/database'
|
|
907
|
-
import { Effect, Layer } from 'effect'
|
|
908
|
-
import { DataProvider } from '../DataProvider'
|
|
909
|
-
|
|
910
|
-
export class PlanetScaleProvider implements DataProvider {
|
|
911
|
-
private db
|
|
912
|
-
|
|
913
|
-
constructor(config: { host: string; username: string; password: string }) {
|
|
914
|
-
this.db = connect({
|
|
915
|
-
host: config.host,
|
|
916
|
-
username: config.username,
|
|
917
|
-
password: config.password
|
|
918
|
-
})
|
|
919
|
-
}
|
|
920
|
-
|
|
921
|
-
things = {
|
|
922
|
-
get: (id: string) =>
|
|
923
|
-
Effect.gen(this, function* () {
|
|
924
|
-
const result = yield* Effect.tryPromise({
|
|
925
|
-
try: () =>
|
|
926
|
-
this.db.execute('SELECT * FROM things WHERE id = ?', [id]),
|
|
927
|
-
catch: (error) => new Error(String(error))
|
|
928
|
-
})
|
|
929
|
-
|
|
930
|
-
if (result.rows.length === 0) {
|
|
931
|
-
return yield* Effect.fail(new ThingNotFoundError(id))
|
|
932
|
-
}
|
|
933
|
-
|
|
934
|
-
return this.transformToThing(result.rows[0])
|
|
935
|
-
}),
|
|
936
|
-
|
|
937
|
-
// ... rest of implementation
|
|
938
|
-
}
|
|
939
|
-
}
|
|
940
|
-
|
|
941
|
-
export function planetscaleProvider(config: {
|
|
942
|
-
host: string
|
|
943
|
-
username: string
|
|
944
|
-
password: string
|
|
945
|
-
}) {
|
|
946
|
-
return Layer.succeed(
|
|
947
|
-
DataProvider,
|
|
948
|
-
new PlanetScaleProvider(config)
|
|
949
|
-
)
|
|
950
|
-
}
|
|
951
|
-
```
|
|
952
|
-
|
|
953
|
-
### MongoDB
|
|
954
|
-
|
|
955
|
-
```typescript
|
|
956
|
-
// frontend/src/providers/mongo/MongoProvider.ts
|
|
957
|
-
import { MongoClient } from 'mongodb'
|
|
958
|
-
import { Effect, Layer } from 'effect'
|
|
959
|
-
import { DataProvider } from '../DataProvider'
|
|
960
|
-
|
|
961
|
-
export class MongoProvider implements DataProvider {
|
|
962
|
-
private client: MongoClient
|
|
963
|
-
private db
|
|
964
|
-
|
|
965
|
-
constructor(connectionString: string, dbName: string) {
|
|
966
|
-
this.client = new MongoClient(connectionString)
|
|
967
|
-
this.db = this.client.db(dbName)
|
|
968
|
-
}
|
|
969
|
-
|
|
970
|
-
things = {
|
|
971
|
-
get: (id: string) =>
|
|
972
|
-
Effect.gen(this, function* () {
|
|
973
|
-
const thing = yield* Effect.tryPromise({
|
|
974
|
-
try: () =>
|
|
975
|
-
this.db.collection('things').findOne({ _id: id }),
|
|
976
|
-
catch: (error) => new Error(String(error))
|
|
977
|
-
})
|
|
978
|
-
|
|
979
|
-
if (!thing) {
|
|
980
|
-
return yield* Effect.fail(new ThingNotFoundError(id))
|
|
981
|
-
}
|
|
982
|
-
|
|
983
|
-
return thing as Thing
|
|
984
|
-
}),
|
|
985
|
-
|
|
986
|
-
list: (params) =>
|
|
987
|
-
Effect.gen(this, function* () {
|
|
988
|
-
const filter: any = { type: params.type }
|
|
989
|
-
|
|
990
|
-
if (params.groupId) {
|
|
991
|
-
filter.groupId = params.groupId
|
|
992
|
-
}
|
|
993
|
-
|
|
994
|
-
const things = yield* Effect.tryPromise({
|
|
995
|
-
try: () =>
|
|
996
|
-
this.db
|
|
997
|
-
.collection('things')
|
|
998
|
-
.find(filter)
|
|
999
|
-
.limit(params.limit || 10)
|
|
1000
|
-
.toArray(),
|
|
1001
|
-
catch: (error) => new Error(String(error))
|
|
1002
|
-
})
|
|
1003
|
-
|
|
1004
|
-
return things as Thing[]
|
|
1005
|
-
}),
|
|
1006
|
-
|
|
1007
|
-
create: (input) =>
|
|
1008
|
-
Effect.gen(this, function* () {
|
|
1009
|
-
const result = yield* Effect.tryPromise({
|
|
1010
|
-
try: () =>
|
|
1011
|
-
this.db.collection('things').insertOne({
|
|
1012
|
-
type: input.type,
|
|
1013
|
-
name: input.name,
|
|
1014
|
-
properties: input.properties,
|
|
1015
|
-
groupId: input.groupId,
|
|
1016
|
-
status: 'active',
|
|
1017
|
-
createdAt: Date.now(),
|
|
1018
|
-
updatedAt: Date.now()
|
|
1019
|
-
}),
|
|
1020
|
-
catch: (error) => new Error(String(error))
|
|
1021
|
-
})
|
|
1022
|
-
|
|
1023
|
-
return result.insertedId.toString()
|
|
1024
|
-
}),
|
|
1025
|
-
|
|
1026
|
-
// update, delete...
|
|
1027
|
-
}
|
|
1028
|
-
|
|
1029
|
-
// connections, events, knowledge...
|
|
1030
|
-
}
|
|
1031
|
-
|
|
1032
|
-
export function mongoProvider(config: {
|
|
1033
|
-
connectionString: string
|
|
1034
|
-
dbName: string
|
|
1035
|
-
}) {
|
|
1036
|
-
return Layer.succeed(
|
|
1037
|
-
DataProvider,
|
|
1038
|
-
new MongoProvider(config.connectionString, config.dbName)
|
|
1039
|
-
)
|
|
1040
|
-
}
|
|
1041
|
-
```
|
|
1042
|
-
|
|
1043
|
-
---
|
|
1044
|
-
|
|
1045
|
-
## CMS Backends
|
|
1046
|
-
|
|
1047
|
-
See detailed guides:
|
|
1048
|
-
- **wordpress.md** - WordPress + WooCommerce backend
|
|
1049
|
-
- **cms.md** - Strapi, Contentful, Sanity, Ghost, Prismic
|
|
1050
|
-
|
|
1051
|
-
Quick examples:
|
|
1052
|
-
|
|
1053
|
-
### Strapi
|
|
1054
|
-
|
|
1055
|
-
```typescript
|
|
1056
|
-
// frontend/src/providers/strapi/StrapiProvider.ts
|
|
1057
|
-
import { Effect, Layer } from 'effect'
|
|
1058
|
-
import { DataProvider } from '../DataProvider'
|
|
1059
|
-
|
|
1060
|
-
export class StrapiProvider implements DataProvider {
|
|
1061
|
-
constructor(private baseUrl: string, private apiKey: string) {}
|
|
1062
|
-
|
|
1063
|
-
things = {
|
|
1064
|
-
get: (id: string) =>
|
|
1065
|
-
Effect.gen(this, function* () {
|
|
1066
|
-
const response = yield* Effect.tryPromise({
|
|
1067
|
-
try: () =>
|
|
1068
|
-
fetch(`${this.baseUrl}/api/${this.getCollectionName(type)}/${id}`, {
|
|
1069
|
-
headers: { 'Authorization': `Bearer ${this.apiKey}` }
|
|
1070
|
-
}),
|
|
1071
|
-
catch: (error) => new Error(String(error))
|
|
1072
|
-
})
|
|
1073
|
-
|
|
1074
|
-
const data = yield* Effect.tryPromise({
|
|
1075
|
-
try: () => response.json(),
|
|
1076
|
-
catch: (error) => new Error(String(error))
|
|
1077
|
-
})
|
|
1078
|
-
|
|
1079
|
-
// Transform Strapi data → ONE Thing
|
|
1080
|
-
return {
|
|
1081
|
-
_id: data.data.id.toString(),
|
|
1082
|
-
type: data.data.attributes.__component,
|
|
1083
|
-
name: data.data.attributes.title || data.data.attributes.name,
|
|
1084
|
-
properties: data.data.attributes,
|
|
1085
|
-
status: data.data.attributes.publishedAt ? 'active' : 'inactive',
|
|
1086
|
-
createdAt: new Date(data.data.attributes.createdAt).getTime(),
|
|
1087
|
-
updatedAt: new Date(data.data.attributes.updatedAt).getTime()
|
|
1088
|
-
}
|
|
1089
|
-
}),
|
|
1090
|
-
|
|
1091
|
-
// ... rest
|
|
1092
|
-
}
|
|
1093
|
-
|
|
1094
|
-
private getCollectionName(type: string): string {
|
|
1095
|
-
// Map ONE types → Strapi collections
|
|
1096
|
-
const mapping = {
|
|
1097
|
-
'post': 'articles',
|
|
1098
|
-
'course': 'courses',
|
|
1099
|
-
'product': 'products'
|
|
1100
|
-
}
|
|
1101
|
-
return mapping[type] || type + 's'
|
|
1102
|
-
}
|
|
1103
|
-
}
|
|
1104
|
-
|
|
1105
|
-
export function strapiProvider(config: { url: string; apiKey: string }) {
|
|
1106
|
-
return Layer.succeed(DataProvider, new StrapiProvider(config.url, config.apiKey))
|
|
1107
|
-
}
|
|
1108
|
-
```
|
|
1109
|
-
|
|
1110
|
-
### Contentful
|
|
1111
|
-
|
|
1112
|
-
```typescript
|
|
1113
|
-
// frontend/src/providers/contentful/ContentfulProvider.ts
|
|
1114
|
-
import { createClient } from 'contentful'
|
|
1115
|
-
import { Effect, Layer } from 'effect'
|
|
1116
|
-
import { DataProvider } from '../DataProvider'
|
|
1117
|
-
|
|
1118
|
-
export class ContentfulProvider implements DataProvider {
|
|
1119
|
-
private client
|
|
1120
|
-
|
|
1121
|
-
constructor(spaceId: string, accessToken: string) {
|
|
1122
|
-
this.client = createClient({
|
|
1123
|
-
space: spaceId,
|
|
1124
|
-
accessToken: accessToken
|
|
1125
|
-
})
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
|
-
things = {
|
|
1129
|
-
get: (id: string) =>
|
|
1130
|
-
Effect.gen(this, function* () {
|
|
1131
|
-
const entry = yield* Effect.tryPromise({
|
|
1132
|
-
try: () => this.client.getEntry(id),
|
|
1133
|
-
catch: (error) => new Error(String(error))
|
|
1134
|
-
})
|
|
1135
|
-
|
|
1136
|
-
return {
|
|
1137
|
-
_id: entry.sys.id,
|
|
1138
|
-
type: entry.sys.contentType.sys.id,
|
|
1139
|
-
name: entry.fields.title || entry.fields.name,
|
|
1140
|
-
properties: entry.fields,
|
|
1141
|
-
status: 'active',
|
|
1142
|
-
createdAt: new Date(entry.sys.createdAt).getTime(),
|
|
1143
|
-
updatedAt: new Date(entry.sys.updatedAt).getTime()
|
|
1144
|
-
}
|
|
1145
|
-
}),
|
|
1146
|
-
|
|
1147
|
-
list: (params) =>
|
|
1148
|
-
Effect.gen(this, function* () {
|
|
1149
|
-
const entries = yield* Effect.tryPromise({
|
|
1150
|
-
try: () =>
|
|
1151
|
-
this.client.getEntries({
|
|
1152
|
-
content_type: params.type,
|
|
1153
|
-
limit: params.limit || 10
|
|
1154
|
-
}),
|
|
1155
|
-
catch: (error) => new Error(String(error))
|
|
1156
|
-
})
|
|
1157
|
-
|
|
1158
|
-
return entries.items.map(entry => ({
|
|
1159
|
-
_id: entry.sys.id,
|
|
1160
|
-
type: entry.sys.contentType.sys.id,
|
|
1161
|
-
name: entry.fields.title || entry.fields.name,
|
|
1162
|
-
properties: entry.fields,
|
|
1163
|
-
status: 'active',
|
|
1164
|
-
createdAt: new Date(entry.sys.createdAt).getTime(),
|
|
1165
|
-
updatedAt: new Date(entry.sys.updatedAt).getTime()
|
|
1166
|
-
}))
|
|
1167
|
-
}),
|
|
1168
|
-
|
|
1169
|
-
// Contentful is read-only via API (use Management API for writes)
|
|
1170
|
-
create: () => Effect.fail(new Error('Use Contentful Management API')),
|
|
1171
|
-
update: () => Effect.fail(new Error('Use Contentful Management API')),
|
|
1172
|
-
delete: () => Effect.fail(new Error('Use Contentful Management API'))
|
|
1173
|
-
}
|
|
1174
|
-
|
|
1175
|
-
// ... rest
|
|
1176
|
-
}
|
|
1177
|
-
|
|
1178
|
-
export function contentfulProvider(config: {
|
|
1179
|
-
spaceId: string
|
|
1180
|
-
accessToken: string
|
|
1181
|
-
}) {
|
|
1182
|
-
return Layer.succeed(
|
|
1183
|
-
DataProvider,
|
|
1184
|
-
new ContentfulProvider(config.spaceId, config.accessToken)
|
|
1185
|
-
)
|
|
1186
|
-
}
|
|
1187
|
-
```
|
|
1188
|
-
|
|
1189
|
-
---
|
|
1190
|
-
|
|
1191
|
-
## SaaS API Backends
|
|
1192
|
-
|
|
1193
|
-
### Notion
|
|
1194
|
-
|
|
1195
|
-
```typescript
|
|
1196
|
-
// frontend/src/providers/notion/NotionProvider.ts
|
|
1197
|
-
import { Client } from '@notionhq/client'
|
|
1198
|
-
import { Effect, Layer } from 'effect'
|
|
1199
|
-
import { DataProvider } from '../DataProvider'
|
|
1200
|
-
|
|
1201
|
-
export class NotionProvider implements DataProvider {
|
|
1202
|
-
private notion: Client
|
|
1203
|
-
|
|
1204
|
-
constructor(apiKey: string, private databaseId: string) {
|
|
1205
|
-
this.notion = new Client({ auth: apiKey })
|
|
1206
|
-
}
|
|
1207
|
-
|
|
1208
|
-
things = {
|
|
1209
|
-
get: (id: string) =>
|
|
1210
|
-
Effect.gen(this, function* () {
|
|
1211
|
-
const page = yield* Effect.tryPromise({
|
|
1212
|
-
try: () => this.notion.pages.retrieve({ page_id: id }),
|
|
1213
|
-
catch: (error) => new Error(String(error))
|
|
1214
|
-
})
|
|
1215
|
-
|
|
1216
|
-
return {
|
|
1217
|
-
_id: page.id,
|
|
1218
|
-
type: 'document',
|
|
1219
|
-
name: (page.properties.Name as any).title[0]?.plain_text || '',
|
|
1220
|
-
properties: page.properties,
|
|
1221
|
-
status: 'active',
|
|
1222
|
-
createdAt: new Date(page.created_time).getTime(),
|
|
1223
|
-
updatedAt: new Date(page.last_edited_time).getTime()
|
|
1224
|
-
}
|
|
1225
|
-
}),
|
|
1226
|
-
|
|
1227
|
-
list: (params) =>
|
|
1228
|
-
Effect.gen(this, function* () {
|
|
1229
|
-
const response = yield* Effect.tryPromise({
|
|
1230
|
-
try: () =>
|
|
1231
|
-
this.notion.databases.query({
|
|
1232
|
-
database_id: this.databaseId,
|
|
1233
|
-
page_size: params.limit || 10
|
|
1234
|
-
}),
|
|
1235
|
-
catch: (error) => new Error(String(error))
|
|
1236
|
-
})
|
|
1237
|
-
|
|
1238
|
-
return response.results.map((page: any) => ({
|
|
1239
|
-
_id: page.id,
|
|
1240
|
-
type: params.type,
|
|
1241
|
-
name: page.properties.Name?.title[0]?.plain_text || '',
|
|
1242
|
-
properties: page.properties,
|
|
1243
|
-
status: 'active',
|
|
1244
|
-
createdAt: new Date(page.created_time).getTime(),
|
|
1245
|
-
updatedAt: new Date(page.last_edited_time).getTime()
|
|
1246
|
-
}))
|
|
1247
|
-
}),
|
|
1248
|
-
|
|
1249
|
-
create: (input) =>
|
|
1250
|
-
Effect.gen(this, function* () {
|
|
1251
|
-
const page = yield* Effect.tryPromise({
|
|
1252
|
-
try: () =>
|
|
1253
|
-
this.notion.pages.create({
|
|
1254
|
-
parent: { database_id: this.databaseId },
|
|
1255
|
-
properties: {
|
|
1256
|
-
Name: {
|
|
1257
|
-
title: [{ text: { content: input.name } }]
|
|
1258
|
-
}
|
|
1259
|
-
}
|
|
1260
|
-
}),
|
|
1261
|
-
catch: (error) => new Error(String(error))
|
|
1262
|
-
})
|
|
1263
|
-
|
|
1264
|
-
return page.id
|
|
1265
|
-
}),
|
|
1266
|
-
|
|
1267
|
-
// update, delete...
|
|
1268
|
-
}
|
|
1269
|
-
|
|
1270
|
-
// ... rest
|
|
1271
|
-
}
|
|
1272
|
-
|
|
1273
|
-
export function notionProvider(config: { apiKey: string; databaseId: string }) {
|
|
1274
|
-
return Layer.succeed(
|
|
1275
|
-
DataProvider,
|
|
1276
|
-
new NotionProvider(config.apiKey, config.databaseId)
|
|
1277
|
-
)
|
|
1278
|
-
}
|
|
1279
|
-
```
|
|
1280
|
-
|
|
1281
|
-
### Airtable
|
|
1282
|
-
|
|
1283
|
-
```typescript
|
|
1284
|
-
// frontend/src/providers/airtable/AirtableProvider.ts
|
|
1285
|
-
import Airtable from 'airtable'
|
|
1286
|
-
import { Effect, Layer } from 'effect'
|
|
1287
|
-
import { DataProvider } from '../DataProvider'
|
|
1288
|
-
|
|
1289
|
-
export class AirtableProvider implements DataProvider {
|
|
1290
|
-
private base
|
|
1291
|
-
|
|
1292
|
-
constructor(apiKey: string, baseId: string) {
|
|
1293
|
-
const airtable = new Airtable({ apiKey })
|
|
1294
|
-
this.base = airtable.base(baseId)
|
|
1295
|
-
}
|
|
1296
|
-
|
|
1297
|
-
things = {
|
|
1298
|
-
get: (id: string) =>
|
|
1299
|
-
Effect.gen(this, function* () {
|
|
1300
|
-
const record = yield* Effect.tryPromise({
|
|
1301
|
-
try: () => this.base('Things').find(id),
|
|
1302
|
-
catch: (error) => new Error(String(error))
|
|
1303
|
-
})
|
|
1304
|
-
|
|
1305
|
-
return {
|
|
1306
|
-
_id: record.id,
|
|
1307
|
-
type: record.fields.Type,
|
|
1308
|
-
name: record.fields.Name,
|
|
1309
|
-
properties: record.fields,
|
|
1310
|
-
status: 'active',
|
|
1311
|
-
createdAt: new Date(record.fields.Created).getTime(),
|
|
1312
|
-
updatedAt: new Date(record.fields.Modified).getTime()
|
|
1313
|
-
}
|
|
1314
|
-
}),
|
|
1315
|
-
|
|
1316
|
-
list: (params) =>
|
|
1317
|
-
Effect.gen(this, function* () {
|
|
1318
|
-
const records = yield* Effect.tryPromise({
|
|
1319
|
-
try: () =>
|
|
1320
|
-
this.base('Things')
|
|
1321
|
-
.select({
|
|
1322
|
-
filterByFormula: `{Type} = '${params.type}'`,
|
|
1323
|
-
maxRecords: params.limit || 10
|
|
1324
|
-
})
|
|
1325
|
-
.all(),
|
|
1326
|
-
catch: (error) => new Error(String(error))
|
|
1327
|
-
})
|
|
1328
|
-
|
|
1329
|
-
return records.map(record => ({
|
|
1330
|
-
_id: record.id,
|
|
1331
|
-
type: record.fields.Type,
|
|
1332
|
-
name: record.fields.Name,
|
|
1333
|
-
properties: record.fields,
|
|
1334
|
-
status: 'active',
|
|
1335
|
-
createdAt: new Date(record.fields.Created).getTime(),
|
|
1336
|
-
updatedAt: new Date(record.fields.Modified).getTime()
|
|
1337
|
-
}))
|
|
1338
|
-
}),
|
|
1339
|
-
|
|
1340
|
-
// create, update, delete...
|
|
1341
|
-
}
|
|
1342
|
-
|
|
1343
|
-
// ... rest
|
|
1344
|
-
}
|
|
1345
|
-
|
|
1346
|
-
export function airtableProvider(config: { apiKey: string; baseId: string }) {
|
|
1347
|
-
return Layer.succeed(
|
|
1348
|
-
DataProvider,
|
|
1349
|
-
new AirtableProvider(config.apiKey, config.baseId)
|
|
1350
|
-
)
|
|
1351
|
-
}
|
|
1352
|
-
```
|
|
1353
|
-
|
|
1354
|
-
---
|
|
1355
|
-
|
|
1356
|
-
## Custom Backends
|
|
1357
|
-
|
|
1358
|
-
### Your Own API
|
|
1359
|
-
|
|
1360
|
-
```typescript
|
|
1361
|
-
// frontend/src/providers/custom/CustomProvider.ts
|
|
1362
|
-
import { Effect, Layer } from 'effect'
|
|
1363
|
-
import { DataProvider } from '../DataProvider'
|
|
1364
|
-
|
|
1365
|
-
export class CustomProvider implements DataProvider {
|
|
1366
|
-
constructor(
|
|
1367
|
-
private config: {
|
|
1368
|
-
baseUrl: string
|
|
1369
|
-
authToken: string
|
|
1370
|
-
// Add your custom config
|
|
1371
|
-
}
|
|
1372
|
-
) {}
|
|
1373
|
-
|
|
1374
|
-
things = {
|
|
1375
|
-
get: (id: string) =>
|
|
1376
|
-
Effect.gen(this, function* () {
|
|
1377
|
-
// Your API call
|
|
1378
|
-
const response = yield* Effect.tryPromise({
|
|
1379
|
-
try: () =>
|
|
1380
|
-
fetch(`${this.config.baseUrl}/v1/entities/${id}`, {
|
|
1381
|
-
headers: {
|
|
1382
|
-
'X-API-Key': this.config.authToken
|
|
1383
|
-
}
|
|
1384
|
-
}),
|
|
1385
|
-
catch: (error) => new Error(String(error))
|
|
1386
|
-
})
|
|
1387
|
-
|
|
1388
|
-
const data = yield* Effect.tryPromise({
|
|
1389
|
-
try: () => response.json(),
|
|
1390
|
-
catch: (error) => new Error(String(error))
|
|
1391
|
-
})
|
|
1392
|
-
|
|
1393
|
-
// Transform YOUR data → ONE Thing
|
|
1394
|
-
return {
|
|
1395
|
-
_id: data.entity_id,
|
|
1396
|
-
type: data.entity_type,
|
|
1397
|
-
name: data.display_name,
|
|
1398
|
-
properties: data.metadata,
|
|
1399
|
-
status: data.is_active ? 'active' : 'inactive',
|
|
1400
|
-
createdAt: data.created_timestamp,
|
|
1401
|
-
updatedAt: data.updated_timestamp
|
|
1402
|
-
}
|
|
1403
|
-
}),
|
|
1404
|
-
|
|
1405
|
-
// Implement all other methods...
|
|
1406
|
-
}
|
|
1407
|
-
|
|
1408
|
-
connections = {
|
|
1409
|
-
// Your relationship API calls...
|
|
1410
|
-
}
|
|
1411
|
-
|
|
1412
|
-
events = {
|
|
1413
|
-
// Your analytics/logging API calls...
|
|
1414
|
-
}
|
|
1415
|
-
|
|
1416
|
-
knowledge = {
|
|
1417
|
-
// Your search API calls...
|
|
1418
|
-
}
|
|
1419
|
-
}
|
|
1420
|
-
|
|
1421
|
-
export function customProvider(config: any) {
|
|
1422
|
-
return Layer.succeed(DataProvider, new CustomProvider(config))
|
|
1423
|
-
}
|
|
1424
|
-
```
|
|
1425
|
-
|
|
1426
|
-
---
|
|
1427
|
-
|
|
1428
|
-
## Multi-Backend Setup
|
|
1429
|
-
|
|
1430
|
-
### Use Multiple Backends Simultaneously
|
|
1431
|
-
|
|
1432
|
-
```typescript
|
|
1433
|
-
// frontend/astro.config.ts
|
|
1434
|
-
import { defineConfig } from 'astro/config'
|
|
1435
|
-
import { one } from '@one/astro-integration'
|
|
1436
|
-
import { convexProvider } from './src/providers/convex'
|
|
1437
|
-
import { supabaseProvider } from './src/providers/supabase'
|
|
1438
|
-
import { wordpressProvider } from './src/providers/wordpress'
|
|
1439
|
-
|
|
1440
|
-
export default defineConfig({
|
|
1441
|
-
integrations: [
|
|
1442
|
-
one({
|
|
1443
|
-
// ✅ Use multiple providers!
|
|
1444
|
-
providers: {
|
|
1445
|
-
// Primary: Convex for real-time data
|
|
1446
|
-
primary: convexProvider({
|
|
1447
|
-
url: import.meta.env.PUBLIC_CONVEX_URL
|
|
1448
|
-
}),
|
|
1449
|
-
|
|
1450
|
-
// Content: WordPress for blog
|
|
1451
|
-
content: wordpressProvider({
|
|
1452
|
-
url: import.meta.env.WORDPRESS_URL,
|
|
1453
|
-
username: import.meta.env.WORDPRESS_USERNAME,
|
|
1454
|
-
password: import.meta.env.WORDPRESS_APP_PASSWORD
|
|
1455
|
-
}),
|
|
1456
|
-
|
|
1457
|
-
// Analytics: Supabase for analytics
|
|
1458
|
-
analytics: supabaseProvider({
|
|
1459
|
-
url: import.meta.env.PUBLIC_SUPABASE_URL,
|
|
1460
|
-
anonKey: import.meta.env.PUBLIC_SUPABASE_ANON_KEY
|
|
1461
|
-
})
|
|
1462
|
-
}
|
|
1463
|
-
})
|
|
1464
|
-
]
|
|
1465
|
-
})
|
|
1466
|
-
```
|
|
1467
|
-
|
|
1468
|
-
### Route Requests to Different Backends
|
|
1469
|
-
|
|
1470
|
-
```typescript
|
|
1471
|
-
// frontend/src/services/ThingClientService.ts
|
|
1472
|
-
import { Effect } from 'effect'
|
|
1473
|
-
import { DataProvider } from '@/providers/DataProvider'
|
|
1474
|
-
|
|
1475
|
-
export class ThingClientService extends Effect.Service<ThingClientService>()(
|
|
1476
|
-
'ThingClientService',
|
|
1477
|
-
{
|
|
1478
|
-
effect: Effect.gen(function* () {
|
|
1479
|
-
// Get all configured providers
|
|
1480
|
-
const providers = yield* Effect.all({
|
|
1481
|
-
primary: DataProvider.fromTag('primary'),
|
|
1482
|
-
content: DataProvider.fromTag('content'),
|
|
1483
|
-
analytics: DataProvider.fromTag('analytics')
|
|
1484
|
-
})
|
|
1485
|
-
|
|
1486
|
-
return {
|
|
1487
|
-
get: (id: string, type: string) =>
|
|
1488
|
-
Effect.gen(function* () {
|
|
1489
|
-
// Route based on thing type
|
|
1490
|
-
if (type === 'post' || type === 'page') {
|
|
1491
|
-
// Blog content → WordPress
|
|
1492
|
-
return yield* providers.content.things.get(id)
|
|
1493
|
-
} else if (type === 'event') {
|
|
1494
|
-
// Events → Analytics backend
|
|
1495
|
-
return yield* providers.analytics.things.get(id)
|
|
1496
|
-
} else {
|
|
1497
|
-
// Everything else → Primary backend
|
|
1498
|
-
return yield* providers.primary.things.get(id)
|
|
1499
|
-
}
|
|
1500
|
-
}),
|
|
1501
|
-
|
|
1502
|
-
list: (type: string, orgId?: string) =>
|
|
1503
|
-
Effect.gen(function* () {
|
|
1504
|
-
// Similar routing logic
|
|
1505
|
-
const provider = this.selectProvider(type)
|
|
1506
|
-
return yield* provider.things.list({ type, groupId: orgId })
|
|
1507
|
-
})
|
|
1508
|
-
}
|
|
1509
|
-
})
|
|
1510
|
-
}
|
|
1511
|
-
) {}
|
|
1512
|
-
```
|
|
1513
|
-
|
|
1514
|
-
---
|
|
1515
|
-
|
|
1516
|
-
## Testing
|
|
1517
|
-
|
|
1518
|
-
### Mock Provider for Testing
|
|
1519
|
-
|
|
1520
|
-
```typescript
|
|
1521
|
-
// frontend/src/providers/__tests__/MockProvider.ts
|
|
1522
|
-
import { Effect, Layer } from 'effect'
|
|
1523
|
-
import { DataProvider, Thing } from '../DataProvider'
|
|
1524
|
-
|
|
1525
|
-
export class MockProvider implements DataProvider {
|
|
1526
|
-
private storage = new Map<string, Thing>()
|
|
1527
|
-
|
|
1528
|
-
things = {
|
|
1529
|
-
get: (id: string) =>
|
|
1530
|
-
Effect.gen(this, function* () {
|
|
1531
|
-
const thing = this.storage.get(id)
|
|
1532
|
-
if (!thing) {
|
|
1533
|
-
return yield* Effect.fail(new ThingNotFoundError(id))
|
|
1534
|
-
}
|
|
1535
|
-
return thing
|
|
1536
|
-
}),
|
|
1537
|
-
|
|
1538
|
-
list: (params) =>
|
|
1539
|
-
Effect.succeed(
|
|
1540
|
-
Array.from(this.storage.values()).filter(
|
|
1541
|
-
thing => thing.type === params.type
|
|
1542
|
-
)
|
|
1543
|
-
),
|
|
1544
|
-
|
|
1545
|
-
create: (input) =>
|
|
1546
|
-
Effect.gen(this, function* () {
|
|
1547
|
-
const id = `mock_${Date.now()}`
|
|
1548
|
-
const thing: Thing = {
|
|
1549
|
-
_id: id,
|
|
1550
|
-
type: input.type,
|
|
1551
|
-
name: input.name,
|
|
1552
|
-
properties: input.properties,
|
|
1553
|
-
status: 'active',
|
|
1554
|
-
createdAt: Date.now(),
|
|
1555
|
-
updatedAt: Date.now()
|
|
1556
|
-
}
|
|
1557
|
-
this.storage.set(id, thing)
|
|
1558
|
-
return id
|
|
1559
|
-
}),
|
|
1560
|
-
|
|
1561
|
-
update: (id, updates) =>
|
|
1562
|
-
Effect.gen(this, function* () {
|
|
1563
|
-
const thing = this.storage.get(id)
|
|
1564
|
-
if (!thing) {
|
|
1565
|
-
return yield* Effect.fail(new Error('Not found'))
|
|
1566
|
-
}
|
|
1567
|
-
this.storage.set(id, { ...thing, ...updates })
|
|
1568
|
-
}),
|
|
1569
|
-
|
|
1570
|
-
delete: (id) =>
|
|
1571
|
-
Effect.gen(this, function* () {
|
|
1572
|
-
this.storage.delete(id)
|
|
1573
|
-
})
|
|
1574
|
-
}
|
|
1575
|
-
|
|
1576
|
-
connections = { /* mock implementations */ }
|
|
1577
|
-
events = { /* mock implementations */ }
|
|
1578
|
-
knowledge = { /* mock implementations */ }
|
|
1579
|
-
}
|
|
1580
|
-
|
|
1581
|
-
export function mockProvider() {
|
|
1582
|
-
return Layer.succeed(DataProvider, new MockProvider())
|
|
1583
|
-
}
|
|
1584
|
-
```
|
|
1585
|
-
|
|
1586
|
-
### Test with Mock Provider
|
|
1587
|
-
|
|
1588
|
-
```typescript
|
|
1589
|
-
// frontend/src/components/__tests__/ThingList.test.tsx
|
|
1590
|
-
import { describe, it, expect } from 'vitest'
|
|
1591
|
-
import { Effect } from 'effect'
|
|
1592
|
-
import { ThingClientService } from '@/services/ThingClientService'
|
|
1593
|
-
import { mockProvider } from '@/providers/__tests__/MockProvider'
|
|
1594
|
-
|
|
1595
|
-
describe('ThingList', () => {
|
|
1596
|
-
it('lists things from provider', async () => {
|
|
1597
|
-
const program = Effect.gen(function* () {
|
|
1598
|
-
const thingService = yield* ThingClientService
|
|
1599
|
-
|
|
1600
|
-
// Create test data
|
|
1601
|
-
yield* thingService.create({
|
|
1602
|
-
type: 'course',
|
|
1603
|
-
name: 'Test Course',
|
|
1604
|
-
properties: {}
|
|
1605
|
-
})
|
|
1606
|
-
|
|
1607
|
-
// List things
|
|
1608
|
-
const things = yield* thingService.list('course')
|
|
1609
|
-
|
|
1610
|
-
return things
|
|
1611
|
-
})
|
|
1612
|
-
|
|
1613
|
-
// Run with mock provider
|
|
1614
|
-
const things = await Effect.runPromise(
|
|
1615
|
-
program.pipe(
|
|
1616
|
-
Effect.provide(ThingClientService.Default),
|
|
1617
|
-
Effect.provide(mockProvider())
|
|
1618
|
-
)
|
|
1619
|
-
)
|
|
1620
|
-
|
|
1621
|
-
expect(things).toHaveLength(1)
|
|
1622
|
-
expect(things[0].name).toBe('Test Course')
|
|
1623
|
-
})
|
|
1624
|
-
})
|
|
1625
|
-
```
|
|
1626
|
-
|
|
1627
|
-
---
|
|
1628
|
-
|
|
1629
|
-
## Deployment
|
|
1630
|
-
|
|
1631
|
-
### Environment Configuration
|
|
1632
|
-
|
|
1633
|
-
```bash
|
|
1634
|
-
# frontend/.env
|
|
1635
|
-
|
|
1636
|
-
# ========================================
|
|
1637
|
-
# Provider Selection
|
|
1638
|
-
# ========================================
|
|
1639
|
-
PUBLIC_DATA_PROVIDER=convex # convex | supabase | wordpress | notion | custom
|
|
1640
|
-
|
|
1641
|
-
# ========================================
|
|
1642
|
-
# Convex
|
|
1643
|
-
# ========================================
|
|
1644
|
-
PUBLIC_CONVEX_URL=https://your-convex.convex.cloud
|
|
1645
|
-
|
|
1646
|
-
# ========================================
|
|
1647
|
-
# Supabase
|
|
1648
|
-
# ========================================
|
|
1649
|
-
PUBLIC_SUPABASE_URL=https://your-project.supabase.co
|
|
1650
|
-
PUBLIC_SUPABASE_ANON_KEY=your-anon-key
|
|
1651
|
-
|
|
1652
|
-
# ========================================
|
|
1653
|
-
# WordPress
|
|
1654
|
-
# ========================================
|
|
1655
|
-
WORDPRESS_URL=https://yoursite.com
|
|
1656
|
-
WORDPRESS_USERNAME=admin
|
|
1657
|
-
WORDPRESS_APP_PASSWORD=xxxx xxxx xxxx xxxx
|
|
1658
|
-
|
|
1659
|
-
# ========================================
|
|
1660
|
-
# Notion
|
|
1661
|
-
# ========================================
|
|
1662
|
-
NOTION_API_KEY=secret_xxx
|
|
1663
|
-
NOTION_DATABASE_ID=your-database-id
|
|
1664
|
-
|
|
1665
|
-
# ========================================
|
|
1666
|
-
# Custom API
|
|
1667
|
-
# ========================================
|
|
1668
|
-
CUSTOM_API_URL=https://api.yoursite.com
|
|
1669
|
-
CUSTOM_API_KEY=your-api-key
|
|
1670
|
-
```
|
|
1671
|
-
|
|
1672
|
-
### Deploy Frontend
|
|
1673
|
-
|
|
1674
|
-
```bash
|
|
1675
|
-
# Build frontend
|
|
1676
|
-
cd frontend
|
|
1677
|
-
npm run build
|
|
1678
|
-
|
|
1679
|
-
# Deploy to Cloudflare Pages / Vercel / Netlify
|
|
1680
|
-
# Set environment variables in hosting platform
|
|
1681
|
-
|
|
1682
|
-
# Frontend connects to backend via DataProvider
|
|
1683
|
-
# Backend can be anywhere (Convex, Supabase, your API, etc.)
|
|
1684
|
-
```
|
|
1685
|
-
|
|
1686
|
-
---
|
|
1687
|
-
|
|
1688
|
-
## Summary
|
|
1689
|
-
|
|
1690
|
-
### Key Principles
|
|
1691
|
-
|
|
1692
|
-
1. **Universal Interface**: DataProvider works with ANY backend
|
|
1693
|
-
2. **Backend-Agnostic Frontend**: Components never know which backend
|
|
1694
|
-
3. **Easy Switching**: Change ONE line to swap backends
|
|
1695
|
-
4. **Multi-Backend**: Use multiple backends simultaneously
|
|
1696
|
-
5. **Type-Safe**: Effect.ts ensures correctness
|
|
1697
|
-
6. **Testable**: Mock providers for testing
|
|
1698
|
-
|
|
1699
|
-
### Implementation Checklist
|
|
1700
|
-
|
|
1701
|
-
- [ ] Define DataProvider interface
|
|
1702
|
-
- [ ] Implement provider for your backend
|
|
1703
|
-
- [ ] Transform backend data → ONE Things
|
|
1704
|
-
- [ ] Configure Astro to use provider
|
|
1705
|
-
- [ ] Test CRUD operations
|
|
1706
|
-
- [ ] Deploy frontend + backend
|
|
1707
|
-
|
|
1708
|
-
### Next Steps
|
|
1709
|
-
|
|
1710
|
-
1. Choose your backend(s)
|
|
1711
|
-
2. Implement DataProvider for it
|
|
1712
|
-
3. Update Astro config
|
|
1713
|
-
4. Test with your data
|
|
1714
|
-
5. Deploy
|
|
1715
|
-
|
|
1716
|
-
---
|
|
1717
|
-
|
|
1718
|
-
**ONE Frontend + ANY Backend = Unlimited Flexibility**
|
|
1719
|
-
|
|
1720
|
-
Zero lock-in. Maximum flexibility. One interface.
|