oneie 2.0.2 → 2.0.5

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.
Files changed (459) hide show
  1. package/AGENTS.md +245 -0
  2. package/CLAUDE.md +725 -0
  3. package/LICENSE.md +84 -0
  4. package/README.md +489 -931
  5. package/folders.yaml +78 -17
  6. package/one/.obsidian/app.json +1 -0
  7. package/one/.obsidian/appearance.json +1 -0
  8. package/one/.obsidian/core-plugins.json +33 -0
  9. package/one/.obsidian/workspace.json +211 -0
  10. package/one/connections/a2a.md +551 -0
  11. package/one/connections/acp.md +761 -0
  12. package/one/connections/acps.md +731 -0
  13. package/one/connections/agentkit.md +349 -0
  14. package/one/connections/agui.md +767 -0
  15. package/one/connections/any-backend.md +1702 -0
  16. package/one/connections/ap2.md +998 -0
  17. package/one/connections/api-docs.md +1891 -0
  18. package/one/connections/api.md +2190 -0
  19. package/one/connections/architecture-diagram.md +94 -0
  20. package/one/connections/communications.md +449 -0
  21. package/one/connections/connections.md +339 -0
  22. package/one/connections/copilotkit.md +1559 -0
  23. package/one/connections/cryptonetworks.md +781 -0
  24. package/one/connections/documentation.md +1120 -0
  25. package/one/connections/effect.md +279 -0
  26. package/one/connections/elizaos.md +1290 -0
  27. package/one/connections/inference.md +58 -0
  28. package/one/connections/kyc.md +632 -0
  29. package/one/connections/mcp.md +842 -0
  30. package/one/connections/membership.md +1152 -0
  31. package/one/connections/middleware.md +1067 -0
  32. package/one/connections/multitenant.md +1341 -0
  33. package/one/connections/n8n.md +1015 -0
  34. package/one/connections/patterns.md +89 -0
  35. package/one/connections/protocols.md +279 -0
  36. package/one/connections/relationships.md +107 -0
  37. package/one/connections/schema.md +587 -0
  38. package/one/connections/service-layer.md +550 -0
  39. package/one/connections/structure.md +0 -0
  40. package/one/connections/vectors.md +207 -0
  41. package/one/connections/wordpress.md +1302 -0
  42. package/one/connections/workflow-copy.md +905 -0
  43. package/one/connections/workflow-examples.md +741 -0
  44. package/one/connections/workflow.md +905 -0
  45. package/one/connections/workflows/delegation.md +885 -0
  46. package/one/connections/workflows/frontend.md +1037 -0
  47. package/one/connections/workflows/strategy.md +903 -0
  48. package/one/connections/workflows/tasks.md +698 -0
  49. package/one/connections/x402.md +1249 -0
  50. package/one/events/CASCADE-2-BACKEND-AGNOSTIC.md +412 -0
  51. package/one/events/FEATURE-2-4-COMPLETE.md +302 -0
  52. package/one/events/FEATURE_2_3_COMPLETE.md +575 -0
  53. package/one/events/GROUPS-MIGRATION.md +625 -0
  54. package/one/events/INSTALL-TESTS.md +293 -0
  55. package/one/events/INTEGRATION-ARCHITECTURE.md +561 -0
  56. package/one/events/INTEGRATION-CHECKLIST.md +1234 -0
  57. package/one/events/INTEGRATION-ORCHESTRATION.md +2623 -0
  58. package/one/events/INTEGRATION-SUMMARY.md +653 -0
  59. package/one/events/MIGRATION-REPORT.md +435 -0
  60. package/one/events/MIGRATION.md +69 -0
  61. package/one/events/README-archived.md +519 -0
  62. package/one/events/TEST-SUMMARY.md +393 -0
  63. package/one/events/TESTS-QUICK-REF.md +262 -0
  64. package/one/events/events.md +545 -0
  65. package/one/groups/groups.md +543 -0
  66. package/one/groups/one.md +599 -0
  67. package/one/groups/revenue.md +673 -0
  68. package/one/groups/strategy.md +869 -0
  69. package/one/groups/vision.md +98 -0
  70. package/one/knowledge/CLOUDFLARE_ENV_SETUP.md +49 -0
  71. package/one/knowledge/ai-platform.md +305 -0
  72. package/one/knowledge/architecture-any-backend.md +1366 -0
  73. package/one/knowledge/architecture-diagram.md +94 -0
  74. package/one/knowledge/architecture-frontend.md +930 -0
  75. package/one/knowledge/architecture.md +2077 -0
  76. package/one/knowledge/crypto.md +960 -0
  77. package/one/knowledge/docs/flow.md +0 -0
  78. package/one/knowledge/dsl.md +1660 -0
  79. package/one/knowledge/files.md +2471 -0
  80. package/one/knowledge/frontend.md +1038 -0
  81. package/one/knowledge/hono.md +2109 -0
  82. package/one/knowledge/implementation-examples.md +2536 -0
  83. package/one/knowledge/inference-score.md +159 -0
  84. package/one/knowledge/knowledge.md +642 -0
  85. package/one/knowledge/language.md +980 -0
  86. package/one/knowledge/lessons-learned.md +70 -0
  87. package/one/knowledge/ontology-6-dimensions.md +0 -0
  88. package/one/knowledge/ontology-documentation.md +356 -0
  89. package/one/knowledge/ontology-engineering-specification.md +1292 -0
  90. package/one/knowledge/ontology-engineering.md +1652 -0
  91. package/one/knowledge/ontology-frontend-copy-2.md +1492 -0
  92. package/one/knowledge/ontology-frontend-copy.md +753 -0
  93. package/one/knowledge/ontology-frontend-specifications.md +2188 -0
  94. package/one/knowledge/ontology-frontend.md +2427 -0
  95. package/one/knowledge/ontology-minimal.yaml +299 -0
  96. package/one/knowledge/ontology.md +2830 -0
  97. package/one/knowledge/ontology.md.backup +2822 -0
  98. package/one/knowledge/ontology.yaml +1165 -0
  99. package/one/knowledge/patterns/backend/convex-mutation-pattern.md +100 -0
  100. package/one/knowledge/patterns/backend/convex-query-pattern.md +88 -0
  101. package/one/knowledge/patterns/backend/mutation-template.md +231 -0
  102. package/one/knowledge/patterns/backend/query-template.md +267 -0
  103. package/one/knowledge/patterns/backend/service-template.md +237 -0
  104. package/one/knowledge/patterns/design/component-architecture.md +399 -0
  105. package/one/knowledge/patterns/design/test-driven-design-pattern.md +162 -0
  106. package/one/knowledge/patterns/design/wireframe-template.md +216 -0
  107. package/one/knowledge/patterns/frontend/component-template.md +195 -0
  108. package/one/knowledge/patterns/frontend/form-template.md +276 -0
  109. package/one/knowledge/patterns/frontend/page-template.md +178 -0
  110. package/one/knowledge/patterns/frontend/react-component-pattern.md +128 -0
  111. package/one/knowledge/patterns/test/acceptance-criteria-template.md +378 -0
  112. package/one/knowledge/patterns/test/technical-test-template.md +544 -0
  113. package/one/knowledge/patterns/test/test-driven-pattern.md +140 -0
  114. package/one/knowledge/patterns/test/user-flow-template.md +254 -0
  115. package/one/knowledge/provider-creation-guide.md +1064 -0
  116. package/one/knowledge/quality-loop.md +401 -0
  117. package/one/knowledge/readme.md +131 -0
  118. package/one/knowledge/rules.md +626 -0
  119. package/one/knowledge/score.md +67 -0
  120. package/one/knowledge/specifications.md +855 -0
  121. package/one/knowledge/tags.md +130 -0
  122. package/one/knowledge/todo.md +251 -0
  123. package/one/license.md +84 -0
  124. package/one/people/anthony-o-connell.md +440 -0
  125. package/one/people/people.md +567 -0
  126. package/one/things/CHECKLIST.md +356 -0
  127. package/one/things/ONE.md +510 -0
  128. package/one/things/agents/agent-backend.md +1401 -0
  129. package/one/things/agents/agent-builder.md +955 -0
  130. package/one/things/agents/agent-clean.md +709 -0
  131. package/one/things/agents/agent-clone.md +1341 -0
  132. package/one/things/agents/agent-designer.md +2177 -0
  133. package/one/things/agents/agent-director.md +1508 -0
  134. package/one/things/agents/agent-documenter.md +1049 -0
  135. package/one/things/agents/agent-frontend.md +1119 -0
  136. package/one/things/agents/agent-integrator.md +1192 -0
  137. package/one/things/agents/agent-problem-solver.md +1379 -0
  138. package/one/things/agents/agent-quality.md +1353 -0
  139. package/one/things/agents/agent-sales.md +986 -0
  140. package/one/things/cascade/cascade.yaml +464 -0
  141. package/one/things/cascade/docs/examples/1-1-agent-prompts/design.md +470 -0
  142. package/one/things/cascade/docs/examples/1-1-agent-prompts/tests.md +264 -0
  143. package/one/things/cascade/docs/examples/1-1-agent-prompts.md +486 -0
  144. package/one/things/cascade/docs/examples/1-2-yaml-orchestrator/design.md +497 -0
  145. package/one/things/cascade/docs/examples/1-2-yaml-orchestrator/tests.md +227 -0
  146. package/one/things/cascade/docs/examples/1-2-yaml-orchestrator.md +516 -0
  147. package/one/things/cascade/docs/examples/1-3-event-coordination/design.md +544 -0
  148. package/one/things/cascade/docs/examples/1-3-event-coordination/tests.md +223 -0
  149. package/one/things/cascade/docs/examples/1-3-event-coordination.md +508 -0
  150. package/one/things/cascade/docs/examples/1-4-knowledge-management/design.md +609 -0
  151. package/one/things/cascade/docs/examples/1-4-knowledge-management/tests.md +195 -0
  152. package/one/things/cascade/docs/examples/1-4-knowledge-management.md +577 -0
  153. package/one/things/cascade/docs/examples/1-5-quality-loops/design.md +797 -0
  154. package/one/things/cascade/docs/examples/1-5-quality-loops/tests.md +212 -0
  155. package/one/things/cascade/docs/examples/1-5-quality-loops.md +641 -0
  156. package/one/things/cascade/docs/examples/1-6-numbering-structure/design.md +610 -0
  157. package/one/things/cascade/docs/examples/1-6-numbering-structure/tests.md +213 -0
  158. package/one/things/cascade/docs/examples/1-6-numbering-structure.md +575 -0
  159. package/one/things/cascade/docs/examples/readme.md +222 -0
  160. package/one/things/cascade/docs/getting-started.md +515 -0
  161. package/one/things/cascade/docs/workflow.md +1372 -0
  162. package/one/things/cascade/readme.md +336 -0
  163. package/one/things/cascade/templates/feature-template.md +267 -0
  164. package/one/things/claude/agents/advocacy-activation-manager.md +685 -0
  165. package/one/things/claude/agents/advocacy-campaign-designer.md +663 -0
  166. package/one/things/claude/agents/analyst.md +483 -0
  167. package/one/things/claude/agents/architect.md +480 -0
  168. package/one/things/claude/agents/brand-identity-specialist.md +513 -0
  169. package/one/things/claude/agents/bstp-token-strategist.md +667 -0
  170. package/one/things/claude/agents/builder-repo.md +489 -0
  171. package/one/things/claude/agents/bullstamp-community-builder.md +574 -0
  172. package/one/things/claude/agents/bullstamp-marketing-orchestrator.md +506 -0
  173. package/one/things/claude/agents/bulltilt-platform-growth.md +567 -0
  174. package/one/things/claude/agents/company-bullstamp-character.md +587 -0
  175. package/one/things/claude/agents/company-bullstamp-community.md +292 -0
  176. package/one/things/claude/agents/company-bullstamp-marketing.md +292 -0
  177. package/one/things/claude/agents/company-bullstamp-token.md +292 -0
  178. package/one/things/claude/agents/company-bulltilt-growth.md +292 -0
  179. package/one/things/claude/agents/content-bibliography-formatter.md +381 -0
  180. package/one/things/claude/agents/content-calendar-planner.md +448 -0
  181. package/one/things/claude/agents/content-chapter-formatter.md +488 -0
  182. package/one/things/claude/agents/content-formatter.md +546 -0
  183. package/one/things/claude/agents/content-hook-specialist.md +462 -0
  184. package/one/things/claude/agents/content-image-formatter.md +535 -0
  185. package/one/things/claude/agents/content-introduction-formatter.md +485 -0
  186. package/one/things/claude/agents/content-multiplication-engine.md +556 -0
  187. package/one/things/claude/agents/content-playbook-writer.md +448 -0
  188. package/one/things/claude/agents/content-team-manager.md +622 -0
  189. package/one/things/claude/agents/content-toc-formatter.md +522 -0
  190. package/one/things/claude/agents/convex-backend-specialist.md +2561 -0
  191. package/one/things/claude/agents/core-manager.md +582 -0
  192. package/one/things/claude/agents/core-master.md +403 -0
  193. package/one/things/claude/agents/cross-functional-manager.md +471 -0
  194. package/one/things/claude/agents/crypto-airdrop-strategist.md +602 -0
  195. package/one/things/claude/agents/crypto-analytics-educator.md +553 -0
  196. package/one/things/claude/agents/crypto-architecture-specialist.md +466 -0
  197. package/one/things/claude/agents/crypto-community-analyst.md +298 -0
  198. package/one/things/claude/agents/crypto-community-psychologist.md +509 -0
  199. package/one/things/claude/agents/crypto-dex-optimization-expert.md +538 -0
  200. package/one/things/claude/agents/crypto-dex-optimizer.md +292 -0
  201. package/one/things/claude/agents/crypto-diamond-formation-specialist.md +513 -0
  202. package/one/things/claude/agents/crypto-diamond-hands.md +292 -0
  203. package/one/things/claude/agents/crypto-ecosystem-expansion-manager.md +554 -0
  204. package/one/things/claude/agents/crypto-engagement-specialist.md +540 -0
  205. package/one/things/claude/agents/crypto-market-researcher.md +292 -0
  206. package/one/things/claude/agents/crypto-marketing-orchestrator.md +523 -0
  207. package/one/things/claude/agents/crypto-network-effect-amplifier.md +569 -0
  208. package/one/things/claude/agents/crypto-optimization-analyst.md +554 -0
  209. package/one/things/claude/agents/crypto-strategic-synthesizer.md +517 -0
  210. package/one/things/claude/agents/crypto-team-manager.md +387 -0
  211. package/one/things/claude/agents/crypto-token-analyst.md +278 -0
  212. package/one/things/claude/agents/crypto-viral-content-creator.md +546 -0
  213. package/one/things/claude/agents/crypto-wallet-identification-expert.md +517 -0
  214. package/one/things/claude/agents/crypto-wallet-identifier.md +292 -0
  215. package/one/things/claude/agents/customer-journey-designer.md +481 -0
  216. package/one/things/claude/agents/customer-success-manager.md +581 -0
  217. package/one/things/claude/agents/dev.md +413 -0
  218. package/one/things/claude/agents/documenter.md +546 -0
  219. package/one/things/claude/agents/elevate-marketing-orchestrator.md +410 -0
  220. package/one/things/claude/agents/engagement-specialist.md +509 -0
  221. package/one/things/claude/agents/engineering-architect.md +387 -0
  222. package/one/things/claude/agents/engineering-business-analyst.md +537 -0
  223. package/one/things/claude/agents/engineering-developer.md +387 -0
  224. package/one/things/claude/agents/engineering-director.md +282 -0
  225. package/one/things/claude/agents/engineering-ingestor.md +649 -0
  226. package/one/things/claude/agents/engineering-product-manager.md +537 -0
  227. package/one/things/claude/agents/engineering-product-owner.md +537 -0
  228. package/one/things/claude/agents/engineering-project-coordinator.md +537 -0
  229. package/one/things/claude/agents/engineering-quality-assurance.md +393 -0
  230. package/one/things/claude/agents/engineering-team-manager.md +512 -0
  231. package/one/things/claude/agents/engineering-user-experience.md +387 -0
  232. package/one/things/claude/agents/framework-elevate-manager.md +294 -0
  233. package/one/things/claude/agents/improver.md +763 -0
  234. package/one/things/claude/agents/intelligence-team-manager.md +385 -0
  235. package/one/things/claude/agents/lead-capture-expert.md +466 -0
  236. package/one/things/claude/agents/lead-magnet-creator.md +453 -0
  237. package/one/things/claude/agents/market-research-analyst.md +412 -0
  238. package/one/things/claude/agents/marketing-brand-identity.md +314 -0
  239. package/one/things/claude/agents/marketing-content-hooks.md +450 -0
  240. package/one/things/claude/agents/marketing-content-multiplier.md +326 -0
  241. package/one/things/claude/agents/marketing-content-poster.md +361 -0
  242. package/one/things/claude/agents/marketing-customer-journey.md +326 -0
  243. package/one/things/claude/agents/marketing-director.md +397 -0
  244. package/one/things/claude/agents/marketing-engagement.md +326 -0
  245. package/one/things/claude/agents/marketing-lead-capture.md +326 -0
  246. package/one/things/claude/agents/marketing-lead-magnet.md +326 -0
  247. package/one/things/claude/agents/marketing-network-effects.md +326 -0
  248. package/one/things/claude/agents/marketing-nurture-campaigns.md +326 -0
  249. package/one/things/claude/agents/marketing-share-optimizer.md +326 -0
  250. package/one/things/claude/agents/marketing-team-manager.md +446 -0
  251. package/one/things/claude/agents/marketing-viral-growth.md +201 -0
  252. package/one/things/claude/agents/mission-commander.md +373 -0
  253. package/one/things/claude/agents/network-effect-analyst.md +587 -0
  254. package/one/things/claude/agents/nextjs-15-specialist.md +1547 -0
  255. package/one/things/claude/agents/npx.md +890 -0
  256. package/one/things/claude/agents/nurture-campaign-manager.md +531 -0
  257. package/one/things/claude/agents/one-master.md +355 -0
  258. package/one/things/claude/agents/one-orchestrator.md +315 -0
  259. package/one/things/claude/agents/one.md +601 -0
  260. package/one/things/claude/agents/playbook-generator.md +503 -0
  261. package/one/things/claude/agents/pm.md +326 -0
  262. package/one/things/claude/agents/po.md +345 -0
  263. package/one/things/claude/agents/qa.md +336 -0
  264. package/one/things/claude/agents/research-foundation-analyst.md +307 -0
  265. package/one/things/claude/agents/research-intelligence-gatherer.md +408 -0
  266. package/one/things/claude/agents/research-market-analyst.md +307 -0
  267. package/one/things/claude/agents/research-team-manager.md +482 -0
  268. package/one/things/claude/agents/sales-environment-optimizer.md +494 -0
  269. package/one/things/claude/agents/sales-team-manager.md +400 -0
  270. package/one/things/claude/agents/sales-upsell-strategist.md +307 -0
  271. package/one/things/claude/agents/service-advocacy-campaigns.md +307 -0
  272. package/one/things/claude/agents/service-advocacy-manager.md +307 -0
  273. package/one/things/claude/agents/service-success-manager.md +307 -0
  274. package/one/things/claude/agents/service-team-manager.md +400 -0
  275. package/one/things/claude/agents/shadcn-ui-design-system-specialist.md +2302 -0
  276. package/one/things/claude/agents/share-optimization-specialist.md +551 -0
  277. package/one/things/claude/agents/sm.md +327 -0
  278. package/one/things/claude/agents/story-teller.md +473 -0
  279. package/one/things/claude/agents/task-master.md +596 -0
  280. package/one/things/claude/agents/tauri-cross-platform-specialist.md +1827 -0
  281. package/one/things/claude/agents/tester.md +556 -0
  282. package/one/things/claude/agents/the-bull-character-manager.md +580 -0
  283. package/one/things/claude/agents/tools-playbook-generator.md +489 -0
  284. package/one/things/claude/agents/turbo-repo-builder.md +316 -0
  285. package/one/things/claude/agents/upsell-strategist.md +480 -0
  286. package/one/things/claude/agents/ux-expert.md +335 -0
  287. package/one/things/claude/agents/viral-growth-orchestrator.md +497 -0
  288. package/one/things/claude/claude-code-hooks-development.json +21 -0
  289. package/one/things/claude/claude-code-hooks-production.json +21 -0
  290. package/one/things/claude/claude-code-hooks.json +25 -0
  291. package/one/things/claude/commands/agent.md +104 -0
  292. package/one/things/claude/commands/cascade-status.md +128 -0
  293. package/one/things/claude/commands/ingest.md +290 -0
  294. package/one/things/claude/commands/ingestor.md +136 -0
  295. package/one/things/claude/commands/mission.md +83 -0
  296. package/one/things/claude/commands/npx.md +133 -0
  297. package/one/things/claude/commands/one.md +440 -0
  298. package/one/things/claude/commands/quality-check.md +204 -0
  299. package/one/things/claude/commands/smart-route.md +220 -0
  300. package/one/things/claude/commands/start.md +121 -0
  301. package/one/things/claude/commands/story.md +83 -0
  302. package/one/things/claude/commands/task.md +173 -0
  303. package/one/things/claude/hook-bypass.json +32 -0
  304. package/one/things/claude/hooks/agent-hook-config.json +427 -0
  305. package/one/things/claude/hooks/agent-hook-manager.js +525 -0
  306. package/one/things/claude/hooks/agent-load-balancer.js +271 -0
  307. package/one/things/claude/hooks/agent-request-interceptor.js +70 -0
  308. package/one/things/claude/hooks/build-hook.sh +156 -0
  309. package/one/things/claude/hooks/cascade-feedback.js +297 -0
  310. package/one/things/claude/hooks/cascade-integration-hooks.js +648 -0
  311. package/one/things/claude/hooks/cleanup-hook.sh +201 -0
  312. package/one/things/claude/hooks/continuous-improvement-monitor.js +510 -0
  313. package/one/things/claude/hooks/file-organization-engine.js +427 -0
  314. package/one/things/claude/hooks/file-organization-hook.sh +80 -0
  315. package/one/things/claude/hooks/file-organization-monitor.js +269 -0
  316. package/one/things/claude/hooks/format-hook.sh +43 -0
  317. package/one/things/claude/hooks/hook-bypass.sh +293 -0
  318. package/one/things/claude/hooks/hook-config-manager.js +202 -0
  319. package/one/things/claude/hooks/hook-debouncer.sh +62 -0
  320. package/one/things/claude/hooks/hook-logger.sh +89 -0
  321. package/one/things/claude/hooks/hook-orchestrator.js +662 -0
  322. package/one/things/claude/hooks/hook-performance-report.js +120 -0
  323. package/one/things/claude/hooks/lint-hook.sh +140 -0
  324. package/one/things/claude/hooks/mcp-cascade-integration.js +816 -0
  325. package/one/things/claude/hooks/memory-optimizer.js +510 -0
  326. package/one/things/claude/hooks/notification-hook.sh +204 -0
  327. package/one/things/claude/hooks/ontology-compliance.js +394 -0
  328. package/one/things/claude/hooks/ontology-hook-manager.js +316 -0
  329. package/one/things/claude/hooks/ontology-validation-engine.js +317 -0
  330. package/one/things/claude/hooks/ontology-validation-hook.sh +86 -0
  331. package/one/things/claude/hooks/performance-metrics.json +25 -0
  332. package/one/things/claude/hooks/performance-monitoring-hook.js +422 -0
  333. package/one/things/claude/hooks/quality-scoring-engine.js +834 -0
  334. package/one/things/claude/hooks/security-hook.sh +256 -0
  335. package/one/things/claude/hooks/simple-load-balancer.js +238 -0
  336. package/one/things/claude/hooks/startup-optimizer.js +625 -0
  337. package/one/things/claude/hooks/story-scoring-system.js +445 -0
  338. package/one/things/claude/hooks/story-validation-engine.js +473 -0
  339. package/one/things/claude/hooks/story-validation-hook-enhanced.sh +210 -0
  340. package/one/things/claude/hooks/story-validation-hook.sh +145 -0
  341. package/one/things/claude/hooks/structure-synchronizer.js +194 -0
  342. package/one/things/claude/hooks/sub-agent-output-validator.js +647 -0
  343. package/one/things/claude/hooks/sub-agent-validation-hook.js +343 -0
  344. package/one/things/claude/hooks/test-hook.sh +145 -0
  345. package/one/things/claude/hooks/test-story-validation.sh +170 -0
  346. package/one/things/claude/hooks/trinity-validation-system.js +392 -0
  347. package/one/things/claude/settings-local.json +86 -0
  348. package/one/things/cli/cli-code.md +652 -0
  349. package/one/things/cli/cli-compiler-code.md +652 -0
  350. package/one/things/cli/cli.md +1068 -0
  351. package/one/things/components/card-shadcn.md +929 -0
  352. package/one/things/components/card.md +1050 -0
  353. package/one/things/components.md +1669 -0
  354. package/one/things/componets.md +4 -0
  355. package/one/things/creator-diagram.md +166 -0
  356. package/one/things/examples/children/lemonade-stand.md +366 -0
  357. package/one/things/examples/enterprise/crm-saas.md +1429 -0
  358. package/one/things/features/1-1-agent-prompts/design.md +470 -0
  359. package/one/things/features/1-1-agent-prompts/tests.md +264 -0
  360. package/one/things/features/1-1-agent-prompts.md +486 -0
  361. package/one/things/features/1-2-yaml-orchestrator/design.md +497 -0
  362. package/one/things/features/1-2-yaml-orchestrator/tests.md +227 -0
  363. package/one/things/features/1-2-yaml-orchestrator.md +516 -0
  364. package/one/things/features/1-3-event-coordination/design.md +544 -0
  365. package/one/things/features/1-3-event-coordination/tests.md +223 -0
  366. package/one/things/features/1-3-event-coordination.md +508 -0
  367. package/one/things/features/1-4-knowledge-management/design.md +609 -0
  368. package/one/things/features/1-4-knowledge-management/tests.md +195 -0
  369. package/one/things/features/1-4-knowledge-management.md +577 -0
  370. package/one/things/features/1-5-quality-loops/design.md +797 -0
  371. package/one/things/features/1-5-quality-loops/tests.md +212 -0
  372. package/one/things/features/1-5-quality-loops.md +641 -0
  373. package/one/things/features/1-6-numbering-structure/design.md +610 -0
  374. package/one/things/features/1-6-numbering-structure/tests.md +213 -0
  375. package/one/things/features/1-6-numbering-structure.md +575 -0
  376. package/one/things/features/2-1-dataprovider-interface.md +2358 -0
  377. package/one/things/features/2-2-config-system.md +3075 -0
  378. package/one/things/features/2-3-effectts-services.md +1498 -0
  379. package/one/things/features/2-4-react-hooks.md +2120 -0
  380. package/one/things/features/2-5-auth-migration.md +2046 -0
  381. package/one/things/features/2-6-dashboard-migration.md +1985 -0
  382. package/one/things/features/2-7-alternative-providers.md +2505 -0
  383. package/one/things/features/2-7-implementation-report.md +680 -0
  384. package/one/things/features/2-cli.md +1235 -0
  385. package/one/things/features/2-design.md +1738 -0
  386. package/one/things/features/2-tests.md +520 -0
  387. package/one/things/features/AUTH_HOOKS_IMPLEMENTATION.md +521 -0
  388. package/one/things/features/DECOUPLING.md +272 -0
  389. package/one/things/features/DEPLOYMENT.md +452 -0
  390. package/one/things/features/IMPLEMENTATION_SUMMARY.md +316 -0
  391. package/one/things/features/dataprovider-interface/1-tests.md +1522 -0
  392. package/one/things/features/improve.md +843 -0
  393. package/one/things/features/remove-convex-deps.md +45 -0
  394. package/one/things/features/top-features.md +79 -0
  395. package/one/things/features/use-one-backend.md +1180 -0
  396. package/one/things/ideas/1-create-workflow.md +189 -0
  397. package/one/things/ideas/2-backend-agnostic-frontend.md +384 -0
  398. package/one/things/plans/1-create-workflow-status.md +555 -0
  399. package/one/things/plans/1-create-workflow.md +713 -0
  400. package/one/things/plans/2-backend-agnostic-frontend.md +543 -0
  401. package/one/things/plans/3-groups.md +502 -0
  402. package/one/things/plans/app.md +761 -0
  403. package/one/things/plans/backend-agnostic-frontend.md +323 -0
  404. package/one/things/plans/better-auth-any-backend-revised.md +1065 -0
  405. package/one/things/plans/better-auth-any-backend.md +1852 -0
  406. package/one/things/plans/better-auth-available-features.md +235 -0
  407. package/one/things/plans/big-plan.md +38 -0
  408. package/one/things/plans/convex-better-auth.md +1109 -0
  409. package/one/things/plans/convex-on-off.md +389 -0
  410. package/one/things/plans/deploy-to-cloudflare.md +581 -0
  411. package/one/things/plans/desktop.md +1121 -0
  412. package/one/things/plans/effect-components.md +1669 -0
  413. package/one/things/plans/effect.md +973 -0
  414. package/one/things/plans/email.md +953 -0
  415. package/one/things/plans/enhance-auth.md +1669 -0
  416. package/one/things/plans/install-components.md +198 -0
  417. package/one/things/plans/landing.md +728 -0
  418. package/one/things/plans/layout.md +205 -0
  419. package/one/things/plans/mail-backend.md +1308 -0
  420. package/one/things/plans/mail.md +2624 -0
  421. package/one/things/plans/next-features.md +83 -0
  422. package/one/things/plans/one.md +658 -0
  423. package/one/things/plans/ontology-6-dimensions.md +2216 -0
  424. package/one/things/plans/ontology-driven-strategy.md +866 -0
  425. package/one/things/plans/ontology-ui-approach.md +357 -0
  426. package/one/things/plans/open-agent.md +785 -0
  427. package/one/things/plans/organizations-to-groups.md +705 -0
  428. package/one/things/plans/performace.md +90 -0
  429. package/one/things/plans/release.md +432 -0
  430. package/one/things/plans/releases.md +809 -0
  431. package/one/things/plans/repos.md +76 -0
  432. package/one/things/plans/separate-copy-2.md +1293 -0
  433. package/one/things/plans/separate-copy-3.md +2458 -0
  434. package/one/things/plans/separate-copy.md +1293 -0
  435. package/one/things/plans/separate.md +1983 -0
  436. package/one/things/plans/shadcn-integration-summary.md +450 -0
  437. package/one/things/plans/sidebar.md +172 -0
  438. package/one/things/plans/small-fixes.md +5 -0
  439. package/one/things/plans/test-backend-connection.md +476 -0
  440. package/one/things/plans/workflow-files.md +1196 -0
  441. package/one/things/plans/workflow.md +1372 -0
  442. package/one/things/products/cascade-landing-page.md +737 -0
  443. package/one/things/products/cascade.md +1518 -0
  444. package/one/things/products/context-engineering.md +1427 -0
  445. package/one/things/products/onthology.md +0 -0
  446. package/one/things/products/ontology-ui-shadcn.md +1280 -0
  447. package/one/things/products/ontology-ui.md +1387 -0
  448. package/one/things/products/ontology.md +717 -0
  449. package/one/things/products/sdk.md +557 -0
  450. package/one/things/promptkit.md +903 -0
  451. package/one/things/service-providers-new.md +982 -0
  452. package/one/things/service-providers.md +1092 -0
  453. package/one/things/system.md +600 -0
  454. package/one/things/tests/2-1-dataprovider-interface.md +1144 -0
  455. package/one/things/tests/2-1-test-analysis.md +496 -0
  456. package/one/things/things.md +349 -0
  457. package/one/things/todo.md +1248 -0
  458. package/one/things/vision/elegant-interface.md +214 -0
  459. package/package.json +5 -2
