oneie 2.0.1 → 2.0.3
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/AGENTS.md +245 -0
- package/CLAUDE.md +534 -0
- package/README.md +61 -4
- package/one/.obsidian/app.json +1 -0
- package/one/.obsidian/appearance.json +1 -0
- package/one/.obsidian/core-plugins.json +33 -0
- package/one/.obsidian/workspace.json +211 -0
- package/one/connections/a2a.md +551 -0
- package/one/connections/acp.md +761 -0
- package/one/connections/acps.md +731 -0
- package/one/connections/agui.md +767 -0
- package/one/connections/any-backend.md +1702 -0
- package/one/connections/ap2.md +998 -0
- package/one/connections/api-docs.md +1891 -0
- package/one/connections/api.md +2190 -0
- package/one/connections/architecture-diagram.md +94 -0
- package/one/connections/communications.md +449 -0
- package/one/connections/connections.md +339 -0
- package/one/connections/cryptonetworks.md +781 -0
- package/one/connections/documentation.md +1120 -0
- package/one/connections/effect.md +279 -0
- package/one/connections/elizaos.md +1290 -0
- package/one/connections/inference.md +58 -0
- package/one/connections/kyc.md +632 -0
- package/one/connections/mcp.md +842 -0
- package/one/connections/membership.md +1152 -0
- package/one/connections/middleware.md +1067 -0
- package/one/connections/multitenant.md +1341 -0
- package/one/connections/n8n.md +1015 -0
- package/one/connections/patterns.md +89 -0
- package/one/connections/protocols.md +279 -0
- package/one/connections/relationships.md +107 -0
- package/one/connections/schema.md +587 -0
- package/one/connections/service-layer.md +550 -0
- package/one/connections/structure.md +0 -0
- package/one/connections/vectors.md +207 -0
- package/one/connections/wordpress.md +1302 -0
- package/one/connections/workflow-copy.md +905 -0
- package/one/connections/workflow-examples.md +741 -0
- package/one/connections/workflow.md +905 -0
- package/one/connections/workflows/delegation.md +885 -0
- package/one/connections/workflows/frontend.md +1037 -0
- package/one/connections/workflows/strategy.md +903 -0
- package/one/connections/workflows/tasks.md +698 -0
- package/one/connections/x402.md +1249 -0
- package/one/events/events.md +545 -0
- package/one/knowledge/ai-platform.md +305 -0
- package/one/knowledge/architecture-diagram.md +94 -0
- package/one/knowledge/architecture-frontend.md +930 -0
- package/one/knowledge/architecture.md +2077 -0
- package/one/knowledge/crypto.md +960 -0
- package/one/knowledge/dsl.md +1660 -0
- package/one/knowledge/files.md +2471 -0
- package/one/knowledge/frontend.md +1038 -0
- package/one/knowledge/hono.md +2109 -0
- package/one/knowledge/implementation-examples.md +2536 -0
- package/one/knowledge/inference-score.md +159 -0
- package/one/knowledge/knowledge.md +642 -0
- package/one/knowledge/language.md +980 -0
- package/one/knowledge/lessons-learned.md +70 -0
- package/one/knowledge/ontology-6-dimensions.md +0 -0
- package/one/knowledge/ontology-documentation.md +356 -0
- package/one/knowledge/ontology-engineering-specification.md +1292 -0
- package/one/knowledge/ontology-engineering.md +1652 -0
- package/one/knowledge/ontology-frontend-copy-2.md +1492 -0
- package/one/knowledge/ontology-frontend-copy.md +753 -0
- package/one/knowledge/ontology-frontend-specifications.md +2188 -0
- package/one/knowledge/ontology-frontend.md +2427 -0
- package/one/knowledge/ontology-minimal.yaml +299 -0
- package/one/knowledge/ontology.md +2819 -0
- package/one/knowledge/ontology.yaml +1165 -0
- package/one/knowledge/patterns/backend/convex-mutation-pattern.md +100 -0
- package/one/knowledge/patterns/backend/convex-query-pattern.md +88 -0
- package/one/knowledge/patterns/backend/mutation-template.md +231 -0
- package/one/knowledge/patterns/backend/query-template.md +267 -0
- package/one/knowledge/patterns/backend/service-template.md +237 -0
- package/one/knowledge/patterns/design/component-architecture.md +399 -0
- package/one/knowledge/patterns/design/test-driven-design-pattern.md +162 -0
- package/one/knowledge/patterns/design/wireframe-template.md +216 -0
- package/one/knowledge/patterns/frontend/component-template.md +195 -0
- package/one/knowledge/patterns/frontend/form-template.md +276 -0
- package/one/knowledge/patterns/frontend/page-template.md +178 -0
- package/one/knowledge/patterns/frontend/react-component-pattern.md +128 -0
- package/one/knowledge/patterns/test/acceptance-criteria-template.md +378 -0
- package/one/knowledge/patterns/test/technical-test-template.md +544 -0
- package/one/knowledge/patterns/test/test-driven-pattern.md +140 -0
- package/one/knowledge/patterns/test/user-flow-template.md +254 -0
- package/one/knowledge/quality-loop.md +401 -0
- package/one/knowledge/readme.md +131 -0
- package/one/knowledge/rules.md +626 -0
- package/one/knowledge/score.md +67 -0
- package/one/knowledge/specifications.md +855 -0
- package/one/knowledge/tags.md +130 -0
- package/one/organisation/one.md +599 -0
- package/one/organisation/organisation.md +438 -0
- package/one/organisation/revenue.md +673 -0
- package/one/organisation/strategy.md +869 -0
- package/one/organisation/vision.md +98 -0
- package/one/people/anthony-o-connell.md +440 -0
- package/one/people/people.md +567 -0
- package/one/repomix-output.md +92634 -0
- package/one/things/agentkit.md +349 -0
- package/one/things/agents/agent-backend.md +1401 -0
- package/one/things/agents/agent-builder.md +955 -0
- package/one/things/agents/agent-clean.md +709 -0
- package/one/things/agents/agent-clone.md +1341 -0
- package/one/things/agents/agent-designer.md +2177 -0
- package/one/things/agents/agent-director.md +1508 -0
- package/one/things/agents/agent-documenter.md +1049 -0
- package/one/things/agents/agent-frontend.md +1119 -0
- package/one/things/agents/agent-integrator.md +1192 -0
- package/one/things/agents/agent-problem-solver.md +1379 -0
- package/one/things/agents/agent-quality.md +1353 -0
- package/one/things/agents/agent-sales.md +986 -0
- package/one/things/cascade/cascade.yaml +464 -0
- package/one/things/cascade/docs/examples/1-1-agent-prompts/design.md +470 -0
- package/one/things/cascade/docs/examples/1-1-agent-prompts/tests.md +264 -0
- package/one/things/cascade/docs/examples/1-1-agent-prompts.md +486 -0
- package/one/things/cascade/docs/examples/1-2-yaml-orchestrator/design.md +497 -0
- package/one/things/cascade/docs/examples/1-2-yaml-orchestrator/tests.md +227 -0
- package/one/things/cascade/docs/examples/1-2-yaml-orchestrator.md +516 -0
- package/one/things/cascade/docs/examples/1-3-event-coordination/design.md +544 -0
- package/one/things/cascade/docs/examples/1-3-event-coordination/tests.md +223 -0
- package/one/things/cascade/docs/examples/1-3-event-coordination.md +508 -0
- package/one/things/cascade/docs/examples/1-4-knowledge-management/design.md +609 -0
- package/one/things/cascade/docs/examples/1-4-knowledge-management/tests.md +195 -0
- package/one/things/cascade/docs/examples/1-4-knowledge-management.md +577 -0
- package/one/things/cascade/docs/examples/1-5-quality-loops/design.md +797 -0
- package/one/things/cascade/docs/examples/1-5-quality-loops/tests.md +212 -0
- package/one/things/cascade/docs/examples/1-5-quality-loops.md +641 -0
- package/one/things/cascade/docs/examples/1-6-numbering-structure/design.md +610 -0
- package/one/things/cascade/docs/examples/1-6-numbering-structure/tests.md +213 -0
- package/one/things/cascade/docs/examples/1-6-numbering-structure.md +575 -0
- package/one/things/cascade/docs/examples/readme.md +222 -0
- package/one/things/cascade/docs/getting-started.md +515 -0
- package/one/things/cascade/docs/workflow.md +1372 -0
- package/one/things/cascade/readme.md +336 -0
- package/one/things/cascade/templates/feature-template.md +267 -0
- package/one/things/claude/agents/advocacy-activation-manager.md +685 -0
- package/one/things/claude/agents/advocacy-campaign-designer.md +663 -0
- package/one/things/claude/agents/analyst.md +483 -0
- package/one/things/claude/agents/architect.md +480 -0
- package/one/things/claude/agents/brand-identity-specialist.md +513 -0
- package/one/things/claude/agents/bstp-token-strategist.md +667 -0
- package/one/things/claude/agents/builder-repo.md +489 -0
- package/one/things/claude/agents/bullstamp-community-builder.md +574 -0
- package/one/things/claude/agents/bullstamp-marketing-orchestrator.md +506 -0
- package/one/things/claude/agents/bulltilt-platform-growth.md +567 -0
- package/one/things/claude/agents/company-bullstamp-character.md +587 -0
- package/one/things/claude/agents/company-bullstamp-community.md +292 -0
- package/one/things/claude/agents/company-bullstamp-marketing.md +292 -0
- package/one/things/claude/agents/company-bullstamp-token.md +292 -0
- package/one/things/claude/agents/company-bulltilt-growth.md +292 -0
- package/one/things/claude/agents/content-bibliography-formatter.md +381 -0
- package/one/things/claude/agents/content-calendar-planner.md +448 -0
- package/one/things/claude/agents/content-chapter-formatter.md +488 -0
- package/one/things/claude/agents/content-formatter.md +546 -0
- package/one/things/claude/agents/content-hook-specialist.md +462 -0
- package/one/things/claude/agents/content-image-formatter.md +535 -0
- package/one/things/claude/agents/content-introduction-formatter.md +485 -0
- package/one/things/claude/agents/content-multiplication-engine.md +556 -0
- package/one/things/claude/agents/content-playbook-writer.md +448 -0
- package/one/things/claude/agents/content-team-manager.md +622 -0
- package/one/things/claude/agents/content-toc-formatter.md +522 -0
- package/one/things/claude/agents/convex-backend-specialist.md +2561 -0
- package/one/things/claude/agents/core-manager.md +582 -0
- package/one/things/claude/agents/core-master.md +403 -0
- package/one/things/claude/agents/cross-functional-manager.md +471 -0
- package/one/things/claude/agents/crypto-airdrop-strategist.md +602 -0
- package/one/things/claude/agents/crypto-analytics-educator.md +553 -0
- package/one/things/claude/agents/crypto-architecture-specialist.md +466 -0
- package/one/things/claude/agents/crypto-community-analyst.md +298 -0
- package/one/things/claude/agents/crypto-community-psychologist.md +509 -0
- package/one/things/claude/agents/crypto-dex-optimization-expert.md +538 -0
- package/one/things/claude/agents/crypto-dex-optimizer.md +292 -0
- package/one/things/claude/agents/crypto-diamond-formation-specialist.md +513 -0
- package/one/things/claude/agents/crypto-diamond-hands.md +292 -0
- package/one/things/claude/agents/crypto-ecosystem-expansion-manager.md +554 -0
- package/one/things/claude/agents/crypto-engagement-specialist.md +540 -0
- package/one/things/claude/agents/crypto-market-researcher.md +292 -0
- package/one/things/claude/agents/crypto-marketing-orchestrator.md +523 -0
- package/one/things/claude/agents/crypto-network-effect-amplifier.md +569 -0
- package/one/things/claude/agents/crypto-optimization-analyst.md +554 -0
- package/one/things/claude/agents/crypto-strategic-synthesizer.md +517 -0
- package/one/things/claude/agents/crypto-team-manager.md +387 -0
- package/one/things/claude/agents/crypto-token-analyst.md +278 -0
- package/one/things/claude/agents/crypto-viral-content-creator.md +546 -0
- package/one/things/claude/agents/crypto-wallet-identification-expert.md +517 -0
- package/one/things/claude/agents/crypto-wallet-identifier.md +292 -0
- package/one/things/claude/agents/customer-journey-designer.md +481 -0
- package/one/things/claude/agents/customer-success-manager.md +581 -0
- package/one/things/claude/agents/dev.md +413 -0
- package/one/things/claude/agents/documenter.md +546 -0
- package/one/things/claude/agents/elevate-marketing-orchestrator.md +410 -0
- package/one/things/claude/agents/engagement-specialist.md +509 -0
- package/one/things/claude/agents/engineering-architect.md +387 -0
- package/one/things/claude/agents/engineering-business-analyst.md +537 -0
- package/one/things/claude/agents/engineering-developer.md +387 -0
- package/one/things/claude/agents/engineering-director.md +282 -0
- package/one/things/claude/agents/engineering-ingestor.md +649 -0
- package/one/things/claude/agents/engineering-product-manager.md +537 -0
- package/one/things/claude/agents/engineering-product-owner.md +537 -0
- package/one/things/claude/agents/engineering-project-coordinator.md +537 -0
- package/one/things/claude/agents/engineering-quality-assurance.md +393 -0
- package/one/things/claude/agents/engineering-team-manager.md +512 -0
- package/one/things/claude/agents/engineering-user-experience.md +387 -0
- package/one/things/claude/agents/framework-elevate-manager.md +294 -0
- package/one/things/claude/agents/improver.md +763 -0
- package/one/things/claude/agents/intelligence-team-manager.md +385 -0
- package/one/things/claude/agents/lead-capture-expert.md +466 -0
- package/one/things/claude/agents/lead-magnet-creator.md +453 -0
- package/one/things/claude/agents/market-research-analyst.md +412 -0
- package/one/things/claude/agents/marketing-brand-identity.md +314 -0
- package/one/things/claude/agents/marketing-content-hooks.md +450 -0
- package/one/things/claude/agents/marketing-content-multiplier.md +326 -0
- package/one/things/claude/agents/marketing-content-poster.md +361 -0
- package/one/things/claude/agents/marketing-customer-journey.md +326 -0
- package/one/things/claude/agents/marketing-director.md +397 -0
- package/one/things/claude/agents/marketing-engagement.md +326 -0
- package/one/things/claude/agents/marketing-lead-capture.md +326 -0
- package/one/things/claude/agents/marketing-lead-magnet.md +326 -0
- package/one/things/claude/agents/marketing-network-effects.md +326 -0
- package/one/things/claude/agents/marketing-nurture-campaigns.md +326 -0
- package/one/things/claude/agents/marketing-share-optimizer.md +326 -0
- package/one/things/claude/agents/marketing-team-manager.md +446 -0
- package/one/things/claude/agents/marketing-viral-growth.md +201 -0
- package/one/things/claude/agents/mission-commander.md +373 -0
- package/one/things/claude/agents/network-effect-analyst.md +587 -0
- package/one/things/claude/agents/nextjs-15-specialist.md +1547 -0
- package/one/things/claude/agents/npx.md +890 -0
- package/one/things/claude/agents/nurture-campaign-manager.md +531 -0
- package/one/things/claude/agents/one-master.md +355 -0
- package/one/things/claude/agents/one-orchestrator.md +315 -0
- package/one/things/claude/agents/one.md +601 -0
- package/one/things/claude/agents/playbook-generator.md +503 -0
- package/one/things/claude/agents/pm.md +326 -0
- package/one/things/claude/agents/po.md +345 -0
- package/one/things/claude/agents/qa.md +336 -0
- package/one/things/claude/agents/research-foundation-analyst.md +307 -0
- package/one/things/claude/agents/research-intelligence-gatherer.md +408 -0
- package/one/things/claude/agents/research-market-analyst.md +307 -0
- package/one/things/claude/agents/research-team-manager.md +482 -0
- package/one/things/claude/agents/sales-environment-optimizer.md +494 -0
- package/one/things/claude/agents/sales-team-manager.md +400 -0
- package/one/things/claude/agents/sales-upsell-strategist.md +307 -0
- package/one/things/claude/agents/service-advocacy-campaigns.md +307 -0
- package/one/things/claude/agents/service-advocacy-manager.md +307 -0
- package/one/things/claude/agents/service-success-manager.md +307 -0
- package/one/things/claude/agents/service-team-manager.md +400 -0
- package/one/things/claude/agents/shadcn-ui-design-system-specialist.md +2302 -0
- package/one/things/claude/agents/share-optimization-specialist.md +551 -0
- package/one/things/claude/agents/sm.md +327 -0
- package/one/things/claude/agents/story-teller.md +473 -0
- package/one/things/claude/agents/task-master.md +596 -0
- package/one/things/claude/agents/tauri-cross-platform-specialist.md +1827 -0
- package/one/things/claude/agents/tester.md +556 -0
- package/one/things/claude/agents/the-bull-character-manager.md +580 -0
- package/one/things/claude/agents/tools-playbook-generator.md +489 -0
- package/one/things/claude/agents/turbo-repo-builder.md +316 -0
- package/one/things/claude/agents/upsell-strategist.md +480 -0
- package/one/things/claude/agents/ux-expert.md +335 -0
- package/one/things/claude/agents/viral-growth-orchestrator.md +497 -0
- package/one/things/claude/claude-code-hooks-development.json +21 -0
- package/one/things/claude/claude-code-hooks-production.json +21 -0
- package/one/things/claude/claude-code-hooks.json +25 -0
- package/one/things/claude/commands/agent.md +104 -0
- package/one/things/claude/commands/cascade-status.md +128 -0
- package/one/things/claude/commands/ingest.md +290 -0
- package/one/things/claude/commands/ingestor.md +136 -0
- package/one/things/claude/commands/mission.md +83 -0
- package/one/things/claude/commands/npx.md +133 -0
- package/one/things/claude/commands/one.md +440 -0
- package/one/things/claude/commands/quality-check.md +204 -0
- package/one/things/claude/commands/smart-route.md +220 -0
- package/one/things/claude/commands/start.md +121 -0
- package/one/things/claude/commands/story.md +83 -0
- package/one/things/claude/commands/task.md +173 -0
- package/one/things/claude/hook-bypass.json +32 -0
- package/one/things/claude/hooks/agent-hook-config.json +427 -0
- package/one/things/claude/hooks/agent-hook-manager.js +525 -0
- package/one/things/claude/hooks/agent-load-balancer.js +271 -0
- package/one/things/claude/hooks/agent-request-interceptor.js +70 -0
- package/one/things/claude/hooks/build-hook.sh +156 -0
- package/one/things/claude/hooks/cascade-feedback.js +297 -0
- package/one/things/claude/hooks/cascade-integration-hooks.js +648 -0
- package/one/things/claude/hooks/cleanup-hook.sh +201 -0
- package/one/things/claude/hooks/continuous-improvement-monitor.js +510 -0
- package/one/things/claude/hooks/file-organization-engine.js +427 -0
- package/one/things/claude/hooks/file-organization-hook.sh +80 -0
- package/one/things/claude/hooks/file-organization-monitor.js +269 -0
- package/one/things/claude/hooks/format-hook.sh +43 -0
- package/one/things/claude/hooks/hook-bypass.sh +293 -0
- package/one/things/claude/hooks/hook-config-manager.js +202 -0
- package/one/things/claude/hooks/hook-debouncer.sh +62 -0
- package/one/things/claude/hooks/hook-logger.sh +89 -0
- package/one/things/claude/hooks/hook-orchestrator.js +662 -0
- package/one/things/claude/hooks/hook-performance-report.js +120 -0
- package/one/things/claude/hooks/lint-hook.sh +140 -0
- package/one/things/claude/hooks/mcp-cascade-integration.js +816 -0
- package/one/things/claude/hooks/memory-optimizer.js +510 -0
- package/one/things/claude/hooks/notification-hook.sh +204 -0
- package/one/things/claude/hooks/ontology-compliance.js +394 -0
- package/one/things/claude/hooks/ontology-hook-manager.js +316 -0
- package/one/things/claude/hooks/ontology-validation-engine.js +317 -0
- package/one/things/claude/hooks/ontology-validation-hook.sh +86 -0
- package/one/things/claude/hooks/performance-metrics.json +25 -0
- package/one/things/claude/hooks/performance-monitoring-hook.js +422 -0
- package/one/things/claude/hooks/quality-scoring-engine.js +834 -0
- package/one/things/claude/hooks/security-hook.sh +256 -0
- package/one/things/claude/hooks/simple-load-balancer.js +238 -0
- package/one/things/claude/hooks/startup-optimizer.js +625 -0
- package/one/things/claude/hooks/story-scoring-system.js +445 -0
- package/one/things/claude/hooks/story-validation-engine.js +473 -0
- package/one/things/claude/hooks/story-validation-hook-enhanced.sh +210 -0
- package/one/things/claude/hooks/story-validation-hook.sh +145 -0
- package/one/things/claude/hooks/structure-synchronizer.js +194 -0
- package/one/things/claude/hooks/sub-agent-output-validator.js +647 -0
- package/one/things/claude/hooks/sub-agent-validation-hook.js +343 -0
- package/one/things/claude/hooks/test-hook.sh +145 -0
- package/one/things/claude/hooks/test-story-validation.sh +170 -0
- package/one/things/claude/hooks/trinity-validation-system.js +392 -0
- package/one/things/claude/settings-local.json +86 -0
- package/one/things/cli-code.md +652 -0
- package/one/things/cli-compiler-code.md +652 -0
- package/one/things/cli.md +1045 -0
- package/one/things/components/card-shadcn.md +929 -0
- package/one/things/components/card.md +1050 -0
- package/one/things/components.md +1669 -0
- package/one/things/componets.md +4 -0
- package/one/things/copilotkit.md +1559 -0
- package/one/things/creator-diagram.md +166 -0
- package/one/things/examples/children/lemonade-stand.md +366 -0
- package/one/things/examples/enterprise/crm-saas.md +1429 -0
- package/one/things/features/1-1-agent-prompts/design.md +470 -0
- package/one/things/features/1-1-agent-prompts/tests.md +264 -0
- package/one/things/features/1-1-agent-prompts.md +486 -0
- package/one/things/features/1-2-yaml-orchestrator/design.md +497 -0
- package/one/things/features/1-2-yaml-orchestrator/tests.md +227 -0
- package/one/things/features/1-2-yaml-orchestrator.md +516 -0
- package/one/things/features/1-3-event-coordination/design.md +544 -0
- package/one/things/features/1-3-event-coordination/tests.md +223 -0
- package/one/things/features/1-3-event-coordination.md +508 -0
- package/one/things/features/1-4-knowledge-management/design.md +609 -0
- package/one/things/features/1-4-knowledge-management/tests.md +195 -0
- package/one/things/features/1-4-knowledge-management.md +577 -0
- package/one/things/features/1-5-quality-loops/design.md +797 -0
- package/one/things/features/1-5-quality-loops/tests.md +212 -0
- package/one/things/features/1-5-quality-loops.md +641 -0
- package/one/things/features/1-6-numbering-structure/design.md +610 -0
- package/one/things/features/1-6-numbering-structure/tests.md +213 -0
- package/one/things/features/1-6-numbering-structure.md +575 -0
- package/one/things/features/2-cli.md +1235 -0
- package/one/things/features/use-one-backend.md +1180 -0
- package/one/things/ideas/1-create-workflow.md +189 -0
- package/one/things/plans/1-create-workflow-status.md +555 -0
- package/one/things/plans/1-create-workflow.md +713 -0
- package/one/things/plans/app.md +761 -0
- package/one/things/plans/better-auth-any-backend-revised.md +1065 -0
- package/one/things/plans/better-auth-any-backend.md +1852 -0
- package/one/things/plans/better-auth-available-features.md +235 -0
- package/one/things/plans/big-plan.md +38 -0
- package/one/things/plans/convex-better-auth.md +1109 -0
- package/one/things/plans/convex-on-off.md +389 -0
- package/one/things/plans/desktop.md +1121 -0
- package/one/things/plans/effect-components.md +1669 -0
- package/one/things/plans/effect.md +973 -0
- package/one/things/plans/email.md +953 -0
- package/one/things/plans/enhance-auth.md +1669 -0
- package/one/things/plans/install-components.md +198 -0
- package/one/things/plans/landing.md +728 -0
- package/one/things/plans/layout.md +205 -0
- package/one/things/plans/mail-backend.md +1308 -0
- package/one/things/plans/mail.md +2624 -0
- package/one/things/plans/next-features.md +83 -0
- package/one/things/plans/one.md +658 -0
- package/one/things/plans/ontology-6-dimensions.md +2216 -0
- package/one/things/plans/ontology-driven-strategy.md +866 -0
- package/one/things/plans/ontology-ui-approach.md +357 -0
- package/one/things/plans/open-agent.md +785 -0
- package/one/things/plans/performace.md +90 -0
- package/one/things/plans/releases.md +809 -0
- package/one/things/plans/repos.md +76 -0
- package/one/things/plans/separate-copy-2.md +1293 -0
- package/one/things/plans/separate-copy-3.md +2458 -0
- package/one/things/plans/separate-copy.md +1293 -0
- package/one/things/plans/separate.md +1983 -0
- package/one/things/plans/shadcn-integration-summary.md +450 -0
- package/one/things/plans/sidebar.md +172 -0
- package/one/things/plans/small-fixes.md +5 -0
- package/one/things/plans/test-backend-connection.md +476 -0
- package/one/things/plans/workflow-files.md +1196 -0
- package/one/things/plans/workflow.md +1372 -0
- package/one/things/products/cascade-landing-page.md +737 -0
- package/one/things/products/cascade.md +1518 -0
- package/one/things/products/context-engineering.md +1427 -0
- package/one/things/products/onthology.md +0 -0
- package/one/things/products/ontology-ui-shadcn.md +1280 -0
- package/one/things/products/ontology-ui.md +1387 -0
- package/one/things/products/ontology.md +717 -0
- package/one/things/products/sdk.md +557 -0
- package/one/things/promptkit.md +903 -0
- package/one/things/service-providers-new.md +982 -0
- package/one/things/service-providers.md +1092 -0
- package/one/things/things.md +349 -0
- package/one/things/todo.md +1248 -0
- package/package.json +5 -2
|
@@ -0,0 +1,1065 @@
|
|
|
1
|
+
# Better Auth + Any Backend: Universal Authentication (REVISED)
|
|
2
|
+
|
|
3
|
+
**Based on Better Auth's actual adapter system**
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Executive Summary
|
|
8
|
+
|
|
9
|
+
Better Auth is framework-agnostic and supports ANY database through its adapter system. This revised plan shows how to integrate Better Auth with ONE's backend providers using Better Auth's native adapter pattern.
|
|
10
|
+
|
|
11
|
+
**Better Auth's Architecture:**
|
|
12
|
+
```
|
|
13
|
+
┌─────────────────────────────────────────────────────────┐
|
|
14
|
+
│ Better Auth Core │
|
|
15
|
+
│ - Authentication logic │
|
|
16
|
+
│ - Session management │
|
|
17
|
+
│ - OAuth providers │
|
|
18
|
+
│ - 2FA, passkeys, etc. │
|
|
19
|
+
└────────────────┬────────────────────────────────────────┘
|
|
20
|
+
│ Adapter Interface
|
|
21
|
+
│ (create, update, findOne, etc.)
|
|
22
|
+
↓
|
|
23
|
+
┌─────────────────────────────────────────────────────────┐
|
|
24
|
+
│ Database Adapters │
|
|
25
|
+
│ - drizzleAdapter (SQLite, PostgreSQL, MySQL) │
|
|
26
|
+
│ - prismaAdapter (all Prisma DBs) │
|
|
27
|
+
│ - mongodbAdapter (MongoDB) │
|
|
28
|
+
│ - kyselyAdapter (any SQL via Kysely) │
|
|
29
|
+
│ - customAdapter (your own) │
|
|
30
|
+
└────────────────┬────────────────────────────────────────┘
|
|
31
|
+
│
|
|
32
|
+
┌───────────┼───────────┬───────────┬───────────┐
|
|
33
|
+
↓ ↓ ↓ ↓ ↓
|
|
34
|
+
┌─────────┐ ┌─────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
|
|
35
|
+
│ Convex │ │Supabase │ │WordPress │ │ Neon │ │ MongoDB │
|
|
36
|
+
│ │ │Postgres │ │ MySQL │ │PostgreSQL│ │ │
|
|
37
|
+
└─────────┘ └─────────┘ └──────────┘ └──────────┘ └──────────┘
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**Key Insight:** Better Auth has built-in adapters for Drizzle, Prisma, and MongoDB. For other backends (Convex, WordPress, custom APIs), we create custom adapters using Better Auth's `createAdapter` helper.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Table of Contents
|
|
45
|
+
|
|
46
|
+
1. [Better Auth Architecture](#better-auth-architecture)
|
|
47
|
+
2. [Built-in Adapters](#built-in-adapters)
|
|
48
|
+
3. [Custom Adapter Pattern](#custom-adapter-pattern)
|
|
49
|
+
4. [Convex Adapter](#convex-adapter)
|
|
50
|
+
5. [Supabase Integration](#supabase-integration)
|
|
51
|
+
6. [WordPress Adapter](#wordpress-adapter)
|
|
52
|
+
7. [Configuration](#configuration)
|
|
53
|
+
8. [Schema Management](#schema-management)
|
|
54
|
+
9. [Testing](#testing)
|
|
55
|
+
10. [Migration Strategy](#migration-strategy)
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Better Auth Architecture
|
|
60
|
+
|
|
61
|
+
### Core Schema
|
|
62
|
+
|
|
63
|
+
Better Auth requires 4 tables:
|
|
64
|
+
|
|
65
|
+
1. **user** - User profiles
|
|
66
|
+
2. **session** - Active sessions
|
|
67
|
+
3. **account** - OAuth accounts
|
|
68
|
+
4. **verification** - Email verification, password reset tokens
|
|
69
|
+
|
|
70
|
+
### Adapter Interface
|
|
71
|
+
|
|
72
|
+
Better Auth adapters implement these methods:
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
interface DatabaseAdapter {
|
|
76
|
+
// Create
|
|
77
|
+
create: (params: {
|
|
78
|
+
model: string
|
|
79
|
+
data: Record<string, any>
|
|
80
|
+
select?: string[]
|
|
81
|
+
}) => Promise<Record<string, any>>
|
|
82
|
+
|
|
83
|
+
// Read
|
|
84
|
+
findOne: (params: {
|
|
85
|
+
model: string
|
|
86
|
+
where: Array<{ field: string; value: any }>
|
|
87
|
+
select?: string[]
|
|
88
|
+
}) => Promise<Record<string, any> | null>
|
|
89
|
+
|
|
90
|
+
findMany: (params: {
|
|
91
|
+
model: string
|
|
92
|
+
where?: Array<{ field: string; value: any }>
|
|
93
|
+
limit?: number
|
|
94
|
+
offset?: number
|
|
95
|
+
sortBy?: { field: string; direction: 'asc' | 'desc' }
|
|
96
|
+
}) => Promise<Record<string, any>[]>
|
|
97
|
+
|
|
98
|
+
// Update
|
|
99
|
+
update: (params: {
|
|
100
|
+
model: string
|
|
101
|
+
where: Array<{ field: string; value: any }>
|
|
102
|
+
update: Record<string, any>
|
|
103
|
+
}) => Promise<Record<string, any>>
|
|
104
|
+
|
|
105
|
+
updateMany: (params: {
|
|
106
|
+
model: string
|
|
107
|
+
where: Array<{ field: string; value: any }>
|
|
108
|
+
update: Record<string, any>
|
|
109
|
+
}) => Promise<number>
|
|
110
|
+
|
|
111
|
+
// Delete
|
|
112
|
+
delete: (params: {
|
|
113
|
+
model: string
|
|
114
|
+
where: Array<{ field: string; value: any }>
|
|
115
|
+
}) => Promise<void>
|
|
116
|
+
|
|
117
|
+
deleteMany: (params: {
|
|
118
|
+
model: string
|
|
119
|
+
where: Array<{ field: string; value: any }>
|
|
120
|
+
}) => Promise<number>
|
|
121
|
+
|
|
122
|
+
// Count
|
|
123
|
+
count: (params: {
|
|
124
|
+
model: string
|
|
125
|
+
where?: Array<{ field: string; value: any }>
|
|
126
|
+
}) => Promise<number>
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**Key Point:** Better Auth abstracts database operations into model-based CRUD operations.
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## Built-in Adapters
|
|
135
|
+
|
|
136
|
+
### 1. Drizzle Adapter
|
|
137
|
+
|
|
138
|
+
```typescript
|
|
139
|
+
// frontend/src/auth/config.ts
|
|
140
|
+
import { betterAuth } from "better-auth"
|
|
141
|
+
import { drizzleAdapter } from "better-auth/adapters/drizzle"
|
|
142
|
+
import { db } from "./db"
|
|
143
|
+
|
|
144
|
+
export const auth = betterAuth({
|
|
145
|
+
database: drizzleAdapter(db, {
|
|
146
|
+
provider: "pg", // "sqlite" | "pg" | "mysql"
|
|
147
|
+
}),
|
|
148
|
+
|
|
149
|
+
emailAndPassword: { enabled: true },
|
|
150
|
+
|
|
151
|
+
socialProviders: {
|
|
152
|
+
google: {
|
|
153
|
+
clientId: process.env.GOOGLE_CLIENT_ID!,
|
|
154
|
+
clientSecret: process.env.GOOGLE_CLIENT_SECRET!
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
})
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
**Schema Generation:**
|
|
161
|
+
```bash
|
|
162
|
+
# Generate Drizzle schema
|
|
163
|
+
npx @better-auth/cli generate
|
|
164
|
+
|
|
165
|
+
# Create migration
|
|
166
|
+
npx drizzle-kit generate
|
|
167
|
+
|
|
168
|
+
# Apply migration
|
|
169
|
+
npx drizzle-kit migrate
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
**Supported with:** Supabase, Neon, PlanetScale, PostgreSQL, MySQL, SQLite
|
|
173
|
+
|
|
174
|
+
### 2. Prisma Adapter
|
|
175
|
+
|
|
176
|
+
```typescript
|
|
177
|
+
// frontend/src/auth/config.ts
|
|
178
|
+
import { betterAuth } from "better-auth"
|
|
179
|
+
import { prismaAdapter } from "better-auth/adapters/prisma"
|
|
180
|
+
import { PrismaClient } from "@prisma/client"
|
|
181
|
+
|
|
182
|
+
const prisma = new PrismaClient()
|
|
183
|
+
|
|
184
|
+
export const auth = betterAuth({
|
|
185
|
+
database: prismaAdapter(prisma, {
|
|
186
|
+
provider: "postgresql"
|
|
187
|
+
})
|
|
188
|
+
})
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
**Schema Generation:**
|
|
192
|
+
```bash
|
|
193
|
+
# Generate Prisma schema
|
|
194
|
+
npx @better-auth/cli generate
|
|
195
|
+
|
|
196
|
+
# Apply to database
|
|
197
|
+
npx prisma db push
|
|
198
|
+
# or
|
|
199
|
+
npx prisma migrate dev
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
**Supported with:** PostgreSQL, MySQL, SQLite, MongoDB, SQL Server, CockroachDB
|
|
203
|
+
|
|
204
|
+
### 3. MongoDB Adapter
|
|
205
|
+
|
|
206
|
+
```typescript
|
|
207
|
+
// frontend/src/auth/config.ts
|
|
208
|
+
import { betterAuth } from "better-auth"
|
|
209
|
+
import { mongodbAdapter } from "better-auth/adapters/mongodb"
|
|
210
|
+
import { MongoClient } from "mongodb"
|
|
211
|
+
|
|
212
|
+
const client = new MongoClient("mongodb://localhost:27017/database")
|
|
213
|
+
const db = client.db()
|
|
214
|
+
|
|
215
|
+
export const auth = betterAuth({
|
|
216
|
+
database: mongodbAdapter(db, {
|
|
217
|
+
client // Optional: enables transactions
|
|
218
|
+
})
|
|
219
|
+
})
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
**No schema migration needed!** MongoDB collections are created automatically.
|
|
223
|
+
|
|
224
|
+
### 4. Kysely Adapter (Direct SQL)
|
|
225
|
+
|
|
226
|
+
```typescript
|
|
227
|
+
// frontend/src/auth/config.ts
|
|
228
|
+
import { betterAuth } from "better-auth"
|
|
229
|
+
import { Pool } from "pg"
|
|
230
|
+
|
|
231
|
+
export const auth = betterAuth({
|
|
232
|
+
// ✅ Pass Pool directly - Better Auth uses Kysely internally
|
|
233
|
+
database: new Pool({
|
|
234
|
+
connectionString: process.env.DATABASE_URL
|
|
235
|
+
})
|
|
236
|
+
})
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
**Schema Generation:**
|
|
240
|
+
```bash
|
|
241
|
+
# Generate SQL schema
|
|
242
|
+
npx @better-auth/cli generate
|
|
243
|
+
|
|
244
|
+
# Apply schema manually
|
|
245
|
+
psql $DATABASE_URL < schema.sql
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
**Supported with:** PostgreSQL, MySQL, SQLite, MS SQL, and any Kysely-supported database
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
## Custom Adapter Pattern
|
|
253
|
+
|
|
254
|
+
### Creating a Custom Adapter
|
|
255
|
+
|
|
256
|
+
```typescript
|
|
257
|
+
// frontend/src/auth/adapters/custom.ts
|
|
258
|
+
import { createAdapter } from "better-auth/adapters"
|
|
259
|
+
|
|
260
|
+
export interface CustomAdapterConfig {
|
|
261
|
+
client: any // Your database client
|
|
262
|
+
debugLogs?: boolean
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
export const customAdapter = (config: CustomAdapterConfig) =>
|
|
266
|
+
createAdapter({
|
|
267
|
+
// Adapter metadata
|
|
268
|
+
config: {
|
|
269
|
+
adapterId: "custom-adapter",
|
|
270
|
+
adapterName: "Custom Adapter",
|
|
271
|
+
supportsNumericIds: false, // UUIDs
|
|
272
|
+
supportsJSON: true,
|
|
273
|
+
supportsDates: true,
|
|
274
|
+
supportsBooleans: true
|
|
275
|
+
},
|
|
276
|
+
|
|
277
|
+
// Adapter implementation
|
|
278
|
+
adapter: ({ options, schema, debugLog }) => {
|
|
279
|
+
const { client } = config
|
|
280
|
+
|
|
281
|
+
return {
|
|
282
|
+
// Create
|
|
283
|
+
create: async ({ model, data, select }) => {
|
|
284
|
+
debugLog("Creating", model, data)
|
|
285
|
+
|
|
286
|
+
// Your database create logic
|
|
287
|
+
const result = await client.create(model, data)
|
|
288
|
+
|
|
289
|
+
// Return created record
|
|
290
|
+
return result
|
|
291
|
+
},
|
|
292
|
+
|
|
293
|
+
// Find one
|
|
294
|
+
findOne: async ({ model, where, select }) => {
|
|
295
|
+
debugLog("Finding one", model, where)
|
|
296
|
+
|
|
297
|
+
// Your database query logic
|
|
298
|
+
const result = await client.findOne(model, where)
|
|
299
|
+
|
|
300
|
+
return result || null
|
|
301
|
+
},
|
|
302
|
+
|
|
303
|
+
// Find many
|
|
304
|
+
findMany: async ({ model, where, limit, offset, sortBy }) => {
|
|
305
|
+
debugLog("Finding many", model, where)
|
|
306
|
+
|
|
307
|
+
// Your database query logic
|
|
308
|
+
const results = await client.findMany(model, {
|
|
309
|
+
where,
|
|
310
|
+
limit,
|
|
311
|
+
offset,
|
|
312
|
+
orderBy: sortBy
|
|
313
|
+
})
|
|
314
|
+
|
|
315
|
+
return results
|
|
316
|
+
},
|
|
317
|
+
|
|
318
|
+
// Update
|
|
319
|
+
update: async ({ model, where, update }) => {
|
|
320
|
+
debugLog("Updating", model, where, update)
|
|
321
|
+
|
|
322
|
+
// Your database update logic
|
|
323
|
+
const result = await client.update(model, where, update)
|
|
324
|
+
|
|
325
|
+
return result
|
|
326
|
+
},
|
|
327
|
+
|
|
328
|
+
// Update many
|
|
329
|
+
updateMany: async ({ model, where, update }) => {
|
|
330
|
+
debugLog("Updating many", model, where, update)
|
|
331
|
+
|
|
332
|
+
// Your database update logic
|
|
333
|
+
const count = await client.updateMany(model, where, update)
|
|
334
|
+
|
|
335
|
+
return count
|
|
336
|
+
},
|
|
337
|
+
|
|
338
|
+
// Delete
|
|
339
|
+
delete: async ({ model, where }) => {
|
|
340
|
+
debugLog("Deleting", model, where)
|
|
341
|
+
|
|
342
|
+
// Your database delete logic
|
|
343
|
+
await client.delete(model, where)
|
|
344
|
+
},
|
|
345
|
+
|
|
346
|
+
// Delete many
|
|
347
|
+
deleteMany: async ({ model, where }) => {
|
|
348
|
+
debugLog("Deleting many", model, where)
|
|
349
|
+
|
|
350
|
+
// Your database delete logic
|
|
351
|
+
const count = await client.deleteMany(model, where)
|
|
352
|
+
|
|
353
|
+
return count
|
|
354
|
+
},
|
|
355
|
+
|
|
356
|
+
// Count
|
|
357
|
+
count: async ({ model, where }) => {
|
|
358
|
+
debugLog("Counting", model, where)
|
|
359
|
+
|
|
360
|
+
// Your database count logic
|
|
361
|
+
const count = await client.count(model, where)
|
|
362
|
+
|
|
363
|
+
return count
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
})
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
### Testing Your Adapter
|
|
371
|
+
|
|
372
|
+
```typescript
|
|
373
|
+
// frontend/src/auth/adapters/__tests__/custom.test.ts
|
|
374
|
+
import { runAdapterTest } from "better-auth/adapters/test"
|
|
375
|
+
import { customAdapter } from "../custom"
|
|
376
|
+
|
|
377
|
+
describe("Custom Adapter", () => {
|
|
378
|
+
it("passes adapter test suite", async () => {
|
|
379
|
+
const adapter = customAdapter({
|
|
380
|
+
client: myTestClient
|
|
381
|
+
})
|
|
382
|
+
|
|
383
|
+
await runAdapterTest({
|
|
384
|
+
getAdapter: async () => adapter
|
|
385
|
+
})
|
|
386
|
+
})
|
|
387
|
+
})
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
---
|
|
391
|
+
|
|
392
|
+
## Convex Adapter
|
|
393
|
+
|
|
394
|
+
### Implementation
|
|
395
|
+
|
|
396
|
+
```typescript
|
|
397
|
+
// frontend/src/auth/adapters/convex.ts
|
|
398
|
+
import { createAdapter } from "better-auth/adapters"
|
|
399
|
+
import { ConvexHttpClient } from "convex/browser"
|
|
400
|
+
import { api } from "@/lib/api"
|
|
401
|
+
|
|
402
|
+
export interface ConvexAdapterConfig {
|
|
403
|
+
url: string
|
|
404
|
+
debugLogs?: boolean
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
export const convexAdapter = (config: ConvexAdapterConfig) =>
|
|
408
|
+
createAdapter({
|
|
409
|
+
config: {
|
|
410
|
+
adapterId: "convex",
|
|
411
|
+
adapterName: "Convex Adapter",
|
|
412
|
+
supportsNumericIds: false,
|
|
413
|
+
supportsJSON: true,
|
|
414
|
+
supportsDates: true,
|
|
415
|
+
supportsBooleans: true
|
|
416
|
+
},
|
|
417
|
+
|
|
418
|
+
adapter: ({ options, schema, debugLog }) => {
|
|
419
|
+
const client = new ConvexHttpClient(config.url)
|
|
420
|
+
|
|
421
|
+
return {
|
|
422
|
+
create: async ({ model, data }) => {
|
|
423
|
+
const result = await client.mutation(api.auth.create, {
|
|
424
|
+
model,
|
|
425
|
+
data
|
|
426
|
+
})
|
|
427
|
+
return result
|
|
428
|
+
},
|
|
429
|
+
|
|
430
|
+
findOne: async ({ model, where }) => {
|
|
431
|
+
const result = await client.query(api.auth.findOne, {
|
|
432
|
+
model,
|
|
433
|
+
where
|
|
434
|
+
})
|
|
435
|
+
return result
|
|
436
|
+
},
|
|
437
|
+
|
|
438
|
+
findMany: async ({ model, where, limit, offset }) => {
|
|
439
|
+
const results = await client.query(api.auth.findMany, {
|
|
440
|
+
model,
|
|
441
|
+
where,
|
|
442
|
+
limit,
|
|
443
|
+
offset
|
|
444
|
+
})
|
|
445
|
+
return results
|
|
446
|
+
},
|
|
447
|
+
|
|
448
|
+
update: async ({ model, where, update }) => {
|
|
449
|
+
const result = await client.mutation(api.auth.update, {
|
|
450
|
+
model,
|
|
451
|
+
where,
|
|
452
|
+
update
|
|
453
|
+
})
|
|
454
|
+
return result
|
|
455
|
+
},
|
|
456
|
+
|
|
457
|
+
updateMany: async ({ model, where, update }) => {
|
|
458
|
+
const count = await client.mutation(api.auth.updateMany, {
|
|
459
|
+
model,
|
|
460
|
+
where,
|
|
461
|
+
update
|
|
462
|
+
})
|
|
463
|
+
return count
|
|
464
|
+
},
|
|
465
|
+
|
|
466
|
+
delete: async ({ model, where }) => {
|
|
467
|
+
await client.mutation(api.auth.delete, {
|
|
468
|
+
model,
|
|
469
|
+
where
|
|
470
|
+
})
|
|
471
|
+
},
|
|
472
|
+
|
|
473
|
+
deleteMany: async ({ model, where }) => {
|
|
474
|
+
const count = await client.mutation(api.auth.deleteMany, {
|
|
475
|
+
model,
|
|
476
|
+
where
|
|
477
|
+
})
|
|
478
|
+
return count
|
|
479
|
+
},
|
|
480
|
+
|
|
481
|
+
count: async ({ model, where }) => {
|
|
482
|
+
const count = await client.query(api.auth.count, {
|
|
483
|
+
model,
|
|
484
|
+
where
|
|
485
|
+
})
|
|
486
|
+
return count
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
})
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
### Convex Backend Functions
|
|
494
|
+
|
|
495
|
+
```typescript
|
|
496
|
+
// backend/convex/auth.ts
|
|
497
|
+
import { mutation, query } from "./_generated/server"
|
|
498
|
+
import { v } from "convex/values"
|
|
499
|
+
|
|
500
|
+
// Create
|
|
501
|
+
export const create = mutation({
|
|
502
|
+
args: {
|
|
503
|
+
model: v.string(),
|
|
504
|
+
data: v.any()
|
|
505
|
+
},
|
|
506
|
+
handler: async (ctx, { model, data }) => {
|
|
507
|
+
const id = await ctx.db.insert(model as any, data)
|
|
508
|
+
const doc = await ctx.db.get(id)
|
|
509
|
+
return doc
|
|
510
|
+
}
|
|
511
|
+
})
|
|
512
|
+
|
|
513
|
+
// Find one
|
|
514
|
+
export const findOne = query({
|
|
515
|
+
args: {
|
|
516
|
+
model: v.string(),
|
|
517
|
+
where: v.array(v.object({ field: v.string(), value: v.any() }))
|
|
518
|
+
},
|
|
519
|
+
handler: async (ctx, { model, where }) => {
|
|
520
|
+
let query = ctx.db.query(model as any)
|
|
521
|
+
|
|
522
|
+
for (const condition of where) {
|
|
523
|
+
query = query.filter(q => q.eq(q.field(condition.field), condition.value))
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
return await query.first()
|
|
527
|
+
}
|
|
528
|
+
})
|
|
529
|
+
|
|
530
|
+
// Find many
|
|
531
|
+
export const findMany = query({
|
|
532
|
+
args: {
|
|
533
|
+
model: v.string(),
|
|
534
|
+
where: v.optional(v.array(v.object({ field: v.string(), value: v.any() }))),
|
|
535
|
+
limit: v.optional(v.number()),
|
|
536
|
+
offset: v.optional(v.number())
|
|
537
|
+
},
|
|
538
|
+
handler: async (ctx, { model, where, limit, offset }) => {
|
|
539
|
+
let query = ctx.db.query(model as any)
|
|
540
|
+
|
|
541
|
+
if (where) {
|
|
542
|
+
for (const condition of where) {
|
|
543
|
+
query = query.filter(q => q.eq(q.field(condition.field), condition.value))
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
const results = await query.collect()
|
|
548
|
+
|
|
549
|
+
// Apply offset and limit
|
|
550
|
+
const start = offset || 0
|
|
551
|
+
const end = limit ? start + limit : undefined
|
|
552
|
+
return results.slice(start, end)
|
|
553
|
+
}
|
|
554
|
+
})
|
|
555
|
+
|
|
556
|
+
// Update
|
|
557
|
+
export const update = mutation({
|
|
558
|
+
args: {
|
|
559
|
+
model: v.string(),
|
|
560
|
+
where: v.array(v.object({ field: v.string(), value: v.any() })),
|
|
561
|
+
update: v.any()
|
|
562
|
+
},
|
|
563
|
+
handler: async (ctx, { model, where, update }) => {
|
|
564
|
+
// Find record
|
|
565
|
+
let query = ctx.db.query(model as any)
|
|
566
|
+
for (const condition of where) {
|
|
567
|
+
query = query.filter(q => q.eq(q.field(condition.field), condition.value))
|
|
568
|
+
}
|
|
569
|
+
const doc = await query.first()
|
|
570
|
+
|
|
571
|
+
if (!doc) {
|
|
572
|
+
throw new Error(`Record not found in ${model}`)
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
// Update
|
|
576
|
+
await ctx.db.patch(doc._id, update)
|
|
577
|
+
|
|
578
|
+
// Return updated
|
|
579
|
+
return await ctx.db.get(doc._id)
|
|
580
|
+
}
|
|
581
|
+
})
|
|
582
|
+
|
|
583
|
+
// Delete
|
|
584
|
+
export const _delete = mutation({
|
|
585
|
+
args: {
|
|
586
|
+
model: v.string(),
|
|
587
|
+
where: v.array(v.object({ field: v.string(), value: v.any() }))
|
|
588
|
+
},
|
|
589
|
+
handler: async (ctx, { model, where }) => {
|
|
590
|
+
// Find record
|
|
591
|
+
let query = ctx.db.query(model as any)
|
|
592
|
+
for (const condition of where) {
|
|
593
|
+
query = query.filter(q => q.eq(q.field(condition.field), condition.value))
|
|
594
|
+
}
|
|
595
|
+
const doc = await query.first()
|
|
596
|
+
|
|
597
|
+
if (!doc) {
|
|
598
|
+
throw new Error(`Record not found in ${model}`)
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
// Delete
|
|
602
|
+
await ctx.db.delete(doc._id)
|
|
603
|
+
}
|
|
604
|
+
})
|
|
605
|
+
|
|
606
|
+
// Count
|
|
607
|
+
export const count = query({
|
|
608
|
+
args: {
|
|
609
|
+
model: v.string(),
|
|
610
|
+
where: v.optional(v.array(v.object({ field: v.string(), value: v.any() })))
|
|
611
|
+
},
|
|
612
|
+
handler: async (ctx, { model, where }) => {
|
|
613
|
+
let query = ctx.db.query(model as any)
|
|
614
|
+
|
|
615
|
+
if (where) {
|
|
616
|
+
for (const condition of where) {
|
|
617
|
+
query = query.filter(q => q.eq(q.field(condition.field), condition.value))
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
const results = await query.collect()
|
|
622
|
+
return results.length
|
|
623
|
+
}
|
|
624
|
+
})
|
|
625
|
+
```
|
|
626
|
+
|
|
627
|
+
### Convex Schema
|
|
628
|
+
|
|
629
|
+
```typescript
|
|
630
|
+
// backend/convex/schema.ts
|
|
631
|
+
import { defineSchema, defineTable } from "convex/server"
|
|
632
|
+
import { v } from "convex/values"
|
|
633
|
+
|
|
634
|
+
export default defineSchema({
|
|
635
|
+
user: defineTable({
|
|
636
|
+
name: v.string(),
|
|
637
|
+
email: v.string(),
|
|
638
|
+
emailVerified: v.boolean(),
|
|
639
|
+
image: v.optional(v.string()),
|
|
640
|
+
createdAt: v.number(),
|
|
641
|
+
updatedAt: v.number()
|
|
642
|
+
}).index("by_email", ["email"]),
|
|
643
|
+
|
|
644
|
+
session: defineTable({
|
|
645
|
+
expiresAt: v.number(),
|
|
646
|
+
token: v.string(),
|
|
647
|
+
createdAt: v.number(),
|
|
648
|
+
updatedAt: v.number(),
|
|
649
|
+
ipAddress: v.optional(v.string()),
|
|
650
|
+
userAgent: v.optional(v.string()),
|
|
651
|
+
userId: v.string()
|
|
652
|
+
}).index("by_token", ["token"]),
|
|
653
|
+
|
|
654
|
+
account: defineTable({
|
|
655
|
+
accountId: v.string(),
|
|
656
|
+
providerId: v.string(),
|
|
657
|
+
userId: v.string(),
|
|
658
|
+
accessToken: v.optional(v.string()),
|
|
659
|
+
refreshToken: v.optional(v.string()),
|
|
660
|
+
idToken: v.optional(v.string()),
|
|
661
|
+
accessTokenExpiresAt: v.optional(v.number()),
|
|
662
|
+
refreshTokenExpiresAt: v.optional(v.number()),
|
|
663
|
+
scope: v.optional(v.string()),
|
|
664
|
+
password: v.optional(v.string()),
|
|
665
|
+
createdAt: v.number(),
|
|
666
|
+
updatedAt: v.number()
|
|
667
|
+
}).index("by_user", ["userId"]),
|
|
668
|
+
|
|
669
|
+
verification: defineTable({
|
|
670
|
+
identifier: v.string(),
|
|
671
|
+
value: v.string(),
|
|
672
|
+
expiresAt: v.number(),
|
|
673
|
+
createdAt: v.optional(v.number()),
|
|
674
|
+
updatedAt: v.optional(v.number())
|
|
675
|
+
}).index("by_identifier", ["identifier"])
|
|
676
|
+
})
|
|
677
|
+
```
|
|
678
|
+
|
|
679
|
+
---
|
|
680
|
+
|
|
681
|
+
## Supabase Integration
|
|
682
|
+
|
|
683
|
+
**Use Drizzle or Prisma adapter with Supabase PostgreSQL:**
|
|
684
|
+
|
|
685
|
+
```typescript
|
|
686
|
+
// frontend/src/auth/config.ts
|
|
687
|
+
import { betterAuth } from "better-auth"
|
|
688
|
+
import { drizzleAdapter } from "better-auth/adapters/drizzle"
|
|
689
|
+
import { drizzle } from "drizzle-orm/postgres-js"
|
|
690
|
+
import postgres from "postgres"
|
|
691
|
+
|
|
692
|
+
const client = postgres(process.env.DATABASE_URL!)
|
|
693
|
+
const db = drizzle(client)
|
|
694
|
+
|
|
695
|
+
export const auth = betterAuth({
|
|
696
|
+
database: drizzleAdapter(db, {
|
|
697
|
+
provider: "pg"
|
|
698
|
+
})
|
|
699
|
+
})
|
|
700
|
+
```
|
|
701
|
+
|
|
702
|
+
**Generate schema:**
|
|
703
|
+
```bash
|
|
704
|
+
npx @better-auth/cli generate
|
|
705
|
+
npx drizzle-kit generate
|
|
706
|
+
npx drizzle-kit push
|
|
707
|
+
```
|
|
708
|
+
|
|
709
|
+
---
|
|
710
|
+
|
|
711
|
+
## WordPress Adapter
|
|
712
|
+
|
|
713
|
+
```typescript
|
|
714
|
+
// frontend/src/auth/adapters/wordpress.ts
|
|
715
|
+
import { createAdapter } from "better-auth/adapters"
|
|
716
|
+
|
|
717
|
+
export const wordpressAdapter = (config: {
|
|
718
|
+
url: string
|
|
719
|
+
username: string
|
|
720
|
+
password: string
|
|
721
|
+
}) =>
|
|
722
|
+
createAdapter({
|
|
723
|
+
config: {
|
|
724
|
+
adapterId: "wordpress",
|
|
725
|
+
adapterName: "WordPress Adapter"
|
|
726
|
+
},
|
|
727
|
+
|
|
728
|
+
adapter: () => {
|
|
729
|
+
const authHeader = `Basic ${btoa(`${config.username}:${config.password}`)}`
|
|
730
|
+
|
|
731
|
+
return {
|
|
732
|
+
create: async ({ model, data }) => {
|
|
733
|
+
// Map to WordPress tables
|
|
734
|
+
const endpoint = model === "user" ? "users" : `one_${model}s`
|
|
735
|
+
|
|
736
|
+
const response = await fetch(
|
|
737
|
+
`${config.url}/wp-json/one-auth/v1/${endpoint}`,
|
|
738
|
+
{
|
|
739
|
+
method: "POST",
|
|
740
|
+
headers: {
|
|
741
|
+
Authorization: authHeader,
|
|
742
|
+
"Content-Type": "application/json"
|
|
743
|
+
},
|
|
744
|
+
body: JSON.stringify(data)
|
|
745
|
+
}
|
|
746
|
+
)
|
|
747
|
+
|
|
748
|
+
return await response.json()
|
|
749
|
+
},
|
|
750
|
+
|
|
751
|
+
findOne: async ({ model, where }) => {
|
|
752
|
+
const endpoint = model === "user" ? "users" : `one_${model}s`
|
|
753
|
+
const query = new URLSearchParams(
|
|
754
|
+
where.reduce((acc, { field, value }) => {
|
|
755
|
+
acc[field] = String(value)
|
|
756
|
+
return acc
|
|
757
|
+
}, {} as Record<string, string>)
|
|
758
|
+
)
|
|
759
|
+
|
|
760
|
+
const response = await fetch(
|
|
761
|
+
`${config.url}/wp-json/one-auth/v1/${endpoint}?${query}`,
|
|
762
|
+
{
|
|
763
|
+
headers: { Authorization: authHeader }
|
|
764
|
+
}
|
|
765
|
+
)
|
|
766
|
+
|
|
767
|
+
const results = await response.json()
|
|
768
|
+
return results[0] || null
|
|
769
|
+
},
|
|
770
|
+
|
|
771
|
+
// Implement other methods...
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
})
|
|
775
|
+
```
|
|
776
|
+
|
|
777
|
+
---
|
|
778
|
+
|
|
779
|
+
## Configuration
|
|
780
|
+
|
|
781
|
+
### Basic Setup
|
|
782
|
+
|
|
783
|
+
```typescript
|
|
784
|
+
// frontend/src/auth/config.ts
|
|
785
|
+
import { betterAuth } from "better-auth"
|
|
786
|
+
import { convexAdapter } from "./adapters/convex"
|
|
787
|
+
|
|
788
|
+
export const auth = betterAuth({
|
|
789
|
+
// ✅ Database adapter
|
|
790
|
+
database: convexAdapter({
|
|
791
|
+
url: import.meta.env.PUBLIC_CONVEX_URL
|
|
792
|
+
}),
|
|
793
|
+
|
|
794
|
+
// Base URL
|
|
795
|
+
baseURL: import.meta.env.PUBLIC_APP_URL,
|
|
796
|
+
|
|
797
|
+
// Email & Password
|
|
798
|
+
emailAndPassword: {
|
|
799
|
+
enabled: true,
|
|
800
|
+
requireEmailVerification: true
|
|
801
|
+
},
|
|
802
|
+
|
|
803
|
+
// Social providers
|
|
804
|
+
socialProviders: {
|
|
805
|
+
google: {
|
|
806
|
+
clientId: import.meta.env.GOOGLE_CLIENT_ID,
|
|
807
|
+
clientSecret: import.meta.env.GOOGLE_CLIENT_SECRET
|
|
808
|
+
},
|
|
809
|
+
github: {
|
|
810
|
+
clientId: import.meta.env.GITHUB_CLIENT_ID,
|
|
811
|
+
clientSecret: import.meta.env.GITHUB_CLIENT_SECRET
|
|
812
|
+
}
|
|
813
|
+
},
|
|
814
|
+
|
|
815
|
+
// Session
|
|
816
|
+
session: {
|
|
817
|
+
expiresIn: 60 * 60 * 24 * 7, // 7 days
|
|
818
|
+
updateAge: 60 * 60 * 24 // 1 day
|
|
819
|
+
},
|
|
820
|
+
|
|
821
|
+
// Advanced
|
|
822
|
+
advanced: {
|
|
823
|
+
crossSubDomainCookies: {
|
|
824
|
+
enabled: true,
|
|
825
|
+
domain: ".one.ie"
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
})
|
|
829
|
+
```
|
|
830
|
+
|
|
831
|
+
### Multi-Backend Setup
|
|
832
|
+
|
|
833
|
+
```typescript
|
|
834
|
+
// Use different adapters per environment
|
|
835
|
+
const getAuthAdapter = () => {
|
|
836
|
+
const provider = import.meta.env.PUBLIC_AUTH_BACKEND
|
|
837
|
+
|
|
838
|
+
switch (provider) {
|
|
839
|
+
case "convex":
|
|
840
|
+
return convexAdapter({ url: import.meta.env.PUBLIC_CONVEX_URL })
|
|
841
|
+
|
|
842
|
+
case "supabase":
|
|
843
|
+
return drizzleAdapter(supabaseDb, { provider: "pg" })
|
|
844
|
+
|
|
845
|
+
case "wordpress":
|
|
846
|
+
return wordpressAdapter({
|
|
847
|
+
url: import.meta.env.WORDPRESS_URL,
|
|
848
|
+
username: import.meta.env.WORDPRESS_USERNAME,
|
|
849
|
+
password: import.meta.env.WORDPRESS_APP_PASSWORD
|
|
850
|
+
})
|
|
851
|
+
|
|
852
|
+
default:
|
|
853
|
+
throw new Error(`Unknown auth backend: ${provider}`)
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
export const auth = betterAuth({
|
|
858
|
+
database: getAuthAdapter()
|
|
859
|
+
})
|
|
860
|
+
```
|
|
861
|
+
|
|
862
|
+
---
|
|
863
|
+
|
|
864
|
+
## Schema Management
|
|
865
|
+
|
|
866
|
+
### Generate Schema
|
|
867
|
+
|
|
868
|
+
```bash
|
|
869
|
+
# Generate schema for your adapter
|
|
870
|
+
npx @better-auth/cli generate
|
|
871
|
+
|
|
872
|
+
# For Drizzle
|
|
873
|
+
npx drizzle-kit generate
|
|
874
|
+
npx drizzle-kit push
|
|
875
|
+
|
|
876
|
+
# For Prisma
|
|
877
|
+
npx prisma db push
|
|
878
|
+
|
|
879
|
+
# For Kysely (raw SQL)
|
|
880
|
+
psql $DATABASE_URL < schema.sql
|
|
881
|
+
```
|
|
882
|
+
|
|
883
|
+
### Custom Schema Names
|
|
884
|
+
|
|
885
|
+
```typescript
|
|
886
|
+
// frontend/src/auth/config.ts
|
|
887
|
+
import { betterAuth } from "better-auth"
|
|
888
|
+
import { drizzleAdapter } from "better-auth/adapters/drizzle"
|
|
889
|
+
import { db } from "./db"
|
|
890
|
+
import * as schema from "./schema"
|
|
891
|
+
|
|
892
|
+
export const auth = betterAuth({
|
|
893
|
+
database: drizzleAdapter(db, {
|
|
894
|
+
provider: "pg",
|
|
895
|
+
// ✅ Map to custom table names
|
|
896
|
+
schema: {
|
|
897
|
+
user: schema.users,
|
|
898
|
+
session: schema.user_sessions,
|
|
899
|
+
account: schema.oauth_accounts,
|
|
900
|
+
verification: schema.email_verifications
|
|
901
|
+
}
|
|
902
|
+
})
|
|
903
|
+
})
|
|
904
|
+
```
|
|
905
|
+
|
|
906
|
+
---
|
|
907
|
+
|
|
908
|
+
## Testing
|
|
909
|
+
|
|
910
|
+
### Adapter Test Suite
|
|
911
|
+
|
|
912
|
+
```typescript
|
|
913
|
+
// frontend/src/auth/adapters/__tests__/convex.test.ts
|
|
914
|
+
import { runAdapterTest } from "better-auth/adapters/test"
|
|
915
|
+
import { convexAdapter } from "../convex"
|
|
916
|
+
|
|
917
|
+
describe("Convex Adapter", () => {
|
|
918
|
+
it("passes Better Auth adapter tests", async () => {
|
|
919
|
+
const adapter = convexAdapter({
|
|
920
|
+
url: "http://localhost:3210"
|
|
921
|
+
})
|
|
922
|
+
|
|
923
|
+
await runAdapterTest({
|
|
924
|
+
getAdapter: async () => adapter
|
|
925
|
+
})
|
|
926
|
+
})
|
|
927
|
+
})
|
|
928
|
+
```
|
|
929
|
+
|
|
930
|
+
### Integration Tests
|
|
931
|
+
|
|
932
|
+
```typescript
|
|
933
|
+
// frontend/src/auth/__tests__/auth.test.ts
|
|
934
|
+
import { describe, it, expect } from "vitest"
|
|
935
|
+
import { auth } from "../config"
|
|
936
|
+
|
|
937
|
+
describe("Auth Integration", () => {
|
|
938
|
+
it("signs up a user", async () => {
|
|
939
|
+
const result = await auth.api.signUp.email({
|
|
940
|
+
email: "test@example.com",
|
|
941
|
+
password: "password123",
|
|
942
|
+
name: "Test User"
|
|
943
|
+
})
|
|
944
|
+
|
|
945
|
+
expect(result.user.email).toBe("test@example.com")
|
|
946
|
+
})
|
|
947
|
+
|
|
948
|
+
it("signs in a user", async () => {
|
|
949
|
+
const result = await auth.api.signIn.email({
|
|
950
|
+
email: "test@example.com",
|
|
951
|
+
password: "password123"
|
|
952
|
+
})
|
|
953
|
+
|
|
954
|
+
expect(result.user).toBeDefined()
|
|
955
|
+
expect(result.session).toBeDefined()
|
|
956
|
+
})
|
|
957
|
+
})
|
|
958
|
+
```
|
|
959
|
+
|
|
960
|
+
---
|
|
961
|
+
|
|
962
|
+
## Migration Strategy
|
|
963
|
+
|
|
964
|
+
### Step 1: Choose Adapter
|
|
965
|
+
|
|
966
|
+
```typescript
|
|
967
|
+
// Built-in adapters (recommended)
|
|
968
|
+
✅ Drizzle - for Supabase, Neon, PlanetScale, PostgreSQL, MySQL
|
|
969
|
+
✅ Prisma - for any Prisma-supported database
|
|
970
|
+
✅ MongoDB - for MongoDB
|
|
971
|
+
|
|
972
|
+
// Custom adapters (for special backends)
|
|
973
|
+
✅ Convex - custom adapter
|
|
974
|
+
✅ WordPress - custom adapter
|
|
975
|
+
✅ Your API - custom adapter
|
|
976
|
+
```
|
|
977
|
+
|
|
978
|
+
### Step 2: Install Dependencies
|
|
979
|
+
|
|
980
|
+
```bash
|
|
981
|
+
# For Drizzle
|
|
982
|
+
npm install drizzle-orm @better-auth/cli
|
|
983
|
+
|
|
984
|
+
# For Prisma
|
|
985
|
+
npm install prisma @prisma/client @better-auth/cli
|
|
986
|
+
|
|
987
|
+
# For MongoDB
|
|
988
|
+
npm install mongodb @better-auth/cli
|
|
989
|
+
|
|
990
|
+
# For Convex
|
|
991
|
+
npm install convex @better-auth/cli
|
|
992
|
+
```
|
|
993
|
+
|
|
994
|
+
### Step 3: Generate Schema
|
|
995
|
+
|
|
996
|
+
```bash
|
|
997
|
+
npx @better-auth/cli generate
|
|
998
|
+
```
|
|
999
|
+
|
|
1000
|
+
### Step 4: Configure Better Auth
|
|
1001
|
+
|
|
1002
|
+
```typescript
|
|
1003
|
+
import { betterAuth } from "better-auth"
|
|
1004
|
+
import { yourAdapter } from "./adapters/your-adapter"
|
|
1005
|
+
|
|
1006
|
+
export const auth = betterAuth({
|
|
1007
|
+
database: yourAdapter({ /* config */ })
|
|
1008
|
+
})
|
|
1009
|
+
```
|
|
1010
|
+
|
|
1011
|
+
### Step 5: Test
|
|
1012
|
+
|
|
1013
|
+
```bash
|
|
1014
|
+
npm test
|
|
1015
|
+
```
|
|
1016
|
+
|
|
1017
|
+
---
|
|
1018
|
+
|
|
1019
|
+
## Summary
|
|
1020
|
+
|
|
1021
|
+
### Better Auth + ONE
|
|
1022
|
+
|
|
1023
|
+
✅ **Built-in Adapters**: Drizzle, Prisma, MongoDB
|
|
1024
|
+
✅ **Custom Adapters**: Convex, WordPress, custom APIs
|
|
1025
|
+
✅ **Type-Safe**: Full TypeScript support
|
|
1026
|
+
✅ **Testing**: Built-in adapter test suite
|
|
1027
|
+
✅ **Flexible**: Works with ANY database
|
|
1028
|
+
✅ **No Lock-in**: Switch adapters easily
|
|
1029
|
+
|
|
1030
|
+
### Implementation Checklist
|
|
1031
|
+
|
|
1032
|
+
- [ ] Choose adapter (built-in or custom)
|
|
1033
|
+
- [ ] Install dependencies
|
|
1034
|
+
- [ ] Generate schema
|
|
1035
|
+
- [ ] Configure Better Auth
|
|
1036
|
+
- [ ] Test adapter
|
|
1037
|
+
- [ ] Deploy
|
|
1038
|
+
|
|
1039
|
+
### Recommended Adapters by Backend
|
|
1040
|
+
|
|
1041
|
+
| Backend | Adapter | Complexity |
|
|
1042
|
+
|---------|---------|------------|
|
|
1043
|
+
| **Supabase** | Drizzle | ⭐ Easy |
|
|
1044
|
+
| **Neon** | Drizzle | ⭐ Easy |
|
|
1045
|
+
| **PlanetScale** | Drizzle | ⭐ Easy |
|
|
1046
|
+
| **MongoDB** | MongoDB | ⭐ Easy |
|
|
1047
|
+
| **PostgreSQL** | Prisma/Drizzle | ⭐ Easy |
|
|
1048
|
+
| **MySQL** | Prisma/Drizzle | ⭐ Easy |
|
|
1049
|
+
| **Convex** | Custom | ⭐⭐ Medium |
|
|
1050
|
+
| **WordPress** | Custom | ⭐⭐ Medium |
|
|
1051
|
+
| **Custom API** | Custom | ⭐⭐⭐ Advanced |
|
|
1052
|
+
|
|
1053
|
+
### Next Steps
|
|
1054
|
+
|
|
1055
|
+
1. Review Better Auth docs: https://www.better-auth.com/docs
|
|
1056
|
+
2. Choose your backend
|
|
1057
|
+
3. Select appropriate adapter
|
|
1058
|
+
4. Generate schema
|
|
1059
|
+
5. Test and deploy
|
|
1060
|
+
|
|
1061
|
+
---
|
|
1062
|
+
|
|
1063
|
+
**Better Auth + ANY Backend = Universal Authentication**
|
|
1064
|
+
|
|
1065
|
+
One auth system. Any database. Zero lock-in.
|