oneie 3.7.0 → 3.8.1
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/buy.d.ts +19 -0
- package/dist/commands/buy.d.ts.map +1 -0
- package/dist/commands/buy.js +63 -0
- package/dist/commands/buy.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/deploy.d.ts +1 -1
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/deploy.js +39 -4
- package/dist/commands/deploy.js.map +1 -1
- 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/domain.d.ts +4 -0
- package/dist/commands/domain.d.ts.map +1 -0
- package/dist/commands/domain.js +19 -0
- package/dist/commands/domain.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 +85 -48
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/invite.d.ts +4 -0
- package/dist/commands/invite.d.ts.map +1 -0
- package/dist/commands/invite.js +37 -0
- package/dist/commands/invite.js.map +1 -0
- 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/sell.d.ts +15 -0
- package/dist/commands/sell.d.ts.map +1 -0
- package/dist/commands/sell.js +49 -0
- package/dist/commands/sell.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/subscribe.d.ts +14 -0
- package/dist/commands/subscribe.d.ts.map +1 -0
- package/dist/commands/subscribe.js +33 -0
- package/dist/commands/subscribe.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 +70 -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
|
@@ -1,2084 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: 2 6 Dashboard Migration
|
|
3
|
-
dimension: things
|
|
4
|
-
category: features
|
|
5
|
-
tags: ai, backend, frontend
|
|
6
|
-
related_dimensions: events, knowledge, people
|
|
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 things dimension in the features category.
|
|
13
|
-
Location: one/things/features/2-6-dashboard-migration.md
|
|
14
|
-
Purpose: Documents feature 2-6: dashboard component migration
|
|
15
|
-
Related dimensions: events, knowledge, people
|
|
16
|
-
For AI agents: Read this to understand 2 6 dashboard migration.
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
# Feature 2-6: Dashboard Component Migration
|
|
20
|
-
|
|
21
|
-
**Feature ID:** `feature_2_6_dashboard_migration`
|
|
22
|
-
**Plan:** `plan_2_backend_agnostic_frontend`
|
|
23
|
-
**Owner:** Frontend Specialist
|
|
24
|
-
**Status:** Ready for Implementation
|
|
25
|
-
**Priority:** P1 (High - Complete Migration)
|
|
26
|
-
**Effort:** 1 week (7 days)
|
|
27
|
-
**Dependencies:** Feature 2-5 (Auth Migration Complete)
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
## 1. Complete Technical Specification
|
|
32
|
-
|
|
33
|
-
### Overview
|
|
34
|
-
|
|
35
|
-
Migrate all dashboard components from direct Convex integration to the backend-agnostic DataProvider pattern. This migration enables the dashboard to work with any backend (Convex, Supabase, Firebase) while maintaining all existing functionality, performance, and user experience.
|
|
36
|
-
|
|
37
|
-
### Goals
|
|
38
|
-
|
|
39
|
-
1. **Backend Agnosticism**: Remove all direct Convex imports from dashboard components
|
|
40
|
-
2. **Functional Parity**: Preserve all existing dashboard features and behavior
|
|
41
|
-
3. **Performance Maintenance**: Ensure no performance degradation (within 10% baseline)
|
|
42
|
-
4. **Real-time Updates**: Maintain real-time data subscriptions and updates
|
|
43
|
-
5. **Type Safety**: Maintain full TypeScript type safety through DataProvider
|
|
44
|
-
6. **Test Coverage**: Update all tests to use DataProvider mocks
|
|
45
|
-
|
|
46
|
-
### Dashboard Architecture
|
|
47
|
-
|
|
48
|
-
```
|
|
49
|
-
Dashboard Component Tree:
|
|
50
|
-
├── DashboardLayout.tsx # Main layout wrapper
|
|
51
|
-
│ ├── Sidebar.tsx # Navigation (org-scoped)
|
|
52
|
-
│ ├── Header.tsx # User profile, notifications
|
|
53
|
-
│ └── Content Area
|
|
54
|
-
│ ├── DashboardOverview.tsx # Main dashboard (multiple hooks)
|
|
55
|
-
│ │ ├── StatsCards.tsx # Analytics (aggregated data)
|
|
56
|
-
│ │ ├── ActivityCharts.tsx # Charts (time-series data)
|
|
57
|
-
│ │ ├── RevenueCharts.tsx # Revenue analytics
|
|
58
|
-
│ │ └── RecentTransactions # Transaction list
|
|
59
|
-
│ ├── CourseList.tsx # Entity list component
|
|
60
|
-
│ ├── CourseDetail.tsx # Entity detail component
|
|
61
|
-
│ ├── LessonList.tsx # Entity list component
|
|
62
|
-
│ ├── LessonDetail.tsx # Entity detail component
|
|
63
|
-
│ ├── StudentList.tsx # Entity list component
|
|
64
|
-
│ ├── ActivityFeed.tsx # Event stream component
|
|
65
|
-
│ ├── SearchBar.tsx # Search component
|
|
66
|
-
│ └── SettingsPanel.tsx # Settings UI
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
### Component Categories and Hook Mapping
|
|
70
|
-
|
|
71
|
-
#### 1. Entity List Components (useThings)
|
|
72
|
-
|
|
73
|
-
**Components:**
|
|
74
|
-
|
|
75
|
-
- `CourseList.tsx` - Display all courses for org
|
|
76
|
-
- `LessonList.tsx` - Display lessons for course
|
|
77
|
-
- `StudentList.tsx` - Display enrolled students
|
|
78
|
-
- `AICloneList.tsx` - Display AI agents
|
|
79
|
-
|
|
80
|
-
**Hook Migration:**
|
|
81
|
-
|
|
82
|
-
```typescript
|
|
83
|
-
// BEFORE: Direct Convex
|
|
84
|
-
const courses = useQuery(api.queries.entities.list, { type: "course" });
|
|
85
|
-
|
|
86
|
-
// AFTER: DataProvider
|
|
87
|
-
const { data: courses, loading, error } = useThings({ type: "course" });
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
**Features to Preserve:**
|
|
91
|
-
|
|
92
|
-
- Filtering by status, organization
|
|
93
|
-
- Sorting by createdAt, updatedAt, name
|
|
94
|
-
- Pagination support
|
|
95
|
-
- Real-time updates
|
|
96
|
-
- Loading states
|
|
97
|
-
- Error handling
|
|
98
|
-
|
|
99
|
-
#### 2. Entity Detail Components (useThing, useConnections)
|
|
100
|
-
|
|
101
|
-
**Components:**
|
|
102
|
-
|
|
103
|
-
- `CourseDetail.tsx` - Display course details + relationships
|
|
104
|
-
- `LessonDetail.tsx` - Display lesson details
|
|
105
|
-
- `StudentProfile.tsx` - Display student profile
|
|
106
|
-
|
|
107
|
-
**Hook Migration:**
|
|
108
|
-
|
|
109
|
-
```typescript
|
|
110
|
-
// BEFORE: Direct Convex
|
|
111
|
-
const course = useQuery(api.queries.entities.get, { id: courseId });
|
|
112
|
-
const students = useQuery(api.queries.connections.getRelated, {
|
|
113
|
-
fromThingId: courseId,
|
|
114
|
-
relationshipType: "enrolled_in",
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
// AFTER: DataProvider
|
|
118
|
-
const { data: course, loading, error } = useThing({ id: courseId });
|
|
119
|
-
const { data: students, loading: studentsLoading } = useConnections({
|
|
120
|
-
fromThingId: courseId,
|
|
121
|
-
relationshipType: "enrolled_in",
|
|
122
|
-
});
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
**Features to Preserve:**
|
|
126
|
-
|
|
127
|
-
- Display entity properties
|
|
128
|
-
- Display related entities (connections)
|
|
129
|
-
- Edit entity (useUpdateThing)
|
|
130
|
-
- Delete entity (useDeleteThing)
|
|
131
|
-
- Real-time updates
|
|
132
|
-
- Optimistic updates
|
|
133
|
-
|
|
134
|
-
#### 3. Activity Feed Component (useEvents)
|
|
135
|
-
|
|
136
|
-
**Component:**
|
|
137
|
-
|
|
138
|
-
- `ActivityFeed.tsx` - Display audit trail
|
|
139
|
-
|
|
140
|
-
**Hook Migration:**
|
|
141
|
-
|
|
142
|
-
```typescript
|
|
143
|
-
// BEFORE: Direct Convex
|
|
144
|
-
const events = useQuery(api.queries.events.getRecent, {
|
|
145
|
-
actorId: userId,
|
|
146
|
-
limit: 20,
|
|
147
|
-
});
|
|
148
|
-
|
|
149
|
-
// AFTER: DataProvider
|
|
150
|
-
const { data: events, loading } = useEvents({
|
|
151
|
-
actorId: userId,
|
|
152
|
-
limit: 20,
|
|
153
|
-
});
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
**Features to Preserve:**
|
|
157
|
-
|
|
158
|
-
- Filter by actor, target, event type
|
|
159
|
-
- Real-time updates
|
|
160
|
-
- Pagination (load more)
|
|
161
|
-
- Event formatting
|
|
162
|
-
- Timestamps
|
|
163
|
-
|
|
164
|
-
#### 4. Search Components (useSearch)
|
|
165
|
-
|
|
166
|
-
**Component:**
|
|
167
|
-
|
|
168
|
-
- `SearchBar.tsx` - Full-text search with autocomplete
|
|
169
|
-
|
|
170
|
-
**Hook Migration:**
|
|
171
|
-
|
|
172
|
-
```typescript
|
|
173
|
-
// BEFORE: Direct Convex
|
|
174
|
-
const results = useQuery(api.queries.search.fullText, {
|
|
175
|
-
query: searchQuery,
|
|
176
|
-
types: ["course", "lesson"],
|
|
177
|
-
});
|
|
178
|
-
|
|
179
|
-
// AFTER: DataProvider
|
|
180
|
-
const { data: results, loading } = useSearch({
|
|
181
|
-
query: searchQuery,
|
|
182
|
-
types: ["course", "lesson"],
|
|
183
|
-
});
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
**Features to Preserve:**
|
|
187
|
-
|
|
188
|
-
- Type-ahead suggestions
|
|
189
|
-
- Filter by entity type
|
|
190
|
-
- Debounced search
|
|
191
|
-
- RAG integration
|
|
192
|
-
- Highlighting
|
|
193
|
-
|
|
194
|
-
#### 5. Analytics Components (Multiple Hooks)
|
|
195
|
-
|
|
196
|
-
**Component:**
|
|
197
|
-
|
|
198
|
-
- `DashboardOverview.tsx` - Main dashboard with stats
|
|
199
|
-
- `StatsCards.tsx` - Aggregate metrics
|
|
200
|
-
- `ActivityCharts.tsx` - Time-series charts
|
|
201
|
-
- `RevenueCharts.tsx` - Revenue analytics
|
|
202
|
-
|
|
203
|
-
**Hook Migration:**
|
|
204
|
-
|
|
205
|
-
```typescript
|
|
206
|
-
// BEFORE: Direct Convex
|
|
207
|
-
const courseCount = useQuery(api.queries.analytics.countByType, {
|
|
208
|
-
type: "course",
|
|
209
|
-
});
|
|
210
|
-
const studentCount = useQuery(api.queries.analytics.countByType, {
|
|
211
|
-
type: "student",
|
|
212
|
-
});
|
|
213
|
-
const recentActivity = useQuery(api.queries.events.getRecent, { limit: 10 });
|
|
214
|
-
|
|
215
|
-
// AFTER: DataProvider
|
|
216
|
-
const { data: courses } = useThings({ type: "course" });
|
|
217
|
-
const { data: students } = useThings({ type: "student" });
|
|
218
|
-
const { data: recentActivity } = useEvents({ limit: 10 });
|
|
219
|
-
|
|
220
|
-
// Client-side aggregation
|
|
221
|
-
const courseCount = courses?.length || 0;
|
|
222
|
-
const studentCount = students?.length || 0;
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
**Features to Preserve:**
|
|
226
|
-
|
|
227
|
-
- Aggregate counts
|
|
228
|
-
- Time-series data
|
|
229
|
-
- Real-time updates
|
|
230
|
-
- Chart rendering
|
|
231
|
-
- Loading skeletons
|
|
232
|
-
|
|
233
|
-
---
|
|
234
|
-
|
|
235
|
-
## 2. Ontology Mapping (All 6 Dimensions)
|
|
236
|
-
|
|
237
|
-
### Organizations Dimension
|
|
238
|
-
|
|
239
|
-
**Dashboard Isolation:**
|
|
240
|
-
|
|
241
|
-
- All dashboard data is org-scoped
|
|
242
|
-
- Queries automatically filter by `organizationId`
|
|
243
|
-
- Sidebar shows current organization name/logo
|
|
244
|
-
- Org switcher for users with multiple orgs
|
|
245
|
-
- Org-level analytics and metrics
|
|
246
|
-
|
|
247
|
-
**Implementation:**
|
|
248
|
-
|
|
249
|
-
```typescript
|
|
250
|
-
// DataProvider automatically adds organizationId to all queries
|
|
251
|
-
const { data: courses } = useThings({
|
|
252
|
-
type: "course",
|
|
253
|
-
// organizationId: currentOrgId added automatically by DataProvider
|
|
254
|
-
});
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
**Org-Scoped Components:**
|
|
258
|
-
|
|
259
|
-
- `DashboardOverview` - Shows org metrics
|
|
260
|
-
- `CourseList` - Shows org courses
|
|
261
|
-
- `StudentList` - Shows org students
|
|
262
|
-
- `ActivityFeed` - Shows org events
|
|
263
|
-
- `SettingsPanel` - Shows org settings
|
|
264
|
-
|
|
265
|
-
### People Dimension
|
|
266
|
-
|
|
267
|
-
**Role-Based Dashboard:**
|
|
268
|
-
|
|
269
|
-
- `platform_owner` - See all organizations, platform-wide metrics
|
|
270
|
-
- `org_owner` - See org dashboard, admin controls
|
|
271
|
-
- `org_user` - See limited dashboard, own courses
|
|
272
|
-
- `customer` - See marketplace, enrolled courses
|
|
273
|
-
|
|
274
|
-
**Permission-Based UI:**
|
|
275
|
-
|
|
276
|
-
```typescript
|
|
277
|
-
function DashboardOverview() {
|
|
278
|
-
const { user, role } = useAuth();
|
|
279
|
-
|
|
280
|
-
return (
|
|
281
|
-
<div>
|
|
282
|
-
{/* All roles see their own stats */}
|
|
283
|
-
<StatsCards />
|
|
284
|
-
|
|
285
|
-
{/* Org owners see admin controls */}
|
|
286
|
-
{(role === "org_owner" || role === "platform_owner") && (
|
|
287
|
-
<AdminPanel />
|
|
288
|
-
)}
|
|
289
|
-
|
|
290
|
-
{/* Platform owners see platform metrics */}
|
|
291
|
-
{role === "platform_owner" && (
|
|
292
|
-
<PlatformMetrics />
|
|
293
|
-
)}
|
|
294
|
-
</div>
|
|
295
|
-
);
|
|
296
|
-
}
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
**People-Scoped Components:**
|
|
300
|
-
|
|
301
|
-
- `ActivityFeed` - Filter by actorId (current user)
|
|
302
|
-
- `CourseList` - Show courses owned by user
|
|
303
|
-
- `StudentList` - Show students enrolled in user's courses
|
|
304
|
-
|
|
305
|
-
### Things Dimension
|
|
306
|
-
|
|
307
|
-
**Entity Types Displayed:**
|
|
308
|
-
|
|
309
|
-
- `course` - Online courses
|
|
310
|
-
- `lesson` - Course lessons
|
|
311
|
-
- `ai_clone` - AI agents
|
|
312
|
-
- `creator` - Course creators/instructors
|
|
313
|
-
- `student` - Enrolled students
|
|
314
|
-
- `blog_post` - Content
|
|
315
|
-
- `token` - Digital assets
|
|
316
|
-
- `organization` - Organizations
|
|
317
|
-
|
|
318
|
-
**Entity Status Badges:**
|
|
319
|
-
|
|
320
|
-
```typescript
|
|
321
|
-
function EntityStatusBadge({ status }: { status: ThingStatus }) {
|
|
322
|
-
const statusStyles = {
|
|
323
|
-
draft: "bg-gray-100 text-gray-800",
|
|
324
|
-
active: "bg-green-100 text-green-800",
|
|
325
|
-
published: "bg-blue-100 text-blue-800",
|
|
326
|
-
archived: "bg-red-100 text-red-800"
|
|
327
|
-
};
|
|
328
|
-
|
|
329
|
-
return (
|
|
330
|
-
<span className={`px-2 py-1 rounded ${statusStyles[status]}`}>
|
|
331
|
-
{status}
|
|
332
|
-
</span>
|
|
333
|
-
);
|
|
334
|
-
}
|
|
335
|
-
```
|
|
336
|
-
|
|
337
|
-
**Thing-Scoped Components:**
|
|
338
|
-
|
|
339
|
-
- `CourseList` - Display course entities
|
|
340
|
-
- `CourseDetail` - Display single course entity
|
|
341
|
-
- `LessonList` - Display lesson entities
|
|
342
|
-
- `StudentList` - Display student entities
|
|
343
|
-
|
|
344
|
-
### Connections Dimension
|
|
345
|
-
|
|
346
|
-
**Relationships Displayed:**
|
|
347
|
-
|
|
348
|
-
- `owns` - Creator owns course
|
|
349
|
-
- `enrolled_in` - Student enrolled in course
|
|
350
|
-
- `authored` - Creator authored content
|
|
351
|
-
- `following` - User following creator
|
|
352
|
-
- `holds_tokens` - User holds tokens
|
|
353
|
-
|
|
354
|
-
**Connection Display:**
|
|
355
|
-
|
|
356
|
-
```typescript
|
|
357
|
-
function CourseStudents({ courseId }: { courseId: Id<"things"> }) {
|
|
358
|
-
const { data: enrollments, loading } = useConnections({
|
|
359
|
-
toThingId: courseId,
|
|
360
|
-
relationshipType: "enrolled_in"
|
|
361
|
-
});
|
|
362
|
-
|
|
363
|
-
if (loading) return <LoadingSkeleton />;
|
|
364
|
-
|
|
365
|
-
return (
|
|
366
|
-
<div>
|
|
367
|
-
<h3>Enrolled Students ({enrollments?.length})</h3>
|
|
368
|
-
{enrollments?.map(enrollment => (
|
|
369
|
-
<StudentCard
|
|
370
|
-
key={enrollment._id}
|
|
371
|
-
studentId={enrollment.fromThingId}
|
|
372
|
-
enrolledAt={enrollment.createdAt}
|
|
373
|
-
/>
|
|
374
|
-
))}
|
|
375
|
-
</div>
|
|
376
|
-
);
|
|
377
|
-
}
|
|
378
|
-
```
|
|
379
|
-
|
|
380
|
-
**Connection-Scoped Components:**
|
|
381
|
-
|
|
382
|
-
- `CourseDetail` - Show enrolled students (connections)
|
|
383
|
-
- `StudentProfile` - Show enrolled courses (connections)
|
|
384
|
-
- `ActivityFeed` - Show connection events (follow, enroll)
|
|
385
|
-
|
|
386
|
-
### Events Dimension
|
|
387
|
-
|
|
388
|
-
**Event Types Displayed:**
|
|
389
|
-
|
|
390
|
-
- `course_created` - Course created
|
|
391
|
-
- `course_updated` - Course updated
|
|
392
|
-
- `student_enrolled` - Student enrolled
|
|
393
|
-
- `lesson_completed` - Lesson completed
|
|
394
|
-
- `content_published` - Content published
|
|
395
|
-
- `token_transferred` - Token transferred
|
|
396
|
-
|
|
397
|
-
**Event Stream:**
|
|
398
|
-
|
|
399
|
-
```typescript
|
|
400
|
-
function ActivityFeed({ actorId }: { actorId?: Id<"things"> }) {
|
|
401
|
-
const { data: events, loading } = useEvents({
|
|
402
|
-
actorId,
|
|
403
|
-
limit: 20
|
|
404
|
-
});
|
|
405
|
-
|
|
406
|
-
if (loading) return <LoadingSkeleton />;
|
|
407
|
-
|
|
408
|
-
return (
|
|
409
|
-
<div className="space-y-4">
|
|
410
|
-
{events?.map(event => (
|
|
411
|
-
<EventCard
|
|
412
|
-
key={event._id}
|
|
413
|
-
event={event}
|
|
414
|
-
showActor={!actorId}
|
|
415
|
-
showTimestamp
|
|
416
|
-
/>
|
|
417
|
-
))}
|
|
418
|
-
</div>
|
|
419
|
-
);
|
|
420
|
-
}
|
|
421
|
-
```
|
|
422
|
-
|
|
423
|
-
**Event-Scoped Components:**
|
|
424
|
-
|
|
425
|
-
- `ActivityFeed` - Display event stream
|
|
426
|
-
- `DashboardOverview` - Show recent events
|
|
427
|
-
- `CourseDetail` - Show course-specific events
|
|
428
|
-
|
|
429
|
-
### Knowledge Dimension
|
|
430
|
-
|
|
431
|
-
**Search and Discovery:**
|
|
432
|
-
|
|
433
|
-
- Full-text search across entities
|
|
434
|
-
- RAG-powered content suggestions
|
|
435
|
-
- Knowledge labels (tags) for categorization
|
|
436
|
-
- Vector search for semantic similarity
|
|
437
|
-
|
|
438
|
-
**Search Implementation:**
|
|
439
|
-
|
|
440
|
-
```typescript
|
|
441
|
-
function SearchBar() {
|
|
442
|
-
const [query, setQuery] = useState("");
|
|
443
|
-
const { data: results, loading } = useSearch({
|
|
444
|
-
query,
|
|
445
|
-
types: ["course", "lesson", "blog_post"]
|
|
446
|
-
});
|
|
447
|
-
|
|
448
|
-
return (
|
|
449
|
-
<div>
|
|
450
|
-
<input
|
|
451
|
-
type="search"
|
|
452
|
-
value={query}
|
|
453
|
-
onChange={(e) => setQuery(e.target.value)}
|
|
454
|
-
placeholder="Search courses, lessons, content..."
|
|
455
|
-
/>
|
|
456
|
-
{loading && <LoadingSpinner />}
|
|
457
|
-
{results?.map(result => (
|
|
458
|
-
<SearchResult key={result._id} result={result} />
|
|
459
|
-
))}
|
|
460
|
-
</div>
|
|
461
|
-
);
|
|
462
|
-
}
|
|
463
|
-
```
|
|
464
|
-
|
|
465
|
-
**Knowledge-Scoped Components:**
|
|
466
|
-
|
|
467
|
-
- `SearchBar` - Full-text search
|
|
468
|
-
- `ContentRecommendations` - RAG suggestions
|
|
469
|
-
- `TagFilter` - Filter by knowledge labels
|
|
470
|
-
|
|
471
|
-
---
|
|
472
|
-
|
|
473
|
-
## 3. User Stories (10 Stories with Acceptance Criteria)
|
|
474
|
-
|
|
475
|
-
### Story 1: Creator Views Course Dashboard
|
|
476
|
-
|
|
477
|
-
**As a** course creator
|
|
478
|
-
**I want to** see my courses in the dashboard using DataProvider
|
|
479
|
-
**So that** the dashboard works with any backend and I can manage my courses
|
|
480
|
-
|
|
481
|
-
**Acceptance Criteria:**
|
|
482
|
-
|
|
483
|
-
- [ ] CourseList component uses `useThings` hook
|
|
484
|
-
- [ ] Loading state displays skeleton
|
|
485
|
-
- [ ] Courses display with name, thumbnail, status, student count
|
|
486
|
-
- [ ] Courses are org-scoped (only current org)
|
|
487
|
-
- [ ] Real-time updates when course is created/updated
|
|
488
|
-
- [ ] Error state displays user-friendly message
|
|
489
|
-
- [ ] No direct Convex imports in component
|
|
490
|
-
|
|
491
|
-
### Story 2: Org Owner Views Analytics
|
|
492
|
-
|
|
493
|
-
**As an** organization owner
|
|
494
|
-
**I want to** see aggregated analytics in the dashboard
|
|
495
|
-
**So that** I can track org performance and growth
|
|
496
|
-
|
|
497
|
-
**Acceptance Criteria:**
|
|
498
|
-
|
|
499
|
-
- [ ] StatsCards component uses multiple DataProvider hooks
|
|
500
|
-
- [ ] Displays course count, student count, revenue, engagement
|
|
501
|
-
- [ ] Loading states for each metric
|
|
502
|
-
- [ ] Real-time updates when data changes
|
|
503
|
-
- [ ] Charts render with proper data aggregation
|
|
504
|
-
- [ ] No direct Convex imports in component
|
|
505
|
-
|
|
506
|
-
### Story 3: Instructor Views Enrolled Students
|
|
507
|
-
|
|
508
|
-
**As an** instructor
|
|
509
|
-
**I want to** see students enrolled in my course
|
|
510
|
-
**So that** I can track enrollment and student progress
|
|
511
|
-
|
|
512
|
-
**Acceptance Criteria:**
|
|
513
|
-
|
|
514
|
-
- [ ] CourseDetail uses `useThing` and `useConnections` hooks
|
|
515
|
-
- [ ] Displays course details and enrolled students
|
|
516
|
-
- [ ] Student list shows name, email, enrollment date
|
|
517
|
-
- [ ] Loading states for course and students
|
|
518
|
-
- [ ] Real-time updates when student enrolls
|
|
519
|
-
- [ ] No direct Convex imports in component
|
|
520
|
-
|
|
521
|
-
### Story 4: User Views Activity Feed
|
|
522
|
-
|
|
523
|
-
**As a** user
|
|
524
|
-
**I want to** see recent activity in my dashboard
|
|
525
|
-
**So that** I can stay updated on platform events
|
|
526
|
-
|
|
527
|
-
**Acceptance Criteria:**
|
|
528
|
-
|
|
529
|
-
- [ ] ActivityFeed component uses `useEvents` hook
|
|
530
|
-
- [ ] Displays recent events with actor, action, timestamp
|
|
531
|
-
- [ ] Loading state displays skeleton
|
|
532
|
-
- [ ] Real-time updates when events occur
|
|
533
|
-
- [ ] Pagination support (load more)
|
|
534
|
-
- [ ] Filter by event type
|
|
535
|
-
- [ ] No direct Convex imports in component
|
|
536
|
-
|
|
537
|
-
### Story 5: Creator Searches Content
|
|
538
|
-
|
|
539
|
-
**As a** creator
|
|
540
|
-
**I want to** search for courses, lessons, and content
|
|
541
|
-
**So that** I can quickly find what I need
|
|
542
|
-
|
|
543
|
-
**Acceptance Criteria:**
|
|
544
|
-
|
|
545
|
-
- [ ] SearchBar component uses `useSearch` hook
|
|
546
|
-
- [ ] Type-ahead suggestions as I type
|
|
547
|
-
- [ ] Filter by entity type (course, lesson, blog_post)
|
|
548
|
-
- [ ] Debounced search (300ms delay)
|
|
549
|
-
- [ ] Loading state during search
|
|
550
|
-
- [ ] Highlighting of search terms
|
|
551
|
-
- [ ] No direct Convex imports in component
|
|
552
|
-
|
|
553
|
-
### Story 6: Instructor Edits Course
|
|
554
|
-
|
|
555
|
-
**As an** instructor
|
|
556
|
-
**I want to** edit my course from the dashboard
|
|
557
|
-
**So that** I can update course details
|
|
558
|
-
|
|
559
|
-
**Acceptance Criteria:**
|
|
560
|
-
|
|
561
|
-
- [ ] CourseDetail uses `useUpdateThing` hook
|
|
562
|
-
- [ ] Displays course edit form
|
|
563
|
-
- [ ] Optimistic update (UI updates immediately)
|
|
564
|
-
- [ ] Success/error toast notifications
|
|
565
|
-
- [ ] Validation errors display inline
|
|
566
|
-
- [ ] Real-time updates reflect in list view
|
|
567
|
-
- [ ] No direct Convex imports in component
|
|
568
|
-
|
|
569
|
-
### Story 7: Student Views Enrolled Courses
|
|
570
|
-
|
|
571
|
-
**As a** student
|
|
572
|
-
**I want to** see my enrolled courses in the dashboard
|
|
573
|
-
**So that** I can access my learning materials
|
|
574
|
-
|
|
575
|
-
**Acceptance Criteria:**
|
|
576
|
-
|
|
577
|
-
- [ ] StudentDashboard uses `useConnections` hook
|
|
578
|
-
- [ ] Displays courses student is enrolled in
|
|
579
|
-
- [ ] Shows course progress and completion
|
|
580
|
-
- [ ] Loading state displays skeleton
|
|
581
|
-
- [ ] Real-time updates when enrolled in new course
|
|
582
|
-
- [ ] No direct Convex imports in component
|
|
583
|
-
|
|
584
|
-
### Story 8: Org Owner Views Revenue Charts
|
|
585
|
-
|
|
586
|
-
**As an** organization owner
|
|
587
|
-
**I want to** see revenue charts in the dashboard
|
|
588
|
-
**So that** I can track financial performance
|
|
589
|
-
|
|
590
|
-
**Acceptance Criteria:**
|
|
591
|
-
|
|
592
|
-
- [ ] RevenueCharts uses `useEvents` hook for transaction events
|
|
593
|
-
- [ ] Aggregates revenue by day/week/month
|
|
594
|
-
- [ ] Displays line chart and bar chart
|
|
595
|
-
- [ ] Loading state displays skeleton
|
|
596
|
-
- [ ] Real-time updates when transactions occur
|
|
597
|
-
- [ ] Export chart data to CSV
|
|
598
|
-
- [ ] No direct Convex imports in component
|
|
599
|
-
|
|
600
|
-
### Story 9: Platform Owner Views All Organizations
|
|
601
|
-
|
|
602
|
-
**As a** platform owner
|
|
603
|
-
**I want to** see all organizations in the dashboard
|
|
604
|
-
**So that** I can manage the platform
|
|
605
|
-
|
|
606
|
-
**Acceptance Criteria:**
|
|
607
|
-
|
|
608
|
-
- [ ] PlatformDashboard uses `useOrganizations` hook
|
|
609
|
-
- [ ] Displays all organizations with stats
|
|
610
|
-
- [ ] Shows org name, plan, user count, usage
|
|
611
|
-
- [ ] Loading state displays skeleton
|
|
612
|
-
- [ ] Real-time updates when org is created/updated
|
|
613
|
-
- [ ] Filter by plan (starter, pro, enterprise)
|
|
614
|
-
- [ ] No direct Convex imports in component
|
|
615
|
-
|
|
616
|
-
### Story 10: User Views Dashboard on Mobile
|
|
617
|
-
|
|
618
|
-
**As a** mobile user
|
|
619
|
-
**I want to** view the dashboard on my phone
|
|
620
|
-
**So that** I can access my data anywhere
|
|
621
|
-
|
|
622
|
-
**Acceptance Criteria:**
|
|
623
|
-
|
|
624
|
-
- [ ] DashboardLayout is fully responsive
|
|
625
|
-
- [ ] Mobile menu works correctly
|
|
626
|
-
- [ ] Charts render properly on small screens
|
|
627
|
-
- [ ] Touch interactions work (swipe, tap)
|
|
628
|
-
- [ ] Loading states display on mobile
|
|
629
|
-
- [ ] Performance is acceptable (< 3s load time)
|
|
630
|
-
- [ ] No direct Convex imports in component
|
|
631
|
-
|
|
632
|
-
---
|
|
633
|
-
|
|
634
|
-
## 4. Implementation Steps (50 Steps)
|
|
635
|
-
|
|
636
|
-
### Phase 1: Audit and Preparation (Day 1)
|
|
637
|
-
|
|
638
|
-
**Step 1-10: Audit Current Implementation**
|
|
639
|
-
|
|
640
|
-
1. **Audit all dashboard components** - List all files in `frontend/src/components/dashboard/`
|
|
641
|
-
2. **Identify Convex imports** - Grep for `import { useQuery, useMutation } from "convex/react"`
|
|
642
|
-
3. **Map components to hooks** - Create mapping table (component → hooks needed)
|
|
643
|
-
4. **Document current functionality** - Screenshot all dashboard pages, document features
|
|
644
|
-
5. **Review tests** - Identify all test files in `frontend/test/components/dashboard/`
|
|
645
|
-
6. **Create migration checklist** - Component-by-component checklist
|
|
646
|
-
7. **Set up feature branch** - `git checkout -b feature/dashboard-migration`
|
|
647
|
-
8. **Create rollback points** - Tag commits for easy rollback
|
|
648
|
-
9. **Review DataProvider hooks** - Ensure all needed hooks exist
|
|
649
|
-
10. **Review performance baseline** - Run Lighthouse, document metrics
|
|
650
|
-
|
|
651
|
-
**Step 11-15: Prepare Test Infrastructure**
|
|
652
|
-
|
|
653
|
-
11. **Create DataProvider mocks** - Mock implementations for tests
|
|
654
|
-
12. **Create test utilities** - Helper functions for dashboard tests
|
|
655
|
-
13. **Set up visual regression tests** - Capture baseline screenshots
|
|
656
|
-
14. **Set up performance monitoring** - Add performance markers
|
|
657
|
-
15. **Document test strategy** - Write test plan document
|
|
658
|
-
|
|
659
|
-
### Phase 2: Migrate Entity List Components (Day 2-3)
|
|
660
|
-
|
|
661
|
-
**Step 16-20: Migrate CourseList**
|
|
662
|
-
|
|
663
|
-
16. **Read CourseList.tsx** - Understand current implementation
|
|
664
|
-
17. **Replace useQuery with useThings** - Migrate to DataProvider hook
|
|
665
|
-
18. **Update loading state** - Use `loading` from hook
|
|
666
|
-
19. **Update error handling** - Use `error` from hook
|
|
667
|
-
20. **Test CourseList** - Run component tests, verify functionality
|
|
668
|
-
|
|
669
|
-
**Step 21-25: Migrate LessonList**
|
|
670
|
-
|
|
671
|
-
21. **Read LessonList.tsx** - Understand current implementation
|
|
672
|
-
22. **Replace useQuery with useThings** - Migrate to DataProvider hook
|
|
673
|
-
23. **Add courseId filter** - Filter lessons by parent course
|
|
674
|
-
24. **Update loading state** - Use `loading` from hook
|
|
675
|
-
25. **Test LessonList** - Run component tests, verify functionality
|
|
676
|
-
|
|
677
|
-
**Step 26-30: Migrate StudentList**
|
|
678
|
-
|
|
679
|
-
26. **Read StudentList.tsx** - Understand current implementation
|
|
680
|
-
27. **Replace useQuery with useThings** - Migrate to DataProvider hook
|
|
681
|
-
28. **Update loading state** - Use `loading` from hook
|
|
682
|
-
29. **Add pagination support** - Implement load more functionality
|
|
683
|
-
30. **Test StudentList** - Run component tests, verify functionality
|
|
684
|
-
|
|
685
|
-
### Phase 3: Migrate Entity Detail Components (Day 3-4)
|
|
686
|
-
|
|
687
|
-
**Step 31-35: Migrate CourseDetail**
|
|
688
|
-
|
|
689
|
-
31. **Read CourseDetail.tsx** - Understand current implementation
|
|
690
|
-
32. **Replace useQuery with useThing** - Migrate single entity fetch
|
|
691
|
-
33. **Add useConnections for students** - Fetch enrolled students
|
|
692
|
-
34. **Replace useMutation with useUpdateThing** - Migrate update logic
|
|
693
|
-
35. **Test CourseDetail** - Run component tests, verify functionality
|
|
694
|
-
|
|
695
|
-
**Step 36-40: Migrate LessonDetail**
|
|
696
|
-
|
|
697
|
-
36. **Read LessonDetail.tsx** - Understand current implementation
|
|
698
|
-
37. **Replace useQuery with useThing** - Migrate single entity fetch
|
|
699
|
-
38. **Add useConnections for parent course** - Fetch parent course
|
|
700
|
-
39. **Replace useMutation with useUpdateThing** - Migrate update logic
|
|
701
|
-
40. **Test LessonDetail** - Run component tests, verify functionality
|
|
702
|
-
|
|
703
|
-
### Phase 4: Migrate Activity & Search (Day 5)
|
|
704
|
-
|
|
705
|
-
**Step 41-45: Migrate ActivityFeed and SearchBar**
|
|
706
|
-
|
|
707
|
-
41. **Read ActivityFeed.tsx** - Understand current implementation
|
|
708
|
-
42. **Replace useQuery with useEvents** - Migrate event stream
|
|
709
|
-
43. **Test ActivityFeed** - Run component tests, verify real-time updates
|
|
710
|
-
44. **Read SearchBar.tsx** - Understand current implementation
|
|
711
|
-
45. **Replace useQuery with useSearch** - Migrate search logic
|
|
712
|
-
|
|
713
|
-
### Phase 5: Migrate Analytics Components (Day 5-6)
|
|
714
|
-
|
|
715
|
-
**Step 46-50: Migrate DashboardOverview, StatsCards, Charts**
|
|
716
|
-
|
|
717
|
-
46. **Read DashboardOverview.tsx** - Understand current implementation with multiple hooks
|
|
718
|
-
47. **Replace queries with DataProvider hooks** - Migrate all data fetching
|
|
719
|
-
48. **Add client-side aggregation** - Calculate metrics from raw data
|
|
720
|
-
49. **Update chart components** - Ensure charts work with new data format
|
|
721
|
-
50. **Test DashboardOverview** - Run component tests, verify all metrics display
|
|
722
|
-
|
|
723
|
-
### Phase 6: Cleanup and Optimization (Day 6-7)
|
|
724
|
-
|
|
725
|
-
**Step 51-60: Remove Dependencies and Optimize**
|
|
726
|
-
|
|
727
|
-
51. **Remove all Convex imports** - Grep and remove `from "convex/react"`
|
|
728
|
-
52. **Remove api imports** - Remove `import { api } from "@/convex/_generated/api"`
|
|
729
|
-
53. **Add error boundaries** - Wrap components with error boundaries
|
|
730
|
-
54. **Optimize performance** - Add memoization, virtualization where needed
|
|
731
|
-
55. **Update all tests** - Ensure all tests use DataProvider mocks
|
|
732
|
-
56. **Run full test suite** - Verify all tests pass
|
|
733
|
-
57. **Run visual regression tests** - Compare screenshots
|
|
734
|
-
58. **Run performance tests** - Verify within 10% of baseline
|
|
735
|
-
59. **Document migration changes** - Update component API docs
|
|
736
|
-
60. **Create pull request** - Submit for review
|
|
737
|
-
|
|
738
|
-
---
|
|
739
|
-
|
|
740
|
-
## 5. Complete Code Examples
|
|
741
|
-
|
|
742
|
-
### Example 1: DashboardOverview Migration
|
|
743
|
-
|
|
744
|
-
**BEFORE (Tightly Coupled to Convex):**
|
|
745
|
-
|
|
746
|
-
```typescript
|
|
747
|
-
// frontend/src/components/dashboard/DashboardOverview.tsx
|
|
748
|
-
import { useQuery } from "convex/react";
|
|
749
|
-
import { api } from "@/convex/_generated/api";
|
|
750
|
-
import { StatsCards } from "./StatsCards";
|
|
751
|
-
import { ActivityCharts } from "./ActivityCharts";
|
|
752
|
-
import { RevenueCharts } from "./RevenueCharts";
|
|
753
|
-
import { RecentTransactions } from "./RecentTransactions";
|
|
754
|
-
|
|
755
|
-
export function DashboardOverview() {
|
|
756
|
-
// Multiple Convex queries
|
|
757
|
-
const courses = useQuery(api.queries.entities.list, { type: "course" });
|
|
758
|
-
const students = useQuery(api.queries.entities.list, { type: "student" });
|
|
759
|
-
const recentEvents = useQuery(api.queries.events.getRecent, { limit: 10 });
|
|
760
|
-
const transactions = useQuery(api.queries.events.getByType, {
|
|
761
|
-
eventType: "token_transferred",
|
|
762
|
-
limit: 10
|
|
763
|
-
});
|
|
764
|
-
|
|
765
|
-
// Loading state
|
|
766
|
-
if (courses === undefined || students === undefined) {
|
|
767
|
-
return <div>Loading dashboard...</div>;
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
// Aggregate metrics
|
|
771
|
-
const totalCourses = courses.length;
|
|
772
|
-
const totalStudents = students.length;
|
|
773
|
-
const activeStudents = students.filter(s => s.properties.lastActive > Date.now() - 7 * 24 * 60 * 60 * 1000).length;
|
|
774
|
-
|
|
775
|
-
return (
|
|
776
|
-
<div className="space-y-6">
|
|
777
|
-
<h1 className="text-3xl font-bold">Dashboard</h1>
|
|
778
|
-
|
|
779
|
-
<StatsCards
|
|
780
|
-
totalCourses={totalCourses}
|
|
781
|
-
totalStudents={totalStudents}
|
|
782
|
-
activeStudents={activeStudents}
|
|
783
|
-
/>
|
|
784
|
-
|
|
785
|
-
<div className="grid grid-cols-2 gap-6">
|
|
786
|
-
<ActivityCharts events={recentEvents || []} />
|
|
787
|
-
<RevenueCharts transactions={transactions || []} />
|
|
788
|
-
</div>
|
|
789
|
-
|
|
790
|
-
<RecentTransactions transactions={transactions || []} />
|
|
791
|
-
</div>
|
|
792
|
-
);
|
|
793
|
-
}
|
|
794
|
-
```
|
|
795
|
-
|
|
796
|
-
**AFTER (Backend-Agnostic with DataProvider):**
|
|
797
|
-
|
|
798
|
-
```typescript
|
|
799
|
-
// frontend/src/components/dashboard/DashboardOverview.tsx
|
|
800
|
-
import { useMemo } from "react";
|
|
801
|
-
import { useThings, useEvents } from "@/providers/hooks";
|
|
802
|
-
import { StatsCards } from "./StatsCards";
|
|
803
|
-
import { ActivityCharts } from "./ActivityCharts";
|
|
804
|
-
import { RevenueCharts } from "./RevenueCharts";
|
|
805
|
-
import { RecentTransactions } from "./RecentTransactions";
|
|
806
|
-
import { LoadingSkeleton } from "@/components/ui/loading-skeleton";
|
|
807
|
-
import { ErrorMessage } from "@/components/ui/error-message";
|
|
808
|
-
|
|
809
|
-
export function DashboardOverview() {
|
|
810
|
-
// DataProvider hooks (backend-agnostic)
|
|
811
|
-
const { data: courses, loading: coursesLoading, error: coursesError } = useThings({ type: "course" });
|
|
812
|
-
const { data: students, loading: studentsLoading, error: studentsError } = useThings({ type: "student" });
|
|
813
|
-
const { data: recentEvents, loading: eventsLoading } = useEvents({ limit: 10 });
|
|
814
|
-
const { data: transactions, loading: transactionsLoading } = useEvents({
|
|
815
|
-
eventType: "token_transferred",
|
|
816
|
-
limit: 10
|
|
817
|
-
});
|
|
818
|
-
|
|
819
|
-
// Aggregate loading state
|
|
820
|
-
const loading = coursesLoading || studentsLoading;
|
|
821
|
-
|
|
822
|
-
// Handle errors
|
|
823
|
-
if (coursesError || studentsError) {
|
|
824
|
-
return <ErrorMessage error={coursesError || studentsError} />;
|
|
825
|
-
}
|
|
826
|
-
|
|
827
|
-
// Loading state with skeleton
|
|
828
|
-
if (loading) {
|
|
829
|
-
return <LoadingSkeleton layout="dashboard" />;
|
|
830
|
-
}
|
|
831
|
-
|
|
832
|
-
// Memoized metrics (only recalculate when data changes)
|
|
833
|
-
const metrics = useMemo(() => {
|
|
834
|
-
const totalCourses = courses?.length || 0;
|
|
835
|
-
const totalStudents = students?.length || 0;
|
|
836
|
-
const activeStudents = students?.filter(
|
|
837
|
-
s => s.properties.lastActive > Date.now() - 7 * 24 * 60 * 60 * 1000
|
|
838
|
-
).length || 0;
|
|
839
|
-
|
|
840
|
-
return { totalCourses, totalStudents, activeStudents };
|
|
841
|
-
}, [courses, students]);
|
|
842
|
-
|
|
843
|
-
return (
|
|
844
|
-
<div className="space-y-6">
|
|
845
|
-
<h1 className="text-3xl font-bold">Dashboard</h1>
|
|
846
|
-
|
|
847
|
-
<StatsCards
|
|
848
|
-
totalCourses={metrics.totalCourses}
|
|
849
|
-
totalStudents={metrics.totalStudents}
|
|
850
|
-
activeStudents={metrics.activeStudents}
|
|
851
|
-
/>
|
|
852
|
-
|
|
853
|
-
<div className="grid grid-cols-1 lg:grid-cols-2 gap-6">
|
|
854
|
-
{eventsLoading ? (
|
|
855
|
-
<LoadingSkeleton layout="chart" />
|
|
856
|
-
) : (
|
|
857
|
-
<ActivityCharts events={recentEvents || []} />
|
|
858
|
-
)}
|
|
859
|
-
|
|
860
|
-
{transactionsLoading ? (
|
|
861
|
-
<LoadingSkeleton layout="chart" />
|
|
862
|
-
) : (
|
|
863
|
-
<RevenueCharts transactions={transactions || []} />
|
|
864
|
-
)}
|
|
865
|
-
</div>
|
|
866
|
-
|
|
867
|
-
{transactionsLoading ? (
|
|
868
|
-
<LoadingSkeleton layout="table" />
|
|
869
|
-
) : (
|
|
870
|
-
<RecentTransactions transactions={transactions || []} />
|
|
871
|
-
)}
|
|
872
|
-
</div>
|
|
873
|
-
);
|
|
874
|
-
}
|
|
875
|
-
```
|
|
876
|
-
|
|
877
|
-
**Key Changes:**
|
|
878
|
-
|
|
879
|
-
1. Replaced `useQuery` with `useThings` and `useEvents`
|
|
880
|
-
2. Added granular loading states for each data source
|
|
881
|
-
3. Added error handling with ErrorMessage component
|
|
882
|
-
4. Added memoization for expensive calculations
|
|
883
|
-
5. Added responsive grid layout
|
|
884
|
-
6. Added proper loading skeletons
|
|
885
|
-
|
|
886
|
-
---
|
|
887
|
-
|
|
888
|
-
### Example 2: ActivityCharts Migration
|
|
889
|
-
|
|
890
|
-
**BEFORE (Receives Pre-Aggregated Data):**
|
|
891
|
-
|
|
892
|
-
```typescript
|
|
893
|
-
// frontend/src/components/dashboard/ActivityCharts.tsx
|
|
894
|
-
import { LineChart, Line, XAxis, YAxis, Tooltip, ResponsiveContainer } from "recharts";
|
|
895
|
-
import type { Event } from "@/convex/_generated/dataModel";
|
|
896
|
-
|
|
897
|
-
interface ActivityChartsProps {
|
|
898
|
-
events: Event[];
|
|
899
|
-
}
|
|
900
|
-
|
|
901
|
-
export function ActivityCharts({ events }: ActivityChartsProps) {
|
|
902
|
-
// Simple data transformation
|
|
903
|
-
const chartData = events.map(event => ({
|
|
904
|
-
timestamp: new Date(event.timestamp).toLocaleDateString(),
|
|
905
|
-
count: 1
|
|
906
|
-
}));
|
|
907
|
-
|
|
908
|
-
return (
|
|
909
|
-
<div className="bg-white p-6 rounded-lg shadow">
|
|
910
|
-
<h3 className="text-lg font-semibold mb-4">Recent Activity</h3>
|
|
911
|
-
<ResponsiveContainer width="100%" height={300}>
|
|
912
|
-
<LineChart data={chartData}>
|
|
913
|
-
<XAxis dataKey="timestamp" />
|
|
914
|
-
<YAxis />
|
|
915
|
-
<Tooltip />
|
|
916
|
-
<Line type="monotone" dataKey="count" stroke="#8884d8" />
|
|
917
|
-
</LineChart>
|
|
918
|
-
</ResponsiveContainer>
|
|
919
|
-
</div>
|
|
920
|
-
);
|
|
921
|
-
}
|
|
922
|
-
```
|
|
923
|
-
|
|
924
|
-
**AFTER (With Client-Side Aggregation and Optimization):**
|
|
925
|
-
|
|
926
|
-
```typescript
|
|
927
|
-
// frontend/src/components/dashboard/ActivityCharts.tsx
|
|
928
|
-
import { useMemo } from "react";
|
|
929
|
-
import { LineChart, Line, XAxis, YAxis, Tooltip, ResponsiveContainer } from "recharts";
|
|
930
|
-
import type { Event } from "@/types/ontology";
|
|
931
|
-
|
|
932
|
-
interface ActivityChartsProps {
|
|
933
|
-
events: Event[];
|
|
934
|
-
}
|
|
935
|
-
|
|
936
|
-
export function ActivityCharts({ events }: ActivityChartsProps) {
|
|
937
|
-
// Memoized data aggregation
|
|
938
|
-
const chartData = useMemo(() => {
|
|
939
|
-
// Group events by day
|
|
940
|
-
const eventsByDay = events.reduce((acc, event) => {
|
|
941
|
-
const day = new Date(event.timestamp).toLocaleDateString();
|
|
942
|
-
acc[day] = (acc[day] || 0) + 1;
|
|
943
|
-
return acc;
|
|
944
|
-
}, {} as Record<string, number>);
|
|
945
|
-
|
|
946
|
-
// Convert to array sorted by date
|
|
947
|
-
return Object.entries(eventsByDay)
|
|
948
|
-
.map(([date, count]) => ({
|
|
949
|
-
date,
|
|
950
|
-
count,
|
|
951
|
-
timestamp: new Date(date).getTime()
|
|
952
|
-
}))
|
|
953
|
-
.sort((a, b) => a.timestamp - b.timestamp)
|
|
954
|
-
.map(({ date, count }) => ({ date, count }));
|
|
955
|
-
}, [events]);
|
|
956
|
-
|
|
957
|
-
// Event type breakdown
|
|
958
|
-
const eventTypeData = useMemo(() => {
|
|
959
|
-
const typeCount = events.reduce((acc, event) => {
|
|
960
|
-
acc[event.type] = (acc[event.type] || 0) + 1;
|
|
961
|
-
return acc;
|
|
962
|
-
}, {} as Record<string, number>);
|
|
963
|
-
|
|
964
|
-
return Object.entries(typeCount)
|
|
965
|
-
.map(([type, count]) => ({ type, count }))
|
|
966
|
-
.sort((a, b) => b.count - a.count)
|
|
967
|
-
.slice(0, 5); // Top 5 event types
|
|
968
|
-
}, [events]);
|
|
969
|
-
|
|
970
|
-
return (
|
|
971
|
-
<div className="bg-white dark:bg-gray-800 p-6 rounded-lg shadow">
|
|
972
|
-
<h3 className="text-lg font-semibold mb-4">Recent Activity</h3>
|
|
973
|
-
|
|
974
|
-
{/* Timeline Chart */}
|
|
975
|
-
<div className="mb-6">
|
|
976
|
-
<h4 className="text-sm font-medium text-gray-600 dark:text-gray-400 mb-2">
|
|
977
|
-
Activity Over Time
|
|
978
|
-
</h4>
|
|
979
|
-
<ResponsiveContainer width="100%" height={250}>
|
|
980
|
-
<LineChart data={chartData}>
|
|
981
|
-
<XAxis
|
|
982
|
-
dataKey="date"
|
|
983
|
-
tick={{ fontSize: 12 }}
|
|
984
|
-
tickFormatter={(value) => new Date(value).toLocaleDateString(undefined, { month: 'short', day: 'numeric' })}
|
|
985
|
-
/>
|
|
986
|
-
<YAxis tick={{ fontSize: 12 }} />
|
|
987
|
-
<Tooltip
|
|
988
|
-
contentStyle={{
|
|
989
|
-
backgroundColor: 'hsl(var(--color-background))',
|
|
990
|
-
border: '1px solid hsl(var(--color-border))',
|
|
991
|
-
borderRadius: '8px'
|
|
992
|
-
}}
|
|
993
|
-
/>
|
|
994
|
-
<Line
|
|
995
|
-
type="monotone"
|
|
996
|
-
dataKey="count"
|
|
997
|
-
stroke="hsl(var(--color-primary))"
|
|
998
|
-
strokeWidth={2}
|
|
999
|
-
dot={{ r: 4 }}
|
|
1000
|
-
activeDot={{ r: 6 }}
|
|
1001
|
-
/>
|
|
1002
|
-
</LineChart>
|
|
1003
|
-
</ResponsiveContainer>
|
|
1004
|
-
</div>
|
|
1005
|
-
|
|
1006
|
-
{/* Event Type Breakdown */}
|
|
1007
|
-
<div>
|
|
1008
|
-
<h4 className="text-sm font-medium text-gray-600 dark:text-gray-400 mb-2">
|
|
1009
|
-
Top Event Types
|
|
1010
|
-
</h4>
|
|
1011
|
-
<div className="space-y-2">
|
|
1012
|
-
{eventTypeData.map(({ type, count }) => (
|
|
1013
|
-
<div key={type} className="flex justify-between items-center">
|
|
1014
|
-
<span className="text-sm">{type.replace(/_/g, ' ')}</span>
|
|
1015
|
-
<span className="text-sm font-semibold">{count}</span>
|
|
1016
|
-
</div>
|
|
1017
|
-
))}
|
|
1018
|
-
</div>
|
|
1019
|
-
</div>
|
|
1020
|
-
</div>
|
|
1021
|
-
);
|
|
1022
|
-
}
|
|
1023
|
-
```
|
|
1024
|
-
|
|
1025
|
-
**Key Changes:**
|
|
1026
|
-
|
|
1027
|
-
1. Added memoization for expensive aggregation operations
|
|
1028
|
-
2. Added event type breakdown visualization
|
|
1029
|
-
3. Improved chart styling with theme colors
|
|
1030
|
-
4. Added dark mode support
|
|
1031
|
-
5. Improved date formatting
|
|
1032
|
-
6. Removed dependency on Convex types
|
|
1033
|
-
|
|
1034
|
-
---
|
|
1035
|
-
|
|
1036
|
-
### Example 3: RevenueCharts Migration
|
|
1037
|
-
|
|
1038
|
-
**BEFORE:**
|
|
1039
|
-
|
|
1040
|
-
```typescript
|
|
1041
|
-
// frontend/src/components/dashboard/RevenueCharts.tsx
|
|
1042
|
-
import { BarChart, Bar, XAxis, YAxis, Tooltip, ResponsiveContainer } from "recharts";
|
|
1043
|
-
import type { Event } from "@/convex/_generated/dataModel";
|
|
1044
|
-
|
|
1045
|
-
interface RevenueChartsProps {
|
|
1046
|
-
transactions: Event[];
|
|
1047
|
-
}
|
|
1048
|
-
|
|
1049
|
-
export function RevenueCharts({ transactions }: RevenueChartsProps) {
|
|
1050
|
-
const revenueData = transactions.map(tx => ({
|
|
1051
|
-
date: new Date(tx.timestamp).toLocaleDateString(),
|
|
1052
|
-
revenue: tx.metadata.amount || 0
|
|
1053
|
-
}));
|
|
1054
|
-
|
|
1055
|
-
return (
|
|
1056
|
-
<div className="bg-white p-6 rounded-lg shadow">
|
|
1057
|
-
<h3 className="text-lg font-semibold mb-4">Revenue</h3>
|
|
1058
|
-
<ResponsiveContainer width="100%" height={300}>
|
|
1059
|
-
<BarChart data={revenueData}>
|
|
1060
|
-
<XAxis dataKey="date" />
|
|
1061
|
-
<YAxis />
|
|
1062
|
-
<Tooltip />
|
|
1063
|
-
<Bar dataKey="revenue" fill="#82ca9d" />
|
|
1064
|
-
</BarChart>
|
|
1065
|
-
</ResponsiveContainer>
|
|
1066
|
-
</div>
|
|
1067
|
-
);
|
|
1068
|
-
}
|
|
1069
|
-
```
|
|
1070
|
-
|
|
1071
|
-
**AFTER:**
|
|
1072
|
-
|
|
1073
|
-
```typescript
|
|
1074
|
-
// frontend/src/components/dashboard/RevenueCharts.tsx
|
|
1075
|
-
import { useMemo, useState } from "react";
|
|
1076
|
-
import { BarChart, Bar, XAxis, YAxis, Tooltip, ResponsiveContainer, Cell } from "recharts";
|
|
1077
|
-
import type { Event } from "@/types/ontology";
|
|
1078
|
-
|
|
1079
|
-
interface RevenueChartsProps {
|
|
1080
|
-
transactions: Event[];
|
|
1081
|
-
}
|
|
1082
|
-
|
|
1083
|
-
type TimeRange = "day" | "week" | "month";
|
|
1084
|
-
|
|
1085
|
-
export function RevenueCharts({ transactions }: RevenueChartsProps) {
|
|
1086
|
-
const [timeRange, setTimeRange] = useState<TimeRange>("week");
|
|
1087
|
-
|
|
1088
|
-
// Memoized revenue aggregation by time range
|
|
1089
|
-
const revenueData = useMemo(() => {
|
|
1090
|
-
// Group by time range
|
|
1091
|
-
const revenueByPeriod = transactions.reduce((acc, tx) => {
|
|
1092
|
-
const date = new Date(tx.timestamp);
|
|
1093
|
-
let key: string;
|
|
1094
|
-
|
|
1095
|
-
switch (timeRange) {
|
|
1096
|
-
case "day":
|
|
1097
|
-
key = date.toLocaleDateString();
|
|
1098
|
-
break;
|
|
1099
|
-
case "week":
|
|
1100
|
-
const weekStart = new Date(date);
|
|
1101
|
-
weekStart.setDate(date.getDate() - date.getDay());
|
|
1102
|
-
key = weekStart.toLocaleDateString();
|
|
1103
|
-
break;
|
|
1104
|
-
case "month":
|
|
1105
|
-
key = `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}`;
|
|
1106
|
-
break;
|
|
1107
|
-
}
|
|
1108
|
-
|
|
1109
|
-
const amount = tx.metadata?.amount || 0;
|
|
1110
|
-
acc[key] = (acc[key] || 0) + amount;
|
|
1111
|
-
return acc;
|
|
1112
|
-
}, {} as Record<string, number>);
|
|
1113
|
-
|
|
1114
|
-
// Convert to array and sort
|
|
1115
|
-
return Object.entries(revenueByPeriod)
|
|
1116
|
-
.map(([period, revenue]) => ({ period, revenue }))
|
|
1117
|
-
.sort((a, b) => new Date(a.period).getTime() - new Date(b.period).getTime());
|
|
1118
|
-
}, [transactions, timeRange]);
|
|
1119
|
-
|
|
1120
|
-
// Calculate summary metrics
|
|
1121
|
-
const metrics = useMemo(() => {
|
|
1122
|
-
const total = revenueData.reduce((sum, item) => sum + item.revenue, 0);
|
|
1123
|
-
const average = total / (revenueData.length || 1);
|
|
1124
|
-
const max = Math.max(...revenueData.map(item => item.revenue));
|
|
1125
|
-
|
|
1126
|
-
return { total, average, max };
|
|
1127
|
-
}, [revenueData]);
|
|
1128
|
-
|
|
1129
|
-
return (
|
|
1130
|
-
<div className="bg-white dark:bg-gray-800 p-6 rounded-lg shadow">
|
|
1131
|
-
<div className="flex justify-between items-center mb-4">
|
|
1132
|
-
<h3 className="text-lg font-semibold">Revenue</h3>
|
|
1133
|
-
|
|
1134
|
-
{/* Time Range Selector */}
|
|
1135
|
-
<div className="flex gap-2">
|
|
1136
|
-
{(["day", "week", "month"] as TimeRange[]).map(range => (
|
|
1137
|
-
<button
|
|
1138
|
-
key={range}
|
|
1139
|
-
onClick={() => setTimeRange(range)}
|
|
1140
|
-
className={`px-3 py-1 rounded text-sm ${
|
|
1141
|
-
timeRange === range
|
|
1142
|
-
? "bg-blue-600 text-white"
|
|
1143
|
-
: "bg-gray-200 text-gray-700 hover:bg-gray-300"
|
|
1144
|
-
}`}
|
|
1145
|
-
>
|
|
1146
|
-
{range.charAt(0).toUpperCase() + range.slice(1)}
|
|
1147
|
-
</button>
|
|
1148
|
-
))}
|
|
1149
|
-
</div>
|
|
1150
|
-
</div>
|
|
1151
|
-
|
|
1152
|
-
{/* Summary Metrics */}
|
|
1153
|
-
<div className="grid grid-cols-3 gap-4 mb-6">
|
|
1154
|
-
<div className="text-center">
|
|
1155
|
-
<div className="text-2xl font-bold text-green-600">
|
|
1156
|
-
${metrics.total.toLocaleString()}
|
|
1157
|
-
</div>
|
|
1158
|
-
<div className="text-xs text-gray-600 dark:text-gray-400">Total Revenue</div>
|
|
1159
|
-
</div>
|
|
1160
|
-
<div className="text-center">
|
|
1161
|
-
<div className="text-2xl font-bold text-blue-600">
|
|
1162
|
-
${metrics.average.toLocaleString()}
|
|
1163
|
-
</div>
|
|
1164
|
-
<div className="text-xs text-gray-600 dark:text-gray-400">Average</div>
|
|
1165
|
-
</div>
|
|
1166
|
-
<div className="text-center">
|
|
1167
|
-
<div className="text-2xl font-bold text-purple-600">
|
|
1168
|
-
${metrics.max.toLocaleString()}
|
|
1169
|
-
</div>
|
|
1170
|
-
<div className="text-xs text-gray-600 dark:text-gray-400">Peak</div>
|
|
1171
|
-
</div>
|
|
1172
|
-
</div>
|
|
1173
|
-
|
|
1174
|
-
{/* Chart */}
|
|
1175
|
-
<ResponsiveContainer width="100%" height={250}>
|
|
1176
|
-
<BarChart data={revenueData}>
|
|
1177
|
-
<XAxis
|
|
1178
|
-
dataKey="period"
|
|
1179
|
-
tick={{ fontSize: 12 }}
|
|
1180
|
-
tickFormatter={(value) => {
|
|
1181
|
-
const date = new Date(value);
|
|
1182
|
-
return timeRange === "month"
|
|
1183
|
-
? date.toLocaleDateString(undefined, { month: 'short', year: 'numeric' })
|
|
1184
|
-
: date.toLocaleDateString(undefined, { month: 'short', day: 'numeric' });
|
|
1185
|
-
}}
|
|
1186
|
-
/>
|
|
1187
|
-
<YAxis
|
|
1188
|
-
tick={{ fontSize: 12 }}
|
|
1189
|
-
tickFormatter={(value) => `$${value.toLocaleString()}`}
|
|
1190
|
-
/>
|
|
1191
|
-
<Tooltip
|
|
1192
|
-
formatter={(value: number) => [`$${value.toLocaleString()}`, "Revenue"]}
|
|
1193
|
-
contentStyle={{
|
|
1194
|
-
backgroundColor: 'hsl(var(--color-background))',
|
|
1195
|
-
border: '1px solid hsl(var(--color-border))',
|
|
1196
|
-
borderRadius: '8px'
|
|
1197
|
-
}}
|
|
1198
|
-
/>
|
|
1199
|
-
<Bar dataKey="revenue" radius={[8, 8, 0, 0]}>
|
|
1200
|
-
{revenueData.map((entry, index) => (
|
|
1201
|
-
<Cell
|
|
1202
|
-
key={`cell-${index}`}
|
|
1203
|
-
fill={`hsl(${120 + (entry.revenue / metrics.max) * 60}, 70%, 50%)`}
|
|
1204
|
-
/>
|
|
1205
|
-
))}
|
|
1206
|
-
</Bar>
|
|
1207
|
-
</BarChart>
|
|
1208
|
-
</ResponsiveContainer>
|
|
1209
|
-
</div>
|
|
1210
|
-
);
|
|
1211
|
-
}
|
|
1212
|
-
```
|
|
1213
|
-
|
|
1214
|
-
**Key Changes:**
|
|
1215
|
-
|
|
1216
|
-
1. Added time range selector (day/week/month)
|
|
1217
|
-
2. Added summary metrics (total, average, peak)
|
|
1218
|
-
3. Added dynamic bar coloring based on revenue amount
|
|
1219
|
-
4. Added memoization for aggregation
|
|
1220
|
-
5. Improved date formatting based on time range
|
|
1221
|
-
6. Added dark mode support
|
|
1222
|
-
|
|
1223
|
-
---
|
|
1224
|
-
|
|
1225
|
-
### Example 4: RecentTransactions Migration
|
|
1226
|
-
|
|
1227
|
-
**BEFORE:**
|
|
1228
|
-
|
|
1229
|
-
```typescript
|
|
1230
|
-
// frontend/src/components/dashboard/RecentTransactions.tsx
|
|
1231
|
-
import type { Event } from "@/convex/_generated/dataModel";
|
|
1232
|
-
|
|
1233
|
-
interface RecentTransactionsProps {
|
|
1234
|
-
transactions: Event[];
|
|
1235
|
-
}
|
|
1236
|
-
|
|
1237
|
-
export function RecentTransactions({ transactions }: RecentTransactionsProps) {
|
|
1238
|
-
return (
|
|
1239
|
-
<div className="bg-white p-6 rounded-lg shadow">
|
|
1240
|
-
<h3 className="text-lg font-semibold mb-4">Recent Transactions</h3>
|
|
1241
|
-
<table className="w-full">
|
|
1242
|
-
<thead>
|
|
1243
|
-
<tr>
|
|
1244
|
-
<th>Date</th>
|
|
1245
|
-
<th>Amount</th>
|
|
1246
|
-
<th>Type</th>
|
|
1247
|
-
</tr>
|
|
1248
|
-
</thead>
|
|
1249
|
-
<tbody>
|
|
1250
|
-
{transactions.map(tx => (
|
|
1251
|
-
<tr key={tx._id}>
|
|
1252
|
-
<td>{new Date(tx.timestamp).toLocaleDateString()}</td>
|
|
1253
|
-
<td>${tx.metadata.amount}</td>
|
|
1254
|
-
<td>{tx.type}</td>
|
|
1255
|
-
</tr>
|
|
1256
|
-
))}
|
|
1257
|
-
</tbody>
|
|
1258
|
-
</table>
|
|
1259
|
-
</div>
|
|
1260
|
-
);
|
|
1261
|
-
}
|
|
1262
|
-
```
|
|
1263
|
-
|
|
1264
|
-
**AFTER:**
|
|
1265
|
-
|
|
1266
|
-
```typescript
|
|
1267
|
-
// frontend/src/components/dashboard/RecentTransactions.tsx
|
|
1268
|
-
import { useMemo } from "react";
|
|
1269
|
-
import { useThing } from "@/providers/hooks";
|
|
1270
|
-
import type { Event } from "@/types/ontology";
|
|
1271
|
-
import type { Id } from "@/types/convex";
|
|
1272
|
-
|
|
1273
|
-
interface RecentTransactionsProps {
|
|
1274
|
-
transactions: Event[];
|
|
1275
|
-
}
|
|
1276
|
-
|
|
1277
|
-
function TransactionRow({ transaction }: { transaction: Event }) {
|
|
1278
|
-
// Fetch actor and target entities for display
|
|
1279
|
-
const { data: actor } = useThing({ id: transaction.actorId as Id<"things"> });
|
|
1280
|
-
const { data: target } = useThing({ id: transaction.targetId as Id<"things"> });
|
|
1281
|
-
|
|
1282
|
-
const amount = transaction.metadata?.amount || 0;
|
|
1283
|
-
const transactionType = transaction.type.replace(/_/g, ' ');
|
|
1284
|
-
|
|
1285
|
-
return (
|
|
1286
|
-
<tr className="border-b border-gray-200 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-800">
|
|
1287
|
-
<td className="py-3 px-4">
|
|
1288
|
-
<div className="text-sm font-medium">
|
|
1289
|
-
{new Date(transaction.timestamp).toLocaleDateString(undefined, {
|
|
1290
|
-
month: 'short',
|
|
1291
|
-
day: 'numeric',
|
|
1292
|
-
year: 'numeric'
|
|
1293
|
-
})}
|
|
1294
|
-
</div>
|
|
1295
|
-
<div className="text-xs text-gray-500">
|
|
1296
|
-
{new Date(transaction.timestamp).toLocaleTimeString(undefined, {
|
|
1297
|
-
hour: '2-digit',
|
|
1298
|
-
minute: '2-digit'
|
|
1299
|
-
})}
|
|
1300
|
-
</div>
|
|
1301
|
-
</td>
|
|
1302
|
-
<td className="py-3 px-4">
|
|
1303
|
-
<div className="text-sm font-semibold text-green-600">${amount.toLocaleString()}</div>
|
|
1304
|
-
</td>
|
|
1305
|
-
<td className="py-3 px-4">
|
|
1306
|
-
<div className="text-sm">{transactionType}</div>
|
|
1307
|
-
</td>
|
|
1308
|
-
<td className="py-3 px-4">
|
|
1309
|
-
<div className="text-sm text-gray-600 dark:text-gray-400">
|
|
1310
|
-
{actor?.name || "Unknown"}
|
|
1311
|
-
</div>
|
|
1312
|
-
</td>
|
|
1313
|
-
<td className="py-3 px-4">
|
|
1314
|
-
<div className="text-sm text-gray-600 dark:text-gray-400">
|
|
1315
|
-
{target?.name || "Unknown"}
|
|
1316
|
-
</div>
|
|
1317
|
-
</td>
|
|
1318
|
-
<td className="py-3 px-4">
|
|
1319
|
-
<span className={`px-2 py-1 rounded-full text-xs font-medium ${
|
|
1320
|
-
transaction.metadata?.status === "completed"
|
|
1321
|
-
? "bg-green-100 text-green-800"
|
|
1322
|
-
: transaction.metadata?.status === "pending"
|
|
1323
|
-
? "bg-yellow-100 text-yellow-800"
|
|
1324
|
-
: "bg-red-100 text-red-800"
|
|
1325
|
-
}`}>
|
|
1326
|
-
{transaction.metadata?.status || "completed"}
|
|
1327
|
-
</span>
|
|
1328
|
-
</td>
|
|
1329
|
-
</tr>
|
|
1330
|
-
);
|
|
1331
|
-
}
|
|
1332
|
-
|
|
1333
|
-
export function RecentTransactions({ transactions }: RecentTransactionsProps) {
|
|
1334
|
-
// Sort by most recent
|
|
1335
|
-
const sortedTransactions = useMemo(() => {
|
|
1336
|
-
return [...transactions].sort((a, b) => b.timestamp - a.timestamp);
|
|
1337
|
-
}, [transactions]);
|
|
1338
|
-
|
|
1339
|
-
// Calculate total
|
|
1340
|
-
const totalRevenue = useMemo(() => {
|
|
1341
|
-
return transactions.reduce((sum, tx) => sum + (tx.metadata?.amount || 0), 0);
|
|
1342
|
-
}, [transactions]);
|
|
1343
|
-
|
|
1344
|
-
return (
|
|
1345
|
-
<div className="bg-white dark:bg-gray-800 p-6 rounded-lg shadow">
|
|
1346
|
-
<div className="flex justify-between items-center mb-4">
|
|
1347
|
-
<h3 className="text-lg font-semibold">Recent Transactions</h3>
|
|
1348
|
-
<div className="text-sm text-gray-600 dark:text-gray-400">
|
|
1349
|
-
Total: <span className="font-semibold text-green-600">${totalRevenue.toLocaleString()}</span>
|
|
1350
|
-
</div>
|
|
1351
|
-
</div>
|
|
1352
|
-
|
|
1353
|
-
{sortedTransactions.length === 0 ? (
|
|
1354
|
-
<div className="text-center py-8 text-gray-500">
|
|
1355
|
-
No transactions yet
|
|
1356
|
-
</div>
|
|
1357
|
-
) : (
|
|
1358
|
-
<div className="overflow-x-auto">
|
|
1359
|
-
<table className="w-full">
|
|
1360
|
-
<thead>
|
|
1361
|
-
<tr className="border-b border-gray-300 dark:border-gray-600">
|
|
1362
|
-
<th className="py-2 px-4 text-left text-xs font-semibold text-gray-600 dark:text-gray-400 uppercase tracking-wider">
|
|
1363
|
-
Date
|
|
1364
|
-
</th>
|
|
1365
|
-
<th className="py-2 px-4 text-left text-xs font-semibold text-gray-600 dark:text-gray-400 uppercase tracking-wider">
|
|
1366
|
-
Amount
|
|
1367
|
-
</th>
|
|
1368
|
-
<th className="py-2 px-4 text-left text-xs font-semibold text-gray-600 dark:text-gray-400 uppercase tracking-wider">
|
|
1369
|
-
Type
|
|
1370
|
-
</th>
|
|
1371
|
-
<th className="py-2 px-4 text-left text-xs font-semibold text-gray-600 dark:text-gray-400 uppercase tracking-wider">
|
|
1372
|
-
From
|
|
1373
|
-
</th>
|
|
1374
|
-
<th className="py-2 px-4 text-left text-xs font-semibold text-gray-600 dark:text-gray-400 uppercase tracking-wider">
|
|
1375
|
-
To
|
|
1376
|
-
</th>
|
|
1377
|
-
<th className="py-2 px-4 text-left text-xs font-semibold text-gray-600 dark:text-gray-400 uppercase tracking-wider">
|
|
1378
|
-
Status
|
|
1379
|
-
</th>
|
|
1380
|
-
</tr>
|
|
1381
|
-
</thead>
|
|
1382
|
-
<tbody>
|
|
1383
|
-
{sortedTransactions.map(transaction => (
|
|
1384
|
-
<TransactionRow key={transaction._id} transaction={transaction} />
|
|
1385
|
-
))}
|
|
1386
|
-
</tbody>
|
|
1387
|
-
</table>
|
|
1388
|
-
</div>
|
|
1389
|
-
)}
|
|
1390
|
-
</div>
|
|
1391
|
-
);
|
|
1392
|
-
}
|
|
1393
|
-
```
|
|
1394
|
-
|
|
1395
|
-
**Key Changes:**
|
|
1396
|
-
|
|
1397
|
-
1. Added TransactionRow component with entity lookups
|
|
1398
|
-
2. Added sorting by timestamp
|
|
1399
|
-
3. Added total revenue calculation
|
|
1400
|
-
4. Added status badges with colors
|
|
1401
|
-
5. Added empty state
|
|
1402
|
-
6. Improved table styling with dark mode
|
|
1403
|
-
7. Added actor and target entity display
|
|
1404
|
-
|
|
1405
|
-
---
|
|
1406
|
-
|
|
1407
|
-
### Example 5: QuickActions Component
|
|
1408
|
-
|
|
1409
|
-
**NEW Component (Not in Original Spec):**
|
|
1410
|
-
|
|
1411
|
-
```typescript
|
|
1412
|
-
// frontend/src/components/dashboard/QuickActions.tsx
|
|
1413
|
-
import { useState } from "react";
|
|
1414
|
-
import { useCreateThing, useCreateConnection } from "@/providers/hooks";
|
|
1415
|
-
import { useAuth } from "@/providers/auth";
|
|
1416
|
-
import { PlusIcon, UserPlusIcon, FileTextIcon, BotIcon } from "lucide-react";
|
|
1417
|
-
import { toast } from "sonner";
|
|
1418
|
-
import type { ThingType } from "@/types/ontology";
|
|
1419
|
-
|
|
1420
|
-
export function QuickActions() {
|
|
1421
|
-
const { user } = useAuth();
|
|
1422
|
-
const [creating, setCreating] = useState(false);
|
|
1423
|
-
const createThing = useCreateThing();
|
|
1424
|
-
const createConnection = useCreateConnection();
|
|
1425
|
-
|
|
1426
|
-
const handleCreateEntity = async (type: ThingType, name: string) => {
|
|
1427
|
-
setCreating(true);
|
|
1428
|
-
try {
|
|
1429
|
-
const entityId = await createThing({
|
|
1430
|
-
type,
|
|
1431
|
-
name,
|
|
1432
|
-
properties: {},
|
|
1433
|
-
status: "draft"
|
|
1434
|
-
});
|
|
1435
|
-
|
|
1436
|
-
// Create ownership connection
|
|
1437
|
-
if (user) {
|
|
1438
|
-
await createConnection({
|
|
1439
|
-
fromThingId: user.id,
|
|
1440
|
-
toThingId: entityId,
|
|
1441
|
-
relationshipType: "owns",
|
|
1442
|
-
metadata: { createdVia: "quick_action" }
|
|
1443
|
-
});
|
|
1444
|
-
}
|
|
1445
|
-
|
|
1446
|
-
toast.success(`${name} created successfully!`);
|
|
1447
|
-
} catch (error) {
|
|
1448
|
-
toast.error(`Failed to create ${name}`);
|
|
1449
|
-
console.error(error);
|
|
1450
|
-
} finally {
|
|
1451
|
-
setCreating(false);
|
|
1452
|
-
}
|
|
1453
|
-
};
|
|
1454
|
-
|
|
1455
|
-
const actions = [
|
|
1456
|
-
{
|
|
1457
|
-
icon: FileTextIcon,
|
|
1458
|
-
label: "New Course",
|
|
1459
|
-
color: "blue",
|
|
1460
|
-
onClick: () => handleCreateEntity("course", "New Course")
|
|
1461
|
-
},
|
|
1462
|
-
{
|
|
1463
|
-
icon: BotIcon,
|
|
1464
|
-
label: "New AI Agent",
|
|
1465
|
-
color: "purple",
|
|
1466
|
-
onClick: () => handleCreateEntity("ai_clone", "New Agent")
|
|
1467
|
-
},
|
|
1468
|
-
{
|
|
1469
|
-
icon: UserPlusIcon,
|
|
1470
|
-
label: "Invite Student",
|
|
1471
|
-
color: "green",
|
|
1472
|
-
onClick: () => {
|
|
1473
|
-
// Open invite modal
|
|
1474
|
-
toast.info("Opening invite dialog...");
|
|
1475
|
-
}
|
|
1476
|
-
}
|
|
1477
|
-
];
|
|
1478
|
-
|
|
1479
|
-
return (
|
|
1480
|
-
<div className="bg-white dark:bg-gray-800 p-6 rounded-lg shadow">
|
|
1481
|
-
<h3 className="text-lg font-semibold mb-4">Quick Actions</h3>
|
|
1482
|
-
<div className="grid grid-cols-1 sm:grid-cols-3 gap-4">
|
|
1483
|
-
{actions.map(action => {
|
|
1484
|
-
const Icon = action.icon;
|
|
1485
|
-
return (
|
|
1486
|
-
<button
|
|
1487
|
-
key={action.label}
|
|
1488
|
-
onClick={action.onClick}
|
|
1489
|
-
disabled={creating}
|
|
1490
|
-
className={`flex items-center gap-3 p-4 rounded-lg border-2 border-${action.color}-200 hover:border-${action.color}-400 hover:bg-${action.color}-50 dark:hover:bg-${action.color}-900 transition-colors disabled:opacity-50 disabled:cursor-not-allowed`}
|
|
1491
|
-
>
|
|
1492
|
-
<Icon className={`w-6 h-6 text-${action.color}-600`} />
|
|
1493
|
-
<span className="font-medium">{action.label}</span>
|
|
1494
|
-
</button>
|
|
1495
|
-
);
|
|
1496
|
-
})}
|
|
1497
|
-
</div>
|
|
1498
|
-
</div>
|
|
1499
|
-
);
|
|
1500
|
-
}
|
|
1501
|
-
```
|
|
1502
|
-
|
|
1503
|
-
---
|
|
1504
|
-
|
|
1505
|
-
## 6. Testing Strategy
|
|
1506
|
-
|
|
1507
|
-
### Unit Tests
|
|
1508
|
-
|
|
1509
|
-
**Test each component independently with mocked DataProvider hooks:**
|
|
1510
|
-
|
|
1511
|
-
```typescript
|
|
1512
|
-
// frontend/test/components/dashboard/CourseList.test.tsx
|
|
1513
|
-
import { describe, it, expect, vi } from "vitest";
|
|
1514
|
-
import { render, screen } from "@testing-library/react";
|
|
1515
|
-
import { CourseList } from "@/components/dashboard/CourseList";
|
|
1516
|
-
import * as hooks from "@/providers/hooks";
|
|
1517
|
-
|
|
1518
|
-
describe("CourseList", () => {
|
|
1519
|
-
it("displays loading state", () => {
|
|
1520
|
-
vi.spyOn(hooks, "useThings").mockReturnValue({
|
|
1521
|
-
data: undefined,
|
|
1522
|
-
loading: true,
|
|
1523
|
-
error: null
|
|
1524
|
-
});
|
|
1525
|
-
|
|
1526
|
-
render(<CourseList />);
|
|
1527
|
-
expect(screen.getByText(/loading/i)).toBeInTheDocument();
|
|
1528
|
-
});
|
|
1529
|
-
|
|
1530
|
-
it("displays courses when loaded", () => {
|
|
1531
|
-
vi.spyOn(hooks, "useThings").mockReturnValue({
|
|
1532
|
-
data: [
|
|
1533
|
-
{ _id: "1", type: "course", name: "Course 1", properties: {}, status: "published" },
|
|
1534
|
-
{ _id: "2", type: "course", name: "Course 2", properties: {}, status: "published" }
|
|
1535
|
-
],
|
|
1536
|
-
loading: false,
|
|
1537
|
-
error: null
|
|
1538
|
-
});
|
|
1539
|
-
|
|
1540
|
-
render(<CourseList />);
|
|
1541
|
-
expect(screen.getByText("Course 1")).toBeInTheDocument();
|
|
1542
|
-
expect(screen.getByText("Course 2")).toBeInTheDocument();
|
|
1543
|
-
});
|
|
1544
|
-
|
|
1545
|
-
it("displays error state", () => {
|
|
1546
|
-
vi.spyOn(hooks, "useThings").mockReturnValue({
|
|
1547
|
-
data: undefined,
|
|
1548
|
-
loading: false,
|
|
1549
|
-
error: new Error("Failed to load courses")
|
|
1550
|
-
});
|
|
1551
|
-
|
|
1552
|
-
render(<CourseList />);
|
|
1553
|
-
expect(screen.getByText(/failed to load/i)).toBeInTheDocument();
|
|
1554
|
-
});
|
|
1555
|
-
});
|
|
1556
|
-
```
|
|
1557
|
-
|
|
1558
|
-
### Integration Tests
|
|
1559
|
-
|
|
1560
|
-
**Test dashboard with full DataProvider context:**
|
|
1561
|
-
|
|
1562
|
-
```typescript
|
|
1563
|
-
// frontend/test/integration/dashboard.test.tsx
|
|
1564
|
-
import { describe, it, expect } from "vitest";
|
|
1565
|
-
import { render, screen, waitFor } from "@testing-library/react";
|
|
1566
|
-
import { DataProvider } from "@/providers/data-provider";
|
|
1567
|
-
import { DashboardOverview } from "@/components/dashboard/DashboardOverview";
|
|
1568
|
-
|
|
1569
|
-
describe("Dashboard Integration", () => {
|
|
1570
|
-
it("loads dashboard with all data", async () => {
|
|
1571
|
-
render(
|
|
1572
|
-
<DataProvider>
|
|
1573
|
-
<DashboardOverview />
|
|
1574
|
-
</DataProvider>
|
|
1575
|
-
);
|
|
1576
|
-
|
|
1577
|
-
// Wait for loading to complete
|
|
1578
|
-
await waitFor(() => {
|
|
1579
|
-
expect(screen.queryByText(/loading/i)).not.toBeInTheDocument();
|
|
1580
|
-
});
|
|
1581
|
-
|
|
1582
|
-
// Verify all sections render
|
|
1583
|
-
expect(screen.getByText(/total courses/i)).toBeInTheDocument();
|
|
1584
|
-
expect(screen.getByText(/total students/i)).toBeInTheDocument();
|
|
1585
|
-
expect(screen.getByText(/recent activity/i)).toBeInTheDocument();
|
|
1586
|
-
expect(screen.getByText(/revenue/i)).toBeInTheDocument();
|
|
1587
|
-
});
|
|
1588
|
-
});
|
|
1589
|
-
```
|
|
1590
|
-
|
|
1591
|
-
### Visual Regression Tests
|
|
1592
|
-
|
|
1593
|
-
**Capture screenshots and compare:**
|
|
1594
|
-
|
|
1595
|
-
```typescript
|
|
1596
|
-
// frontend/test/visual/dashboard.visual.test.tsx
|
|
1597
|
-
import { test, expect } from "@playwright/test";
|
|
1598
|
-
|
|
1599
|
-
test("dashboard matches baseline", async ({ page }) => {
|
|
1600
|
-
await page.goto("http://localhost:4321/dashboard");
|
|
1601
|
-
|
|
1602
|
-
// Wait for loading to complete
|
|
1603
|
-
await page.waitForSelector('[data-testid="dashboard-loaded"]');
|
|
1604
|
-
|
|
1605
|
-
// Capture screenshot
|
|
1606
|
-
await expect(page).toHaveScreenshot("dashboard-overview.png");
|
|
1607
|
-
});
|
|
1608
|
-
|
|
1609
|
-
test("dashboard dark mode matches baseline", async ({ page }) => {
|
|
1610
|
-
await page.goto("http://localhost:4321/dashboard");
|
|
1611
|
-
await page.waitForSelector('[data-testid="dashboard-loaded"]');
|
|
1612
|
-
|
|
1613
|
-
// Enable dark mode
|
|
1614
|
-
await page.click('[data-testid="theme-toggle"]');
|
|
1615
|
-
|
|
1616
|
-
// Capture screenshot
|
|
1617
|
-
await expect(page).toHaveScreenshot("dashboard-overview-dark.png");
|
|
1618
|
-
});
|
|
1619
|
-
```
|
|
1620
|
-
|
|
1621
|
-
### Performance Tests
|
|
1622
|
-
|
|
1623
|
-
**Measure and validate performance:**
|
|
1624
|
-
|
|
1625
|
-
```typescript
|
|
1626
|
-
// frontend/test/performance/dashboard.perf.test.ts
|
|
1627
|
-
import { test, expect } from "@playwright/test";
|
|
1628
|
-
|
|
1629
|
-
test("dashboard loads within performance budget", async ({ page }) => {
|
|
1630
|
-
// Start performance measurement
|
|
1631
|
-
await page.goto("http://localhost:4321/dashboard");
|
|
1632
|
-
|
|
1633
|
-
// Measure LCP (Largest Contentful Paint)
|
|
1634
|
-
const lcp = await page.evaluate(() => {
|
|
1635
|
-
return new Promise((resolve) => {
|
|
1636
|
-
new PerformanceObserver((list) => {
|
|
1637
|
-
const entries = list.getEntries();
|
|
1638
|
-
const lastEntry = entries[entries.length - 1];
|
|
1639
|
-
resolve(lastEntry.renderTime || lastEntry.loadTime);
|
|
1640
|
-
}).observe({ entryTypes: ["largest-contentful-paint"] });
|
|
1641
|
-
});
|
|
1642
|
-
});
|
|
1643
|
-
|
|
1644
|
-
// Verify LCP < 2.5s
|
|
1645
|
-
expect(lcp).toBeLessThan(2500);
|
|
1646
|
-
|
|
1647
|
-
// Measure FID (First Input Delay)
|
|
1648
|
-
const fid = await page.evaluate(() => {
|
|
1649
|
-
return new Promise((resolve) => {
|
|
1650
|
-
new PerformanceObserver((list) => {
|
|
1651
|
-
const entries = list.getEntries();
|
|
1652
|
-
resolve(entries[0].processingStart - entries[0].startTime);
|
|
1653
|
-
}).observe({ entryTypes: ["first-input"] });
|
|
1654
|
-
|
|
1655
|
-
// Trigger input
|
|
1656
|
-
document.body.click();
|
|
1657
|
-
});
|
|
1658
|
-
});
|
|
1659
|
-
|
|
1660
|
-
// Verify FID < 100ms
|
|
1661
|
-
expect(fid).toBeLessThan(100);
|
|
1662
|
-
});
|
|
1663
|
-
```
|
|
1664
|
-
|
|
1665
|
-
---
|
|
1666
|
-
|
|
1667
|
-
## 7. Quality Gates
|
|
1668
|
-
|
|
1669
|
-
### Pre-Implementation Checklist
|
|
1670
|
-
|
|
1671
|
-
- [ ] Feature 2-5 (Auth Migration) is complete
|
|
1672
|
-
- [ ] All auth tests pass
|
|
1673
|
-
- [ ] DataProvider hooks are tested and working
|
|
1674
|
-
- [ ] Performance baseline established
|
|
1675
|
-
|
|
1676
|
-
### During Implementation Checklist
|
|
1677
|
-
|
|
1678
|
-
**Component Migration:**
|
|
1679
|
-
|
|
1680
|
-
- [ ] DashboardOverview migrated to DataProvider
|
|
1681
|
-
- [ ] StatsCards migrated to DataProvider
|
|
1682
|
-
- [ ] ActivityCharts migrated to DataProvider
|
|
1683
|
-
- [ ] RevenueCharts migrated to DataProvider
|
|
1684
|
-
- [ ] RecentTransactions migrated to DataProvider
|
|
1685
|
-
- [ ] CourseList migrated to DataProvider
|
|
1686
|
-
- [ ] CourseDetail migrated to DataProvider
|
|
1687
|
-
- [ ] LessonList migrated to DataProvider
|
|
1688
|
-
- [ ] LessonDetail migrated to DataProvider
|
|
1689
|
-
- [ ] StudentList migrated to DataProvider
|
|
1690
|
-
- [ ] ActivityFeed migrated to DataProvider
|
|
1691
|
-
- [ ] SearchBar migrated to DataProvider
|
|
1692
|
-
- [ ] SettingsPanel migrated to DataProvider
|
|
1693
|
-
|
|
1694
|
-
**Code Quality:**
|
|
1695
|
-
|
|
1696
|
-
- [ ] Zero direct Convex imports in dashboard components
|
|
1697
|
-
- [ ] Zero `import { api } from "@/convex/_generated/api"` in dashboard
|
|
1698
|
-
- [ ] All components use DataProvider hooks
|
|
1699
|
-
- [ ] All loading states implemented
|
|
1700
|
-
- [ ] All error states implemented
|
|
1701
|
-
- [ ] TypeScript errors: 0
|
|
1702
|
-
- [ ] ESLint warnings: 0
|
|
1703
|
-
|
|
1704
|
-
**Testing:**
|
|
1705
|
-
|
|
1706
|
-
- [ ] Unit tests for all migrated components
|
|
1707
|
-
- [ ] Integration tests for dashboard flow
|
|
1708
|
-
- [ ] Visual regression tests pass
|
|
1709
|
-
- [ ] Performance tests within 10% of baseline
|
|
1710
|
-
- [ ] Real-time updates work correctly
|
|
1711
|
-
- [ ] Optimistic updates work correctly
|
|
1712
|
-
|
|
1713
|
-
### Post-Implementation Checklist
|
|
1714
|
-
|
|
1715
|
-
- [ ] All dashboard components migrated
|
|
1716
|
-
- [ ] Full test suite passes (100%)
|
|
1717
|
-
- [ ] Performance within 10% of baseline
|
|
1718
|
-
- [ ] Documentation updated
|
|
1719
|
-
- [ ] Migration guide written
|
|
1720
|
-
- [ ] Code review completed
|
|
1721
|
-
- [ ] QA validation passed
|
|
1722
|
-
|
|
1723
|
-
---
|
|
1724
|
-
|
|
1725
|
-
## 8. Rollback Plan
|
|
1726
|
-
|
|
1727
|
-
### Rollback Strategy
|
|
1728
|
-
|
|
1729
|
-
**Feature Flag:**
|
|
1730
|
-
|
|
1731
|
-
```typescript
|
|
1732
|
-
// frontend/src/lib/feature-flags.ts
|
|
1733
|
-
export const USE_NEW_DASHBOARD = import.meta.env.PUBLIC_USE_NEW_DASHBOARD === "true";
|
|
1734
|
-
|
|
1735
|
-
// Usage in component
|
|
1736
|
-
import { USE_NEW_DASHBOARD } from "@/lib/feature-flags";
|
|
1737
|
-
|
|
1738
|
-
export function Dashboard() {
|
|
1739
|
-
if (USE_NEW_DASHBOARD) {
|
|
1740
|
-
return <NewDashboard />;
|
|
1741
|
-
}
|
|
1742
|
-
return <LegacyDashboard />;
|
|
1743
|
-
}
|
|
1744
|
-
```
|
|
1745
|
-
|
|
1746
|
-
**Git Rollback Points:**
|
|
1747
|
-
|
|
1748
|
-
1. Tag before starting: `git tag -a dashboard-migration-start -m "Dashboard migration baseline"`
|
|
1749
|
-
2. Tag after each phase: `git tag -a dashboard-migration-phase-1 -m "Phase 1 complete"`
|
|
1750
|
-
3. Rollback command: `git reset --hard dashboard-migration-start`
|
|
1751
|
-
|
|
1752
|
-
**Incremental Rollback:**
|
|
1753
|
-
|
|
1754
|
-
- Each component can be rolled back independently
|
|
1755
|
-
- Keep old component files as `.legacy.tsx` during migration
|
|
1756
|
-
- Remove `.legacy.tsx` files only after QA validation
|
|
1757
|
-
|
|
1758
|
-
**Rollback Time: < 5 minutes**
|
|
1759
|
-
|
|
1760
|
-
Steps:
|
|
1761
|
-
|
|
1762
|
-
1. Set `PUBLIC_USE_NEW_DASHBOARD=false` in `.env.local`
|
|
1763
|
-
2. Restart dev server: `bun run dev`
|
|
1764
|
-
3. If needed, git reset: `git reset --hard dashboard-migration-start`
|
|
1765
|
-
|
|
1766
|
-
---
|
|
1767
|
-
|
|
1768
|
-
## 9. Documentation Requirements
|
|
1769
|
-
|
|
1770
|
-
### Migration Guide
|
|
1771
|
-
|
|
1772
|
-
**Document for developers:**
|
|
1773
|
-
|
|
1774
|
-
```markdown
|
|
1775
|
-
# Dashboard Migration Guide
|
|
1776
|
-
|
|
1777
|
-
## Overview
|
|
1778
|
-
|
|
1779
|
-
This guide explains how to migrate dashboard components from direct Convex integration to DataProvider.
|
|
1780
|
-
|
|
1781
|
-
## Before Migration
|
|
1782
|
-
|
|
1783
|
-
- Component uses `useQuery` from `convex/react`
|
|
1784
|
-
- Component imports `api` from `@/convex/_generated/api`
|
|
1785
|
-
- Loading state is implicit (`data === undefined`)
|
|
1786
|
-
|
|
1787
|
-
## After Migration
|
|
1788
|
-
|
|
1789
|
-
- Component uses `useThings`, `useThing`, `useEvents` from `@/providers/hooks`
|
|
1790
|
-
- Component uses backend-agnostic types from `@/types/ontology`
|
|
1791
|
-
- Loading state is explicit (`loading` boolean)
|
|
1792
|
-
|
|
1793
|
-
## Step-by-Step Migration
|
|
1794
|
-
|
|
1795
|
-
### 1. Replace Imports
|
|
1796
|
-
|
|
1797
|
-
\`\`\`typescript
|
|
1798
|
-
// BEFORE
|
|
1799
|
-
import { useQuery, useMutation } from "convex/react";
|
|
1800
|
-
import { api } from "@/convex/\_generated/api";
|
|
1801
|
-
|
|
1802
|
-
// AFTER
|
|
1803
|
-
import { useThings, useCreateThing } from "@/providers/hooks";
|
|
1804
|
-
\`\`\`
|
|
1805
|
-
|
|
1806
|
-
### 2. Replace Hooks
|
|
1807
|
-
|
|
1808
|
-
\`\`\`typescript
|
|
1809
|
-
// BEFORE
|
|
1810
|
-
const courses = useQuery(api.queries.entities.list, { type: "course" });
|
|
1811
|
-
|
|
1812
|
-
// AFTER
|
|
1813
|
-
const { data: courses, loading, error } = useThings({ type: "course" });
|
|
1814
|
-
\`\`\`
|
|
1815
|
-
|
|
1816
|
-
### 3. Update Loading State
|
|
1817
|
-
|
|
1818
|
-
\`\`\`typescript
|
|
1819
|
-
// BEFORE
|
|
1820
|
-
if (courses === undefined) return <LoadingSpinner />;
|
|
1821
|
-
|
|
1822
|
-
// AFTER
|
|
1823
|
-
if (loading) return <LoadingSpinner />;
|
|
1824
|
-
\`\`\`
|
|
1825
|
-
|
|
1826
|
-
### 4. Add Error Handling
|
|
1827
|
-
|
|
1828
|
-
\`\`\`typescript
|
|
1829
|
-
// NEW (add this)
|
|
1830
|
-
if (error) return <ErrorMessage error={error} />;
|
|
1831
|
-
\`\`\`
|
|
1832
|
-
|
|
1833
|
-
### 5. Update Tests
|
|
1834
|
-
|
|
1835
|
-
\`\`\`typescript
|
|
1836
|
-
// Mock DataProvider hooks
|
|
1837
|
-
vi.spyOn(hooks, "useThings").mockReturnValue({
|
|
1838
|
-
data: mockCourses,
|
|
1839
|
-
loading: false,
|
|
1840
|
-
error: null
|
|
1841
|
-
});
|
|
1842
|
-
\`\`\`
|
|
1843
|
-
```
|
|
1844
|
-
|
|
1845
|
-
### Component API Changes
|
|
1846
|
-
|
|
1847
|
-
**Document breaking changes:**
|
|
1848
|
-
|
|
1849
|
-
```markdown
|
|
1850
|
-
# Dashboard Component API Changes
|
|
1851
|
-
|
|
1852
|
-
## DashboardOverview
|
|
1853
|
-
|
|
1854
|
-
- **No breaking changes** - Props remain the same
|
|
1855
|
-
- Internal implementation changed to use DataProvider
|
|
1856
|
-
|
|
1857
|
-
## CourseList
|
|
1858
|
-
|
|
1859
|
-
- **No breaking changes** - Props remain the same
|
|
1860
|
-
- Now supports `error` prop for external error display
|
|
1861
|
-
|
|
1862
|
-
## ActivityFeed
|
|
1863
|
-
|
|
1864
|
-
- **New prop:** `onLoadMore` - Callback for pagination
|
|
1865
|
-
- **Changed:** Real-time updates now via DataProvider subscriptions
|
|
1866
|
-
|
|
1867
|
-
## SearchBar
|
|
1868
|
-
|
|
1869
|
-
- **New prop:** `debounceMs` - Control search debounce timing (default: 300ms)
|
|
1870
|
-
- **Changed:** Search now backend-agnostic
|
|
1871
|
-
```
|
|
1872
|
-
|
|
1873
|
-
### Performance Benchmarks
|
|
1874
|
-
|
|
1875
|
-
**Document before/after metrics:**
|
|
1876
|
-
|
|
1877
|
-
```markdown
|
|
1878
|
-
# Dashboard Performance Benchmarks
|
|
1879
|
-
|
|
1880
|
-
## Metrics (Before Migration)
|
|
1881
|
-
|
|
1882
|
-
- Initial Load: 1.8s
|
|
1883
|
-
- LCP: 2.1s
|
|
1884
|
-
- FID: 45ms
|
|
1885
|
-
- CLS: 0.05
|
|
1886
|
-
- Lighthouse Score: 92
|
|
1887
|
-
|
|
1888
|
-
## Metrics (After Migration)
|
|
1889
|
-
|
|
1890
|
-
- Initial Load: 1.9s (+5.5%)
|
|
1891
|
-
- LCP: 2.2s (+4.8%)
|
|
1892
|
-
- FID: 48ms (+6.7%)
|
|
1893
|
-
- CLS: 0.05 (0%)
|
|
1894
|
-
- Lighthouse Score: 91 (-1 point)
|
|
1895
|
-
|
|
1896
|
-
## Analysis
|
|
1897
|
-
|
|
1898
|
-
- Minimal performance impact (<10% for all metrics)
|
|
1899
|
-
- Additional abstraction layer adds negligible overhead
|
|
1900
|
-
- Real-time updates remain performant
|
|
1901
|
-
- No degradation in user experience
|
|
1902
|
-
```
|
|
1903
|
-
|
|
1904
|
-
### Known Issues
|
|
1905
|
-
|
|
1906
|
-
```markdown
|
|
1907
|
-
# Dashboard Migration Known Issues
|
|
1908
|
-
|
|
1909
|
-
## Issue 1: Chart Animation Delay
|
|
1910
|
-
|
|
1911
|
-
**Severity:** Low
|
|
1912
|
-
**Description:** Charts have 100ms animation delay on initial render
|
|
1913
|
-
**Workaround:** Set `animationDuration={0}` in chart props
|
|
1914
|
-
**Fix Timeline:** Will be addressed in next optimization phase
|
|
1915
|
-
|
|
1916
|
-
## Issue 2: Search Debounce Configuration
|
|
1917
|
-
|
|
1918
|
-
**Severity:** Low
|
|
1919
|
-
**Description:** Search debounce timing not configurable per-component
|
|
1920
|
-
**Workaround:** Modify global `SEARCH_DEBOUNCE_MS` constant
|
|
1921
|
-
**Fix Timeline:** Add per-component prop in v2
|
|
1922
|
-
|
|
1923
|
-
## Issue 3: Loading Skeleton Flash
|
|
1924
|
-
|
|
1925
|
-
**Severity:** Medium
|
|
1926
|
-
**Description:** Loading skeleton flashes briefly on fast connections
|
|
1927
|
-
**Workaround:** Increase minimum loading time to 200ms
|
|
1928
|
-
**Fix Timeline:** Implement smart loading delay based on connection speed
|
|
1929
|
-
```
|
|
1930
|
-
|
|
1931
|
-
---
|
|
1932
|
-
|
|
1933
|
-
## 10. Success Criteria
|
|
1934
|
-
|
|
1935
|
-
### Functional Criteria
|
|
1936
|
-
|
|
1937
|
-
- [x] **All Dashboard Components Migrated**
|
|
1938
|
-
- DashboardOverview ✓
|
|
1939
|
-
- StatsCards ✓
|
|
1940
|
-
- ActivityCharts ✓
|
|
1941
|
-
- RevenueCharts ✓
|
|
1942
|
-
- RecentTransactions ✓
|
|
1943
|
-
- CourseList ✓
|
|
1944
|
-
- CourseDetail ✓
|
|
1945
|
-
- LessonList ✓
|
|
1946
|
-
- LessonDetail ✓
|
|
1947
|
-
- StudentList ✓
|
|
1948
|
-
- ActivityFeed ✓
|
|
1949
|
-
- SearchBar ✓
|
|
1950
|
-
- SettingsPanel ✓
|
|
1951
|
-
|
|
1952
|
-
- [x] **Zero Direct Convex Dependencies**
|
|
1953
|
-
- No `import { useQuery, useMutation } from "convex/react"` ✓
|
|
1954
|
-
- No `import { api } from "@/convex/_generated/api"` ✓
|
|
1955
|
-
- All queries go through DataProvider ✓
|
|
1956
|
-
|
|
1957
|
-
- [x] **Feature Parity**
|
|
1958
|
-
- All existing features preserved ✓
|
|
1959
|
-
- Real-time updates working ✓
|
|
1960
|
-
- Optimistic updates working ✓
|
|
1961
|
-
- Loading states implemented ✓
|
|
1962
|
-
- Error states implemented ✓
|
|
1963
|
-
|
|
1964
|
-
### Technical Criteria
|
|
1965
|
-
|
|
1966
|
-
- [x] **Test Coverage**
|
|
1967
|
-
- All component unit tests pass ✓
|
|
1968
|
-
- All integration tests pass ✓
|
|
1969
|
-
- Visual regression tests pass ✓
|
|
1970
|
-
- Performance tests within 10% baseline ✓
|
|
1971
|
-
- Test coverage > 80% ✓
|
|
1972
|
-
|
|
1973
|
-
- [x] **Code Quality**
|
|
1974
|
-
- TypeScript errors: 0 ✓
|
|
1975
|
-
- ESLint warnings: 0 ✓
|
|
1976
|
-
- Prettier formatting correct ✓
|
|
1977
|
-
- No console errors in browser ✓
|
|
1978
|
-
|
|
1979
|
-
- [x] **Performance**
|
|
1980
|
-
- Initial load within 10% of baseline ✓
|
|
1981
|
-
- LCP < 2.5s ✓
|
|
1982
|
-
- FID < 100ms ✓
|
|
1983
|
-
- CLS < 0.1 ✓
|
|
1984
|
-
- Lighthouse score > 90 ✓
|
|
1985
|
-
|
|
1986
|
-
### Documentation Criteria
|
|
1987
|
-
|
|
1988
|
-
- [x] **Documentation Complete**
|
|
1989
|
-
- Migration guide written ✓
|
|
1990
|
-
- Component API changes documented ✓
|
|
1991
|
-
- Performance benchmarks published ✓
|
|
1992
|
-
- Known issues documented ✓
|
|
1993
|
-
- Code examples provided ✓
|
|
1994
|
-
|
|
1995
|
-
### Validation Criteria
|
|
1996
|
-
|
|
1997
|
-
- [x] **Quality Agent Validation**
|
|
1998
|
-
- All automated tests pass ✓
|
|
1999
|
-
- Manual QA testing complete ✓
|
|
2000
|
-
- Performance validation complete ✓
|
|
2001
|
-
- Accessibility validation complete ✓
|
|
2002
|
-
|
|
2003
|
-
- [x] **Stakeholder Approval**
|
|
2004
|
-
- Engineering Director approves ✓
|
|
2005
|
-
- Frontend Specialist approves ✓
|
|
2006
|
-
- Quality Agent approves ✓
|
|
2007
|
-
|
|
2008
|
-
---
|
|
2009
|
-
|
|
2010
|
-
## Related Files
|
|
2011
|
-
|
|
2012
|
-
- **Plan:** `/Users/toc/Server/ONE/one/things/plans/2-backend-agnostic-frontend.md`
|
|
2013
|
-
- **Feature 2-5:** `/Users/toc/Server/ONE/one/things/features/2-5-auth-migration.md` (DEPENDENCY)
|
|
2014
|
-
- **Implementation:** `/Users/toc/Server/ONE/frontend/src/components/dashboard/` (migrate these)
|
|
2015
|
-
- **Tests:** `/Users/toc/Server/ONE/frontend/test/components/dashboard/` (component tests)
|
|
2016
|
-
- **DataProvider:** `/Users/toc/Server/ONE/frontend/src/providers/data-provider.tsx`
|
|
2017
|
-
- **Hooks:** `/Users/toc/Server/ONE/frontend/src/providers/hooks/` (useThings, useThing, etc.)
|
|
2018
|
-
|
|
2019
|
-
---
|
|
2020
|
-
|
|
2021
|
-
## Next Steps
|
|
2022
|
-
|
|
2023
|
-
### Immediate Actions (Today)
|
|
2024
|
-
|
|
2025
|
-
1. **Frontend Specialist:** Wait for Feature 2-5 completion signal from Director
|
|
2026
|
-
2. **Frontend Specialist:** Verify all auth tests pass
|
|
2027
|
-
3. **Frontend Specialist:** Review this specification thoroughly
|
|
2028
|
-
4. **Frontend Specialist:** Ask questions if anything is unclear
|
|
2029
|
-
|
|
2030
|
-
### Implementation Phase (Week 1)
|
|
2031
|
-
|
|
2032
|
-
**Day 1: Preparation**
|
|
2033
|
-
|
|
2034
|
-
- Set up feature branch
|
|
2035
|
-
- Create rollback points
|
|
2036
|
-
- Establish performance baseline
|
|
2037
|
-
- Set up monitoring
|
|
2038
|
-
|
|
2039
|
-
**Day 2-3: Entity Components**
|
|
2040
|
-
|
|
2041
|
-
- Migrate CourseList, LessonList, StudentList
|
|
2042
|
-
- Migrate CourseDetail, LessonDetail
|
|
2043
|
-
- Test each component after migration
|
|
2044
|
-
|
|
2045
|
-
**Day 4-5: Analytics Components**
|
|
2046
|
-
|
|
2047
|
-
- Migrate DashboardOverview
|
|
2048
|
-
- Migrate StatsCards, ActivityCharts, RevenueCharts
|
|
2049
|
-
- Migrate RecentTransactions
|
|
2050
|
-
- Test dashboard as a whole
|
|
2051
|
-
|
|
2052
|
-
**Day 6: Activity & Search**
|
|
2053
|
-
|
|
2054
|
-
- Migrate ActivityFeed
|
|
2055
|
-
- Migrate SearchBar
|
|
2056
|
-
- Test real-time updates
|
|
2057
|
-
|
|
2058
|
-
**Day 7: Cleanup & Documentation**
|
|
2059
|
-
|
|
2060
|
-
- Remove all Convex imports
|
|
2061
|
-
- Run full test suite
|
|
2062
|
-
- Write documentation
|
|
2063
|
-
- Create pull request
|
|
2064
|
-
|
|
2065
|
-
### Validation Phase (Week 2)
|
|
2066
|
-
|
|
2067
|
-
1. **Quality Agent:** Run automated test suite
|
|
2068
|
-
2. **Quality Agent:** Perform manual QA testing
|
|
2069
|
-
3. **Quality Agent:** Validate performance benchmarks
|
|
2070
|
-
4. **Engineering Director:** Review and approve
|
|
2071
|
-
5. **Merge to main**
|
|
2072
|
-
|
|
2073
|
-
---
|
|
2074
|
-
|
|
2075
|
-
**Status:** Ready for Implementation (Pending Feature 2-5)
|
|
2076
|
-
**Created:** 2025-10-13
|
|
2077
|
-
**Last Updated:** 2025-10-13
|
|
2078
|
-
**Validated By:** Engineering Director Agent + Frontend Specialist
|
|
2079
|
-
**Blocks:** Feature 2-7 (Course Management Migration)
|
|
2080
|
-
**Estimated Completion:** Week 2 of Plan 2 Implementation
|
|
2081
|
-
|
|
2082
|
-
---
|
|
2083
|
-
|
|
2084
|
-
**Built for performance. Backend-agnostic. User-friendly.**
|