@@ -0,0 +1,1038 @@
1
+ # Frontend.md - Astro Frontend Architecture
2
+
3
+ ## Overview
4
+
5
+ **Astro 5.14+** powers the frontend layer of the ONE Platform with server-side rendering, islands architecture, and seamless integration with React 19, Convex, and the Hono API backend. This architecture enables:
6
+
7
+ 1. **Content Collections**: Type-safe content management with `astro:content` module
8
+ 2. **Islands Architecture**: Static-first with selective interactivity
9
+ 3. **Dual Integration**: Hono API for mutations, Convex hooks for real-time queries
10
+ 4. **SSR + Edge**: Server-side rendering on Cloudflare Pages
11
+ 5. **Component Library**: shadcn/ui components with Tailwind CSS v4
12
+
13
+ **Key Principle:** Frontend is **user-customizable "vibe code"** while backend (Hono + Convex) remains stable and shared across tenants.
14
+
15
+ ## Architecture Vision
16
+
17
+ ```
18
+ ┌─────────────────────────────────────────────────────────┐
19
+ │ ASTRO FRONTEND │
20
+ │ ┌──────────────────────────────────────────────────┐ │
21
+ │ │ Pages (.astro files) │ │
22
+ │ │ - SSR routing (file-based) │ │
23
+ │ │ - Static generation │ │
24
+ │ │ - Dynamic routes │ │
25
+ │ └────────────────┬─────────────────────────────────┘ │
26
+ │ │ │
27
+ │ ┌────────────────┴─────────────────────────────────┐ │
28
+ │ │ Content Collections (astro:content) │ │
29
+ │ │ - Type-safe schemas with Zod │ │
30
+ │ │ - Blog, docs, marketing content │ │
31
+ │ │ - References between collections │ │
32
+ │ └────────────────┬─────────────────────────────────┘ │
33
+ │ │ │
34
+ │ ┌────────────────┴─────────────────────────────────┐ │
35
+ │ │ React Components (Interactive Islands) │ │
36
+ │ │ - shadcn/ui components │ │
37
+ │ │ - Convex hooks (real-time data) │ │
38
+ │ │ - Hono API client (mutations) │ │
39
+ │ └────────────────┬─────────────────────────────────┘ │
40
+ │ │ │
41
+ │ ┌────────────────┴─────────────────────────────────┐ │
42
+ │ │ UI Components (shadcn/ui) │ │
43
+ │ │ - Button, Card, Dialog, etc. │ │
44
+ │ │ - Tailwind CSS v4 styling │ │
45
+ │ │ - Dark mode support │ │
46
+ │ └──────────────────────────────────────────────────┘ │
47
+ └─────────────────────────────────────────────────────────┘
48
+ │ HTTP & WebSocket
49
+ ▼
50
+ ┌─────────────────────────────────────────────────────────┐
51
+ │ BACKEND INTEGRATION LAYER │
52
+ │ ┌──────────────────────────────────────────────────┐ │
53
+ │ │ Hono API Client (REST API) │ │
54
+ │ │ /api/auth/* - Authentication │ │
55
+ │ │ /api/tokens/* - Token purchases │ │
56
+ │ │ /api/agents/* - Agent management │ │
57
+ │ └──────────────────────────────────────────────────┘ │
58
+ │ ┌──────────────────────────────────────────────────┐ │
59
+ │ │ Convex Hooks (Real-time Data) │ │
60
+ │ │ useQuery() - Live data subscriptions │ │
61
+ │ │ useMutation() - Optimistic updates │ │
62
+ │ └──────────────────────────────────────────────────┘ │
63
+ └─────────────────────────────────────────────────────────┘
64
+ ```
65
+
66
+ ## Technology Stack
67
+
68
+ **Frontend Framework:**
69
+ - Astro 5.14+ (SSR, file-based routing)
70
+ - React 19 (interactive components)
71
+ - TypeScript 5.9+ (strict mode)
72
+
73
+ **UI & Styling:**
74
+ - shadcn/ui (50+ components)
75
+ - Tailwind CSS v4 (modern CSS-based config)
76
+ - Radix UI primitives
77
+
78
+ **State & Data:**
79
+ - Nanostores (lightweight state)
80
+ - Convex hooks (real-time data)
81
+ - Hono API client (mutations)
82
+
83
+ **Content:**
84
+ - `astro:content` (type-safe collections)
85
+ - Zod (schema validation)
86
+ - MDX support
87
+
88
+ **Deployment:**
89
+ - Cloudflare Pages (edge SSR)
90
+ - React 19 edge compatibility (`react-dom/server.edge`)
91
+
92
+ ## Content Collections with astro:content
93
+
94
+ ### 1. Collection Schema Definition
95
+
96
+ Content collections provide type-safe content management with automatic validation.
97
+
98
+ #### `src/content/config.ts`
99
+
100
+ ```typescript
101
+ import { defineCollection, z, reference } from 'astro:content';
102
+
103
+ /**
104
+ * Blog collection with rich metadata
105
+ */
106
+ const blogCollection = defineCollection({
107
+ type: 'content',
108
+ schema: z.object({
109
+ title: z.string(),
110
+ description: z.string(),
111
+ date: z.date(),
112
+ draft: z.boolean().default(false),
113
+ image: z.string().optional(),
114
+ author: reference('authors'), // Reference to authors collection
115
+ tags: z.array(z.string()).default([]),
116
+ category: z.enum(['tutorial', 'news', 'guide', 'review', 'article']).default('article'),
117
+ readingTime: z.number().optional(),
118
+ featured: z.boolean().default(false),
119
+ relatedPosts: z.array(reference('blog')).optional(), // References to other posts
120
+ }),
121
+ });
122
+
123
+ /**
124
+ * Authors collection
125
+ */
126
+ const authorsCollection = defineCollection({
127
+ type: 'data',
128
+ schema: z.object({
129
+ name: z.string(),
130
+ bio: z.string(),
131
+ avatar: z.string(),
132
+ twitter: z.string().optional(),
133
+ github: z.string().optional(),
134
+ }),
135
+ });
136
+
137
+ /**
138
+ * Docs collection with nested structure
139
+ */
140
+ const docsCollection = defineCollection({
141
+ type: 'content',
142
+ schema: z.object({
143
+ title: z.string(),
144
+ description: z.string(),
145
+ order: z.number().default(0),
146
+ category: z.string(),
147
+ related: z.array(reference('docs')).optional(),
148
+ }),
149
+ });
150
+
151
+ export const collections = {
152
+ blog: blogCollection,
153
+ authors: authorsCollection,
154
+ docs: docsCollection,
155
+ };
156
+ ```
157
+
158
+ ### 2. Querying Collections
159
+
160
+ #### Get All Entries
161
+
162
+ ```typescript
163
+ ---
164
+ // src/pages/blog/index.astro
165
+ import { getCollection } from 'astro:content';
166
+
167
+ // Get all published blog posts
168
+ const allPosts = await getCollection('blog', ({ data }) => {
169
+ return data.draft !== true;
170
+ });
171
+
172
+ // Sort by date descending
173
+ const sortedPosts = allPosts.sort(
174
+ (a, b) => b.data.date.getTime() - a.data.date.getTime()
175
+ );
176
+ ---
177
+
178
+ <Layout>
179
+ <h1>Blog Posts</h1>
180
+ {sortedPosts.map(post => (
181
+ <article>
182
+ <h2><a href={`/blog/${post.slug}`}>{post.data.title}</a></h2>
183
+ <p>{post.data.description}</p>
184
+ <time>{post.data.date.toLocaleDateString()}</time>
185
+ </article>
186
+ ))}
187
+ </Layout>
188
+ ```
189
+
190
+ #### Get Single Entry with References
191
+
192
+ ```typescript
193
+ ---
194
+ // src/pages/blog/[...slug].astro
195
+ import { getEntry, getEntries } from 'astro:content';
196
+
197
+ const { slug } = Astro.params;
198
+ const post = await getEntry('blog', slug);
199
+
200
+ if (!post) {
201
+ return Astro.redirect('/404');
202
+ }
203
+
204
+ // Render content
205
+ const { Content, headings } = await post.render();
206
+
207
+ // Get referenced author
208
+ const author = await getEntry(post.data.author);
209
+
210
+ // Get related posts
211
+ const relatedPosts = post.data.relatedPosts
212
+ ? await getEntries(post.data.relatedPosts)
213
+ : [];
214
+ ---
215
+
216
+ <Layout title={post.data.title}>
217
+ <article>
218
+ <h1>{post.data.title}</h1>
219
+
220
+ {/* Author info */}
221
+ <div class="author">
222
+ <img src={author.data.avatar} alt={author.data.name} />
223
+ <p>{author.data.name}</p>
224
+ </div>
225
+
226
+ {/* Rendered content */}
227
+ <Content />
228
+
229
+ {/* Related posts */}
230
+ {relatedPosts.length > 0 && (
231
+ <aside>
232
+ <h3>Related Posts</h3>
233
+ {relatedPosts.map(related => (
234
+ <a href={`/blog/${related.slug}`}>{related.data.title}</a>
235
+ ))}
236
+ </aside>
237
+ )}
238
+ </article>
239
+ </Layout>
240
+ ```
241
+
242
+ ### 3. Dynamic Routes with Type Safety
243
+
244
+ ```typescript
245
+ ---
246
+ // src/pages/blog/[...slug].astro
247
+ import { getCollection, type CollectionEntry } from 'astro:content';
248
+
249
+ // Generate static paths
250
+ export async function getStaticPaths() {
251
+ const posts = await getCollection('blog');
252
+
253
+ return posts.map(post => ({
254
+ params: { slug: post.slug },
255
+ props: { post },
256
+ }));
257
+ }
258
+
259
+ // Type-safe props
260
+ type Props = {
261
+ post: CollectionEntry<'blog'>;
262
+ };
263
+
264
+ const { post } = Astro.props;
265
+ const { Content, headings } = await post.render();
266
+ ---
267
+
268
+ <Layout title={post.data.title}>
269
+ <Content />
270
+ </Layout>
271
+ ```
272
+
273
+ ### 4. Collection References Pattern
274
+
275
+ ```typescript
276
+ // Content file: src/content/blog/my-post.md
277
+ ---
278
+ title: "Building with Astro"
279
+ author: "john-doe" # References src/content/authors/john-doe.json
280
+ relatedPosts:
281
+ - "getting-started"
282
+ - "advanced-patterns"
283
+ tags: ["astro", "tutorial"]
284
+ ---
285
+
286
+ Content goes here...
287
+ ```
288
+
289
+ ```typescript
290
+ // Author file: src/content/authors/john-doe.json
291
+ {
292
+ "name": "John Doe",
293
+ "bio": "Full-stack developer",
294
+ "avatar": "/images/john.jpg",
295
+ "twitter": "@johndoe"
296
+ }
297
+ ```
298
+
299
+ ### 5. Advanced Queries with Filtering
300
+
301
+ ```typescript
302
+ ---
303
+ import { getCollection } from 'astro:content';
304
+
305
+ // Filter by tag
306
+ const tag = Astro.url.searchParams.get('tag');
307
+ const posts = await getCollection('blog', ({ data }) => {
308
+ if (tag) {
309
+ return data.tags.includes(tag) && !data.draft;
310
+ }
311
+ return !data.draft;
312
+ });
313
+
314
+ // Filter by category
315
+ const category = 'tutorial';
316
+ const tutorials = await getCollection('blog', ({ data }) => {
317
+ return data.category === category && !data.draft;
318
+ });
319
+
320
+ // Featured posts only
321
+ const featured = await getCollection('blog', ({ data }) => {
322
+ return data.featured === true && !data.draft;
323
+ });
324
+ ---
325
+ ```
326
+
327
+ ## React Components with Dual Integration
328
+
329
+ ### Pattern: Hono API for Mutations + Convex for Queries
330
+
331
+ This dual approach combines the best of both worlds:
332
+ - **Hono API**: Business logic, authentication, payments
333
+ - **Convex Hooks**: Real-time data, live updates
334
+
335
+ ### Example: Token Purchase Component
336
+
337
+ ```typescript
338
+ // src/components/features/tokens/TokenPurchase.tsx
339
+ import { useState } from 'react';
340
+ import { useQuery } from 'convex/react';
341
+ import { api as honoApi } from '@/lib/api';
342
+ import { api as convexApi } from '@/convex/_generated/api';
343
+ import { Button } from '@/components/ui/button';
344
+ import { Card, CardHeader, CardTitle, CardContent } from '@/components/ui/card';
345
+ import { useToast } from '@/hooks/use-toast';
346
+ import type { Id } from '@/convex/_generated/dataModel';
347
+
348
+ interface TokenPurchaseProps {
349
+ tokenId: Id<'entities'>;
350
+ }
351
+
352
+ /**
353
+ * Token purchase demonstrating dual integration:
354
+ * - Convex useQuery for real-time token data
355
+ * - Hono API for purchase mutation
356
+ */
357
+ export function TokenPurchase({ tokenId }: TokenPurchaseProps) {
358
+ const { toast } = useToast();
359
+ const [loading, setLoading] = useState(false);
360
+
361
+ // Real-time token data via Convex (auto-updates!)
362
+ const token = useQuery(convexApi.queries.entities.get, { id: tokenId });
363
+
364
+ // Purchase via Hono API (handles validation, payment, etc.)
365
+ const handlePurchase = async (amount: number) => {
366
+ setLoading(true);
367
+ try {
368
+ const result = await honoApi.purchaseTokens(tokenId, amount);
369
+
370
+ if (result.error) {
371
+ throw new Error(result.error);
372
+ }
373
+
374
+ toast({
375
+ title: 'Success!',
376
+ description: `Purchased ${amount} tokens`,
377
+ });
378
+
379
+ // Convex subscription will auto-update the balance!
380
+ } catch (error: any) {
381
+ toast({
382
+ title: 'Error',
383
+ description: error.message,
384
+ variant: 'destructive',
385
+ });
386
+ } finally {
387
+ setLoading(false);
388
+ }
389
+ };
390
+
391
+ // Loading state
392
+ if (!token) {
393
+ return (
394
+ <Card>
395
+ <CardContent className="p-6">
396
+ <div className="animate-pulse">Loading...</div>
397
+ </CardContent>
398
+ </Card>
399
+ );
400
+ }
401
+
402
+ return (
403
+ <Card>
404
+ <CardHeader>
405
+ <CardTitle>{token.name}</CardTitle>
406
+ </CardHeader>
407
+ <CardContent className="space-y-4">
408
+ <div className="text-sm text-muted-foreground">
409
+ <p>Price: ${token.properties.price}</p>
410
+ <p>Your balance: {token.properties.balance || 0} tokens</p>
411
+ </div>
412
+
413
+ <Button
414
+ onClick={() => handlePurchase(100)}
415
+ disabled={loading}
416
+ className="w-full"
417
+ >
418
+ {loading ? 'Processing...' : 'Buy 100 Tokens'}
419
+ </Button>
420
+ </CardContent>
421
+ </Card>
422
+ );
423
+ }
424
+ ```
425
+
426
+ ### Example: Creator Dashboard with Real-Time Stats
427
+
428
+ ```typescript
429
+ // src/components/dashboard/CreatorStats.tsx
430
+ import { useQuery } from 'convex/react';
431
+ import { api } from '@/convex/_generated/api';
432
+ import { Card, CardHeader, CardTitle, CardContent } from '@/components/ui/card';
433
+ import type { Id } from '@/convex/_generated/dataModel';
434
+
435
+ interface CreatorStatsProps {
436
+ creatorId: Id<'entities'>;
437
+ }
438
+
439
+ /**
440
+ * Dashboard with live stats
441
+ * Pure Convex hooks - no API calls needed!
442
+ */
443
+ export function CreatorStats({ creatorId }: CreatorStatsProps) {
444
+ // Real-time stats via Convex query
445
+ const stats = useQuery(api.queries.dashboard.getCreatorStats, { creatorId });
446
+
447
+ // Real-time content list
448
+ const content = useQuery(api.queries.content.listByCreator, { creatorId });
449
+
450
+ // Real-time revenue events
451
+ const revenue = useQuery(api.queries.events.getRevenueTotal, { creatorId });
452
+
453
+ if (!stats) {
454
+ return <div>Loading...</div>;
455
+ }
456
+
457
+ return (
458
+ <div className="grid grid-cols-1 md:grid-cols-3 gap-4">
459
+ <Card>
460
+ <CardHeader>
461
+ <CardTitle>Total Revenue</CardTitle>
462
+ </CardHeader>
463
+ <CardContent>
464
+ <p className="text-3xl font-bold">${revenue?.total || 0}</p>
465
+ </CardContent>
466
+ </Card>
467
+
468
+ <Card>
469
+ <CardHeader>
470
+ <CardTitle>Content Pieces</CardTitle>
471
+ </CardHeader>
472
+ <CardContent>
473
+ <p className="text-3xl font-bold">{content?.length || 0}</p>
474
+ </CardContent>
475
+ </Card>
476
+
477
+ <Card>
478
+ <CardHeader>
479
+ <CardTitle>Audience Members</CardTitle>
480
+ </CardHeader>
481
+ <CardContent>
482
+ <p className="text-3xl font-bold">{stats.audienceCount}</p>
483
+ </CardContent>
484
+ </Card>
485
+ </div>
486
+ );
487
+ }
488
+ ```
489
+
490
+ ### Example: Agent Creation with Hono API
491
+
492
+ ```typescript
493
+ // src/components/features/agents/CreateAgent.tsx
494
+ import { useState } from 'react';
495
+ import { api } from '@/lib/api';
496
+ import { Button } from '@/components/ui/button';
497
+ import { Input } from '@/components/ui/input';
498
+ import { Label } from '@/components/ui/label';
499
+ import { Textarea } from '@/components/ui/textarea';
500
+ import { useToast } from '@/hooks/use-toast';
501
+
502
+ /**
503
+ * Agent creation form
504
+ * Uses Hono API for complex business logic
505
+ */
506
+ export function CreateAgent() {
507
+ const { toast } = useToast();
508
+ const [loading, setLoading] = useState(false);
509
+ const [formData, setFormData] = useState({
510
+ name: '',
511
+ description: '',
512
+ personality: '',
513
+ model: 'gpt-4',
514
+ });
515
+
516
+ const handleSubmit = async (e: React.FormEvent) => {
517
+ e.preventDefault();
518
+ setLoading(true);
519
+
520
+ try {
521
+ // Call Hono API for complex validation + creation
522
+ const result = await api.createAgent(formData);
523
+
524
+ if (result.error) {
525
+ throw new Error(result.error);
526
+ }
527
+
528
+ toast({
529
+ title: 'Agent Created!',
530
+ description: `${formData.name} is ready to go`,
531
+ });
532
+
533
+ // Redirect to agent page
534
+ window.location.href = `/agents/${result.id}`;
535
+ } catch (error: any) {
536
+ toast({
537
+ title: 'Error',
538
+ description: error.message,
539
+ variant: 'destructive',
540
+ });
541
+ } finally {
542
+ setLoading(false);
543
+ }
544
+ };
545
+
546
+ return (
547
+ <form onSubmit={handleSubmit} className="space-y-4">
548
+ <div>
549
+ <Label htmlFor="name">Agent Name</Label>
550
+ <Input
551
+ id="name"
552
+ value={formData.name}
553
+ onChange={(e) => setFormData({ ...formData, name: e.target.value })}
554
+ required
555
+ />
556
+ </div>
557
+
558
+ <div>
559
+ <Label htmlFor="description">Description</Label>
560
+ <Textarea
561
+ id="description"
562
+ value={formData.description}
563
+ onChange={(e) => setFormData({ ...formData, description: e.target.value })}
564
+ required
565
+ />
566
+ </div>
567
+
568
+ <Button type="submit" disabled={loading}>
569
+ {loading ? 'Creating...' : 'Create Agent'}
570
+ </Button>
571
+ </form>
572
+ );
573
+ }
574
+ ```
575
+
576
+ ## File Structure
577
+
578
+ ```
579
+ src/
580
+ ├── pages/ # File-based routing
581
+ │ ├── index.astro # Homepage
582
+ │ ├── blog/
583
+ │ │ ├── index.astro # Blog listing
584
+ │ │ └── [...slug].astro # Dynamic blog posts
585
+ │ ├── docs/
586
+ │ │ └── [...slug].astro # Documentation pages
587
+ │ ├── dashboard/
588
+ │ │ ├── index.astro # Dashboard home
589
+ │ │ ├── content.astro # Content management
590
+ │ │ ├── tokens.astro # Token management
591
+ │ │ └── agents.astro # Agent management
592
+ │ ├── auth/
593
+ │ │ ├── signin.astro # Sign in page
594
+ │ │ ├── signup.astro # Sign up page
595
+ │ │ └── reset.astro # Password reset
596
+ │ ├── rss.xml.ts # RSS feed generator
597
+ │ └── 404.astro # 404 error page
598
+ │
599
+ ├── content/ # Content collections
600
+ │ ├── config.ts # Collection schemas
601
+ │ ├── blog/ # Blog posts (markdown)
602
+ │ │ ├── getting-started.md
603
+ │ │ └── advanced-patterns.md
604
+ │ ├── authors/ # Author data (JSON)
605
+ │ │ └── john-doe.json
606
+ │ └── docs/ # Documentation (markdown)
607
+ │ ├── introduction.md
608
+ │ └── api-reference.md
609
+ │
610
+ ├── components/ # React components
611
+ │ ├── features/ # Feature-specific components
612
+ │ │ ├── tokens/
613
+ │ │ │ ├── TokenPurchase.tsx
614
+ │ │ │ ├── TokenBalance.tsx
615
+ │ │ │ └── TokenList.tsx
616
+ │ │ ├── agents/
617
+ │ │ │ ├── CreateAgent.tsx
618
+ │ │ │ ├── AgentCard.tsx
619
+ │ │ │ └── AgentList.tsx
620
+ │ │ ├── content/
621
+ │ │ │ ├── ContentEditor.tsx
622
+ │ │ │ ├── ContentCard.tsx
623
+ │ │ │ └── ContentList.tsx
624
+ │ │ └── dashboard/
625
+ │ │ ├── CreatorStats.tsx
626
+ │ │ ├── RevenueChart.tsx
627
+ │ │ └── ActivityFeed.tsx
628
+ │ │
629
+ │ ├── ui/ # shadcn/ui components
630
+ │ │ ├── button.tsx
631
+ │ │ ├── card.tsx
632
+ │ │ ├── dialog.tsx
633
+ │ │ ├── input.tsx
634
+ │ │ └── ... (50+ components)
635
+ │ │
636
+ │ ├── layout/ # Layout components
637
+ │ │ ├── Sidebar.tsx
638
+ │ │ ├── Header.tsx
639
+ │ │ └── Footer.tsx
640
+ │ │
641
+ │ └── shared/ # Shared components
642
+ │ ├── BlogSearch.tsx
643
+ │ ├── TableOfContents.tsx
644
+ │ ├── ShareButtons.tsx
645
+ │ └── ErrorBoundary.tsx
646
+ │
647
+ ├── layouts/ # Astro layouts
648
+ │ ├── Layout.astro # Base layout
649
+ │ ├── Blog.astro # Blog post layout
650
+ │ └── Docs.astro # Documentation layout
651
+ │
652
+ ├── lib/ # Utilities
653
+ │ ├── api.ts # Hono API client
654
+ │ ├── utils.ts # General utilities
655
+ │ └── reading-time.ts # Reading time calculator
656
+ │
657
+ ├── hooks/ # React hooks
658
+ │ ├── use-toast.tsx # Toast notifications
659
+ │ ├── use-theme.tsx # Dark mode
660
+ │ └── use-auth.tsx # Authentication
661
+ │
662
+ ├── stores/ # Nanostores
663
+ │ ├── layout.ts # Layout state
664
+ │ └── auth.ts # Auth state
665
+ │
666
+ ├── styles/ # Global styles
667
+ │ └── global.css # Tailwind v4 config + custom CSS
668
+ │
669
+ └── config/ # Configuration
670
+ └── site.ts # Site configuration
671
+ ```
672
+
673
+ ## Astro Page Patterns
674
+
675
+ ### Pattern 1: Static Page with Content Collection
676
+
677
+ ```astro
678
+ ---
679
+ // src/pages/blog/index.astro
680
+ import { getCollection } from 'astro:content';
681
+ import Layout from '@/layouts/Layout.astro';
682
+ import BlogSearch from '@/components/shared/BlogSearch';
683
+
684
+ const posts = await getCollection('blog', ({ data }) => !data.draft);
685
+ const sortedPosts = posts.sort((a, b) =>
686
+ b.data.date.getTime() - a.data.date.getTime()
687
+ );
688
+ ---
689
+
690
+ <Layout title="Blog">
691
+ <div class="container py-8">
692
+ <h1 class="text-4xl font-bold mb-8">Blog</h1>
693
+
694
+ {/* Interactive search component */}
695
+ <BlogSearch client:load posts={sortedPosts} />
696
+
697
+ {/* Static list of posts */}
698
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 mt-8">
699
+ {sortedPosts.map(post => (
700
+ <article class="border rounded-lg p-6">
701
+ <h2 class="text-2xl font-semibold mb-2">
702
+ <a href={`/blog/${post.slug}`}>{post.data.title}</a>
703
+ </h2>
704
+ <p class="text-muted-foreground mb-4">{post.data.description}</p>
705
+ <time class="text-sm">{post.data.date.toLocaleDateString()}</time>
706
+ </article>
707
+ ))}
708
+ </div>
709
+ </div>
710
+ </Layout>
711
+ ```
712
+
713
+ ### Pattern 2: Dynamic Page with SSR Data
714
+
715
+ ```astro
716
+ ---
717
+ // src/pages/dashboard/index.astro
718
+ import { ConvexHttpClient } from 'convex/browser';
719
+ import { api } from '@/convex/_generated/api';
720
+ import Layout from '@/layouts/Layout.astro';
721
+ import CreatorStats from '@/components/dashboard/CreatorStats';
722
+
723
+ // SSR: Fetch user session via Hono API
724
+ const sessionRes = await fetch(`${import.meta.env.PUBLIC_API_URL}/api/auth/session`, {
725
+ headers: {
726
+ cookie: Astro.request.headers.get('cookie') || '',
727
+ },
728
+ });
729
+
730
+ const session = await sessionRes.json();
731
+
732
+ if (!session?.user) {
733
+ return Astro.redirect('/auth/signin');
734
+ }
735
+
736
+ // SSR: Fetch initial data via Convex
737
+ const convex = new ConvexHttpClient(import.meta.env.PUBLIC_CONVEX_URL);
738
+ const user = await convex.query(api.queries.entities.get, { id: session.user.id });
739
+ ---
740
+
741
+ <Layout title="Dashboard">
742
+ <div class="container py-8">
743
+ <h1 class="text-4xl font-bold mb-8">Welcome, {user.name}!</h1>
744
+
745
+ {/* Real-time stats component */}
746
+ <CreatorStats client:load creatorId={session.user.id} />
747
+ </div>
748
+ </Layout>
749
+ ```
750
+
751
+ ### Pattern 3: Content Page with References
752
+
753
+ ```astro
754
+ ---
755
+ // src/pages/blog/[...slug].astro
756
+ import { getEntry, getEntries, type CollectionEntry } from 'astro:content';
757
+ import Blog from '@/layouts/Blog.astro';
758
+ import TableOfContents from '@/components/shared/TableOfContents';
759
+ import ShareButtons from '@/components/shared/ShareButtons';
760
+
761
+ export async function getStaticPaths() {
762
+ const posts = await getCollection('blog');
763
+ return posts.map(post => ({
764
+ params: { slug: post.slug },
765
+ props: { post },
766
+ }));
767
+ }
768
+
769
+ type Props = { post: CollectionEntry<'blog'> };
770
+
771
+ const { post } = Astro.props;
772
+ const { Content, headings } = await post.render();
773
+
774
+ // Get referenced author
775
+ const author = await getEntry(post.data.author);
776
+
777
+ // Get related posts
778
+ const relatedPosts = post.data.relatedPosts
779
+ ? await getEntries(post.data.relatedPosts)
780
+ : [];
781
+ ---
782
+
783
+ <Blog title={post.data.title} description={post.data.description}>
784
+ <article class="max-w-3xl mx-auto">
785
+ <header class="mb-8">
786
+ <h1 class="text-5xl font-bold mb-4">{post.data.title}</h1>
787
+
788
+ {/* Author info */}
789
+ <div class="flex items-center gap-4 mb-4">
790
+ <img src={author.data.avatar} alt={author.data.name} class="w-12 h-12 rounded-full" />
791
+ <div>
792
+ <p class="font-semibold">{author.data.name}</p>
793
+ <time>{post.data.date.toLocaleDateString()}</time>
794
+ </div>
795
+ </div>
796
+
797
+ {/* Share buttons */}
798
+ <ShareButtons client:load title={post.data.title} />
799
+ </header>
800
+
801
+ {/* Table of contents */}
802
+ <aside class="lg:fixed lg:top-24 lg:right-8 lg:w-64">
803
+ <TableOfContents client:load headings={headings} />
804
+ </aside>
805
+
806
+ {/* Rendered content */}
807
+ <div class="prose dark:prose-invert max-w-none">
808
+ <Content />
809
+ </div>
810
+
811
+ {/* Related posts */}
812
+ {relatedPosts.length > 0 && (
813
+ <aside class="mt-12 border-t pt-8">
814
+ <h3 class="text-2xl font-bold mb-4">Related Posts</h3>
815
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
816
+ {relatedPosts.map(related => (
817
+ <a href={`/blog/${related.slug}`} class="border rounded-lg p-4 hover:bg-muted">
818
+ <h4 class="font-semibold">{related.data.title}</h4>
819
+ <p class="text-sm text-muted-foreground mt-2">{related.data.description}</p>
820
+ </a>
821
+ ))}
822
+ </div>
823
+ </aside>
824
+ )}
825
+ </article>
826
+ </Blog>
827
+ ```
828
+
829
+ ## Integration with 6-Dimension Ontology
830
+
831
+ The frontend integrates seamlessly with the ontology through Convex hooks and Hono API:
832
+
833
+ ### Entities (User-Facing Data)
834
+
835
+ ```typescript
836
+ // Query entities via Convex
837
+ const token = useQuery(api.queries.entities.get, { id: tokenId });
838
+ const agent = useQuery(api.queries.entities.get, { id: agentId });
839
+ const user = useQuery(api.queries.entities.get, { id: userId });
840
+
841
+ // Create entities via Hono API
842
+ await honoApi.createAgent({ name, description });
843
+ await honoApi.createContent({ title, body });
844
+ ```
845
+
846
+ ### Connections (Relationships)
847
+
848
+ ```typescript
849
+ // Query connections
850
+ const userTokens = useQuery(api.queries.connections.list, {
851
+ fromEntityId: userId,
852
+ relationshipType: 'holds_tokens',
853
+ });
854
+
855
+ const creatorContent = useQuery(api.queries.connections.list, {
856
+ fromEntityId: creatorId,
857
+ relationshipType: 'authored',
858
+ });
859
+ ```
860
+
861
+ ### Events (Activity Feed)
862
+
863
+ ```typescript
864
+ // Real-time activity feed
865
+ const recentEvents = useQuery(api.queries.events.recent, {
866
+ entityId: userId,
867
+ limit: 10,
868
+ });
869
+
870
+ // Revenue events
871
+ const revenueEvents = useQuery(api.queries.events.list, {
872
+ actorId: creatorId,
873
+ eventType: 'payment_received',
874
+ });
875
+ ```
876
+
877
+ ### Tags (Categorization)
878
+
879
+ ```typescript
880
+ // Query by tags
881
+ const taggedContent = useQuery(api.queries.tags.getEntitiesByTag, {
882
+ tagName: 'tutorial',
883
+ entityType: 'content',
884
+ });
885
+ ```
886
+
887
+ ## "Vibe Code" Workflow
888
+
889
+ The frontend is designed for rapid prototyping and customization:
890
+
891
+ ### Step 1: Design UI Mockup
892
+ ```
893
+ User sketches dashboard layout
894
+ → Identifies data needs (revenue, content count, etc.)
895
+ ```
896
+
897
+ ### Step 2: Write Astro Page
898
+ ```astro
899
+ ---
900
+ // src/pages/dashboard/custom.astro
901
+ import Layout from '@/layouts/Layout.astro';
902
+ import CustomDashboard from '@/components/custom/Dashboard';
903
+ ---
904
+
905
+ <Layout>
906
+ <CustomDashboard client:load />
907
+ </Layout>
908
+ ```
909
+
910
+ ### Step 3: Build React Component with Convex
911
+ ```typescript
912
+ // src/components/custom/Dashboard.tsx
913
+ import { useQuery } from 'convex/react';
914
+ import { api } from '@/convex/_generated/api';
915
+
916
+ export function CustomDashboard() {
917
+ const stats = useQuery(api.queries.dashboard.getStats);
918
+
919
+ return (
920
+ <div className="grid grid-cols-3 gap-4">
921
+ {/* Live data - no backend changes needed! */}
922
+ <Card>Revenue: ${stats?.revenue}</Card>
923
+ <Card>Content: {stats?.contentCount}</Card>
924
+ <Card>Audience: {stats?.audienceCount}</Card>
925
+ </div>
926
+ );
927
+ }
928
+ ```
929
+
930
+ ### Step 4: Deploy
931
+ ```bash
932
+ bun run build
933
+ wrangler pages deploy dist
934
+ ```
935
+
936
+ **Result:** Custom frontend deployed in minutes while backend remains stable!
937
+
938
+ ## When to Use What
939
+
940
+ ### Use Astro Pages For:
941
+ - Static content (blog, docs, marketing)
942
+ - SSR data fetching (initial page load)
943
+ - SEO-critical pages
944
+ - File-based routing
945
+
946
+ ### Use React Components For:
947
+ - Interactive features (forms, charts, real-time updates)
948
+ - Stateful UI (modals, dropdowns, tabs)
949
+ - Convex hooks (live data)
950
+ - Reusable widgets
951
+
952
+ ### Use Content Collections For:
953
+ - Blog posts
954
+ - Documentation
955
+ - Marketing pages
956
+ - Any structured content with frontmatter
957
+
958
+ ### Use Convex Hooks For:
959
+ - Real-time data
960
+ - Live subscriptions
961
+ - Dashboard stats
962
+ - Activity feeds
963
+
964
+ ### Use Hono API For:
965
+ - Authentication
966
+ - Complex business logic
967
+ - Payment processing
968
+ - External API integrations
969
+
970
+ ## Performance Best Practices
971
+
972
+ 1. **Minimize `client:load`**: Only add to truly interactive components
973
+ 2. **Use Content Collections**: Type-safe, optimized content
974
+ 3. **SSR for Initial Data**: Fetch critical data server-side
975
+ 4. **Static Generation**: Pre-render pages when possible
976
+ 5. **Image Optimization**: Use Astro's `<Image>` component
977
+ 6. **Code Splitting**: React components are auto-split
978
+ 7. **Convex Subscriptions**: Efficient WebSocket-based updates
979
+
980
+ ## Development Commands
981
+
982
+ ```bash
983
+ # Start dev server (localhost:4321)
984
+ bun run dev
985
+
986
+ # Build for production
987
+ bun run build
988
+
989
+ # Preview production build
990
+ bun run preview
991
+
992
+ # TypeScript checking
993
+ bunx astro check
994
+
995
+ # Generate content types
996
+ bunx astro sync
997
+ ```
998
+
999
+ ## Deployment to Cloudflare Pages
1000
+
1001
+ ### Build Configuration
1002
+
1003
+ ```javascript
1004
+ // astro.config.mjs
1005
+ export default defineConfig({
1006
+ output: 'server',
1007
+ adapter: cloudflare({
1008
+ platformProxy: { enabled: true },
1009
+ }),
1010
+ vite: {
1011
+ resolve: {
1012
+ alias: {
1013
+ 'react-dom/server': 'react-dom/server.edge', // React 19 edge compatibility
1014
+ },
1015
+ },
1016
+ },
1017
+ });
1018
+ ```
1019
+
1020
+ ### Deploy Commands
1021
+
1022
+ ```bash
1023
+ # Build
1024
+ bun run build
1025
+
1026
+ # Deploy
1027
+ wrangler pages deploy dist --project-name=one-platform
1028
+ ```
1029
+
1030
+ ## Next Steps
1031
+
1032
+ 1. **Read Content Collections Docs**: Understand schema patterns
1033
+ 2. **Explore shadcn/ui**: Learn available components
1034
+ 3. **Study Dual Integration**: Master Hono + Convex pattern
1035
+ 4. **Practice "Vibe Code"**: Build features rapidly with hooks
1036
+ 5. **Customize Frontend**: Make it your own!
1037
+
1038
+ **Result:** A high-performance, developer-friendly frontend that scales with your platform while remaining easy to customize and extend.