@donotdev/cli 0.1.1 → 0.1.44
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/LICENSE.md +1 -1
- package/README.md +0 -0
- package/dependencies-matrix.json +93 -40
- package/dist/bin/commands/agent-setup.js +695 -420
- package/dist/bin/commands/build.js +1181 -832
- package/dist/bin/commands/bump.js +1065 -771
- package/dist/bin/commands/cacheout.js +253 -355
- package/dist/bin/commands/coach.js +275 -375
- package/dist/bin/commands/create-app.js +1085 -790
- package/dist/bin/commands/create-project.js +1117 -819
- package/dist/bin/commands/db.js +17045 -16542
- package/dist/bin/commands/deploy.js +1999 -1367
- package/dist/bin/commands/dev.js +879 -627
- package/dist/bin/commands/doctor.js +696 -425
- package/dist/bin/commands/emu.js +1001 -712
- package/dist/bin/commands/format.js +253 -355
- package/dist/bin/commands/get-demo.js +979 -706
- package/dist/bin/commands/make-admin.js +6279 -5746
- package/dist/bin/commands/preview.js +883 -628
- package/dist/bin/commands/seed.js +17058 -16555
- package/dist/bin/commands/setup-cicd.js +1024 -749
- package/dist/bin/commands/setup.js +1162 -844
- package/dist/bin/commands/staging.js +2000 -1368
- package/dist/bin/commands/sync-secrets.js +1181 -667
- package/dist/bin/commands/type-check.js +735 -461
- package/dist/bin/commands/wai.js +258 -360
- package/dist/bin/dndev.js +31 -16
- package/dist/bin/donotdev.js +31 -16
- package/dist/index.js +2200 -1513
- package/guidelines/DEPENDENCIES.md +155 -0
- package/guidelines/VERSION_CONTROL.md +0 -0
- package/package.json +1 -1
- package/templates/app-demo/.env.example +1 -1
- package/templates/app-demo/entities/Contact.ts.example +0 -0
- package/templates/app-demo/entities/ExampleEntity.ts.example +0 -0
- package/templates/app-demo/entities/demo.ts.example +0 -0
- package/templates/app-demo/index.html.example +0 -0
- package/templates/app-demo/public/apple-touch-icon.png.example +0 -0
- package/templates/app-demo/public/fonts/fonts.css.example +0 -0
- package/templates/app-demo/public/icon-192x192.png.example +0 -0
- package/templates/app-demo/public/icon-512x512.png.example +0 -0
- package/templates/app-demo/src/App.tsx.example +0 -0
- package/templates/app-demo/src/config/app.ts.example +0 -0
- package/templates/app-demo/src/entities/booking.ts.example +0 -0
- package/templates/app-demo/src/entities/onboarding.ts.example +0 -0
- package/templates/app-demo/src/entities/product.ts.example +0 -0
- package/templates/app-demo/src/entities/quote.ts.example +0 -0
- package/templates/app-demo/src/globals.css.example +0 -0
- package/templates/app-demo/src/main.tsx.example +0 -0
- package/templates/app-demo/src/pages/ChangelogPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/ConditionalFormPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/DashboardPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/HomePage.tsx.example +0 -0
- package/templates/app-demo/src/pages/OnboardingPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/PricingPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/ProductsPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/ProfilePage.tsx.example +0 -0
- package/templates/app-demo/src/pages/SettingsPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/ShowcaseDetailPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/ShowcasePage.tsx.example +0 -0
- package/templates/app-demo/src/pages/components/ComponentRenderer.tsx.example +0 -0
- package/templates/app-demo/src/pages/components/ComponentsData.tsx.example +0 -0
- package/templates/app-demo/src/pages/components/componentConfig.ts.example +0 -0
- package/templates/app-demo/src/pages/legal/LegalPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/legal/PrivacyPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/legal/TermsPage.tsx.example +0 -0
- package/templates/app-demo/src/themes.css.example +6 -0
- package/templates/app-demo/tsconfig.json.example +0 -0
- package/templates/app-demo/vite.config.ts.example +0 -0
- package/templates/app-dndev/index.html.example +0 -0
- package/templates/app-dndev/src/App.tsx.example +0 -0
- package/templates/app-dndev/src/components/CockpitLayout.css.example +0 -0
- package/templates/app-dndev/src/components/CockpitLayout.tsx.example +0 -0
- package/templates/app-dndev/src/components/Kanban.css.example +0 -0
- package/templates/app-dndev/src/components/ModeToggle.tsx.example +0 -0
- package/templates/app-dndev/src/components/OverlaySlot.tsx.example +0 -0
- package/templates/app-dndev/src/components/TerminalPanel.css.example +0 -0
- package/templates/app-dndev/src/components/TerminalPanel.tsx.example +0 -0
- package/templates/app-dndev/src/components/markdown-prose.css.example +0 -0
- package/templates/app-dndev/src/components/phases/CaptainLog.tsx.example +0 -0
- package/templates/app-dndev/src/components/phases/ContextTabs.tsx.example +0 -0
- package/templates/app-dndev/src/components/phases/PhaseCard.tsx.example +0 -0
- package/templates/app-dndev/src/components/phases/PhaseDetail.tsx.example +0 -0
- package/templates/app-dndev/src/components/phases/ReviewPanel.tsx.example +0 -0
- package/templates/app-dndev/src/components/phases/phaseData.ts.example +0 -0
- package/templates/app-dndev/src/config/app.ts.example +1 -1
- package/templates/app-dndev/src/config/commands.ts.example +0 -0
- package/templates/app-dndev/src/config/legal.ts.example +0 -0
- package/templates/app-dndev/src/config/providers.ts.example +1 -1
- package/templates/app-dndev/src/globals.css.example +0 -0
- package/templates/app-dndev/src/hooks/useDndevFile.ts.example +0 -0
- package/templates/app-dndev/src/main.tsx.example +0 -0
- package/templates/app-dndev/src/pages/BoardPage.tsx.example +0 -0
- package/templates/app-dndev/src/pages/GrillPage.tsx.example +0 -0
- package/templates/app-dndev/src/pages/HomePage.tsx.example +0 -0
- package/templates/app-dndev/src/pages/NotFoundPage.tsx.example +0 -0
- package/templates/app-dndev/src/pages/PhasesPage.tsx.example +0 -0
- package/templates/app-dndev/src/pages/SettingsPage.tsx.example +0 -0
- package/templates/app-dndev/src/pages/legal/LegalNoticePage.tsx.example +0 -0
- package/templates/app-dndev/src/pages/legal/PrivacyPage.tsx.example +0 -0
- package/templates/app-dndev/src/pages/legal/TermsPage.tsx.example +0 -0
- package/templates/app-dndev/src/stores/dndevStore.ts.example +0 -0
- package/templates/app-dndev/src/themes.css.example +5 -0
- package/templates/app-dndev/terminal-sidecar.cjs.example +0 -0
- package/templates/app-dndev/vite.config.ts.example +0 -0
- package/templates/app-expo/.env.example +0 -32
- package/templates/app-expo/.expo/README.md.example +0 -0
- package/templates/app-expo/.gitignore.example +0 -0
- package/templates/app-expo/README.md.example +1 -1
- package/templates/app-expo/app/.gitkeep +0 -0
- package/templates/app-expo/app/_layout.tsx.example +0 -0
- package/templates/app-expo/app/form.tsx.example +0 -0
- package/templates/app-expo/app/index.tsx.example +0 -0
- package/templates/app-expo/app/list.tsx.example +0 -0
- package/templates/app-expo/app/profile.tsx.example +0 -0
- package/templates/app-expo/app/signin.tsx.example +0 -0
- package/templates/app-expo/app.json.example +0 -0
- package/templates/app-expo/assets/adaptive-icon.png +0 -0
- package/templates/app-expo/assets/favicon.png +0 -0
- package/templates/app-expo/assets/icon.png +0 -0
- package/templates/app-expo/assets/splash.png +0 -0
- package/templates/app-expo/babel.config.js.example +0 -0
- package/templates/app-expo/eas.json.example +0 -0
- package/templates/app-expo/expo-env.d.ts.example +0 -0
- package/templates/app-expo/metro.config.js.example +0 -0
- package/templates/app-expo/service-account-key.json.example +1 -1
- package/templates/app-expo/src/config/app.ts.example +0 -0
- package/templates/app-expo/src/config/providers.ts.example +1 -1
- package/templates/app-expo/tsconfig.json.example +0 -0
- package/templates/app-next/.env.example +0 -33
- package/templates/app-next/next.config.ts.example +0 -2
- package/templates/app-next/postcss.config.js.example +0 -0
- package/templates/app-next/service-account-key.json.example +0 -0
- package/templates/app-next/src/app/ClientLayout.tsx.example +0 -0
- package/templates/app-next/src/app/not-found.tsx.example +14 -1
- package/templates/app-next/src/config/app.ts.example +1 -1
- package/templates/app-next/src/config/legal.ts.example +0 -0
- package/templates/app-next/src/config/providers.ts.example +1 -1
- package/templates/app-next/src/globals.css.example +0 -0
- package/templates/app-next/src/locales/dndev_en.json.example +0 -0
- package/templates/app-next/src/locales/home_en.json.example +6 -6
- package/templates/app-next/src/pages/HomePage.tsx.example +0 -0
- package/templates/app-next/src/pages/legal/LegalNoticePage.tsx.example +0 -0
- package/templates/app-next/src/pages/legal/PrivacyPage.tsx.example +0 -0
- package/templates/app-next/src/pages/legal/TermsPage.tsx.example +0 -0
- package/templates/app-next/src/pages/locales/example_en.json.example +0 -0
- package/templates/app-next/src/themes.css.example +7 -1
- package/templates/app-vite/.env.example +0 -33
- package/templates/app-vite/csp.example.json +0 -0
- package/templates/app-vite/index.html.example +0 -0
- package/templates/app-vite/service-account-key.json.example +0 -0
- package/templates/app-vite/src/App.tsx.example +0 -0
- package/templates/app-vite/src/config/app.ts.example +1 -1
- package/templates/app-vite/src/config/legal.ts.example +0 -0
- package/templates/app-vite/src/config/providers.ts.example +1 -1
- package/templates/app-vite/src/globals.css.example +0 -0
- package/templates/app-vite/src/locales/dndev_en.json.example +0 -0
- package/templates/app-vite/src/locales/home_en.json.example +6 -6
- package/templates/app-vite/src/main.tsx.example +0 -0
- package/templates/app-vite/src/pages/FormPageExample.tsx.example +0 -0
- package/templates/app-vite/src/pages/HomePage.tsx.example +1 -1
- package/templates/app-vite/src/pages/ListPageExample.tsx.example +0 -0
- package/templates/app-vite/src/pages/NotFoundPage.tsx.example +0 -0
- package/templates/app-vite/src/pages/legal/LegalNoticePage.tsx.example +0 -0
- package/templates/app-vite/src/pages/legal/PrivacyPage.tsx.example +0 -0
- package/templates/app-vite/src/pages/legal/TermsPage.tsx.example +0 -0
- package/templates/app-vite/src/pages/locales/example_en.json.example +0 -0
- package/templates/app-vite/src/themes.css.example +5 -0
- package/templates/deploy-config/.firebaserc.example +0 -0
- package/templates/deploy-config/firestore.indexes.json.example +0 -0
- package/templates/deploy-config/firestore.rules.example +0 -0
- package/templates/deploy-config/storage.rules.example +0 -0
- package/templates/deploy-config/tsconfig.functions.json.example +0 -0
- package/templates/deploy-config/vercel.json.example +2 -2
- package/templates/functions-firebase/.env.example +2 -2
- package/templates/functions-firebase/README.md.example +3 -3
- package/templates/functions-firebase/build.mjs.example +0 -0
- package/templates/functions-firebase/functions.config.js.example +0 -0
- package/templates/functions-firebase/functions.yaml.example +0 -0
- package/templates/functions-firebase/src/auth/getCustomClaims.ts.example +0 -0
- package/templates/functions-firebase/src/auth/getUserAuthStatus.ts.example +0 -0
- package/templates/functions-firebase/src/auth/index.ts.example +0 -0
- package/templates/functions-firebase/src/auth/removeCustomClaims.ts.example +0 -0
- package/templates/functions-firebase/src/auth/setCustomClaims.ts.example +0 -0
- package/templates/functions-firebase/src/billing/handleStripeWebhook.ts.example +0 -0
- package/templates/functions-firebase/src/billing/index.ts.example +0 -0
- package/templates/functions-firebase/src/billing/processPaymentSuccess.ts.example +0 -0
- package/templates/functions-firebase/src/billing/refreshSubscriptionStatus.ts.example +0 -0
- package/templates/functions-firebase/src/crud/createEntity.ts.example +0 -0
- package/templates/functions-firebase/src/crud/deleteEntity.ts.example +0 -0
- package/templates/functions-firebase/src/crud/getEntity.ts.example +0 -0
- package/templates/functions-firebase/src/crud/index.ts.example +0 -0
- package/templates/functions-firebase/src/crud/listEntities.ts.example +0 -0
- package/templates/functions-firebase/src/crud/updateEntity.ts.example +0 -0
- package/templates/functions-firebase/src/index.ts.example +0 -0
- package/templates/functions-firebase/src/oauth/checkGitHubAccess.ts.example +0 -0
- package/templates/functions-firebase/src/oauth/disconnect.ts.example +0 -0
- package/templates/functions-firebase/src/oauth/exchangeToken.ts.example +0 -0
- package/templates/functions-firebase/src/oauth/getConnections.ts.example +0 -0
- package/templates/functions-firebase/src/oauth/grantGitHubAccess.ts.example +0 -0
- package/templates/functions-firebase/src/oauth/index.ts.example +0 -0
- package/templates/functions-firebase/src/oauth/refreshToken.ts.example +0 -0
- package/templates/functions-firebase/src/oauth/revokeGitHubAccess.ts.example +0 -0
- package/templates/functions-firebase/tsconfig.json.example +0 -0
- package/templates/functions-supabase/supabase/config.toml.example +0 -0
- package/templates/functions-supabase/supabase/functions/.env.example +0 -0
- package/templates/functions-supabase/supabase/functions/cancel-subscription/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/change-plan/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/create-checkout-session/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/create-customer-portal/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/crud/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/delete-account/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/deno.json.example +0 -0
- package/templates/functions-supabase/supabase/functions/disconnect-oauth/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/exchange-token/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/get-connections/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/get-custom-claims/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/get-user-auth-status/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/refresh-subscription-status/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/refresh-token/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/remove-custom-claims/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/set-custom-claims/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/migrations/20250101000000_idempotency.sql +0 -0
- package/templates/functions-supabase/supabase/migrations/20250101000001_rate_limits.sql +0 -0
- package/templates/functions-supabase/supabase/migrations/20250101000002_cleanup_jobs.sql +0 -0
- package/templates/functions-supabase/supabase/migrations/20250101000003_operation_metrics.sql +0 -0
- package/templates/functions-supabase/supabase/migrations/20250101000004_crud_bulk.sql +192 -0
- package/templates/functions-vercel/.env.example +3 -3
- package/templates/functions-vercel/README.md.example +2 -2
- package/templates/functions-vercel/build.mjs.example +0 -0
- package/templates/functions-vercel/src/api/auth/getCustomClaims.ts.example +0 -0
- package/templates/functions-vercel/src/api/auth/getUserAuthStatus.ts.example +0 -0
- package/templates/functions-vercel/src/api/auth/removeCustomClaims.ts.example +0 -0
- package/templates/functions-vercel/src/api/auth/setCustomClaims.ts.example +0 -0
- package/templates/functions-vercel/src/api/billing/handleStripeWebhook.ts.example +0 -0
- package/templates/functions-vercel/src/api/billing/processPaymentSuccess.ts.example +0 -0
- package/templates/functions-vercel/src/api/billing/refreshSubscriptionStatus.ts.example +0 -0
- package/templates/functions-vercel/src/api/crud/createEntity.ts.example +0 -0
- package/templates/functions-vercel/src/api/crud/deleteEntity.ts.example +0 -0
- package/templates/functions-vercel/src/api/crud/getEntity.ts.example +0 -0
- package/templates/functions-vercel/src/api/crud/listEntities.ts.example +0 -0
- package/templates/functions-vercel/src/api/crud/updateEntity.ts.example +0 -0
- package/templates/functions-vercel/src/api/oauth/checkGitHubAccess.ts.example +0 -0
- package/templates/functions-vercel/src/api/oauth/disconnect.ts.example +0 -0
- package/templates/functions-vercel/src/api/oauth/exchangeToken.ts.example +0 -0
- package/templates/functions-vercel/src/api/oauth/getConnections.ts.example +0 -0
- package/templates/functions-vercel/src/api/oauth/grantGitHubAccess.ts.example +0 -0
- package/templates/functions-vercel/src/api/oauth/refreshToken.ts.example +0 -0
- package/templates/functions-vercel/src/api/oauth/revokeGitHubAccess.ts.example +0 -0
- package/templates/functions-vercel/tsconfig.json.example +0 -0
- package/templates/functions-vercel/vercel.json.example +0 -0
- package/templates/github-consumer/.github/workflows/ci.yml.example +0 -0
- package/templates/overlay-firebase/env.fragment.example +0 -0
- package/templates/overlay-firebase/env.fragment.expo.example +0 -0
- package/templates/overlay-firebase/env.fragment.nextjs.example +0 -0
- package/templates/overlay-firebase/src/config/providers.expo.ts.example +0 -0
- package/templates/overlay-firebase/src/config/providers.ts.example +0 -0
- package/templates/overlay-supabase/env.fragment.example +0 -0
- package/templates/overlay-supabase/env.fragment.expo.example +0 -0
- package/templates/overlay-supabase/env.fragment.nextjs.example +0 -0
- package/templates/overlay-supabase/src/config/providers.expo.ts.example +1 -1
- package/templates/overlay-supabase/src/config/providers.ts.example +1 -1
- package/templates/overlay-vercel/env.fragment.example +0 -0
- package/templates/overlay-vercel/env.fragment.nextjs.example +0 -0
- package/templates/overlay-vercel/src/config/providers.ts.example +0 -0
- package/templates/preset-admin/src/pages/DashboardPage.tsx.example +0 -0
- package/templates/preset-admin/src/pages/EntityPage.tsx.example +0 -0
- package/templates/preset-admin/src/pages/ReportsPage.tsx.example +0 -0
- package/templates/preset-admin/src/pages/SettingsPage.tsx.example +0 -0
- package/templates/preset-admin/src/pages/UsersPage.tsx.example +0 -0
- package/templates/preset-ecommerce/src/pages/CartPage.tsx.example +0 -0
- package/templates/preset-ecommerce/src/pages/CatalogPage.tsx.example +0 -0
- package/templates/preset-ecommerce/src/pages/CheckoutPage.tsx.example +0 -0
- package/templates/preset-ecommerce/src/pages/HomePage.tsx.example +0 -0
- package/templates/preset-ecommerce/src/pages/ProductPage.tsx.example +0 -0
- package/templates/preset-landing/src/pages/AboutPage.tsx.example +0 -0
- package/templates/preset-landing/src/pages/ContactPage.tsx.example +0 -0
- package/templates/preset-landing/src/pages/HomePage.tsx.example +0 -0
- package/templates/preset-saas/src/pages/DashboardPage.tsx.example +0 -0
- package/templates/preset-saas/src/pages/HomePage.tsx.example +0 -0
- package/templates/preset-saas/src/pages/PricingPage.tsx.example +0 -0
- package/templates/preset-saas/src/pages/ProfilePage.tsx.example +0 -0
- package/templates/preset-saas/src/pages/SettingsPage.tsx.example +0 -0
- package/templates/root-consumer/.claude/agents/architect.md.example +0 -0
- package/templates/root-consumer/.claude/agents/builder.md.example +0 -0
- package/templates/root-consumer/.claude/agents/coder.md.example +0 -0
- package/templates/root-consumer/.claude/agents/extractor.md.example +0 -0
- package/templates/root-consumer/.claude/agents/polisher.md.example +0 -0
- package/templates/root-consumer/.claude/agents/prompt-engineer.md.example +0 -0
- package/templates/root-consumer/.claude/hooks/guard-bash.sh.example +0 -0
- package/templates/root-consumer/.claude/hooks/guard-write.sh.example +2 -35
- package/templates/root-consumer/.claude/hooks/session-start.sh.example +1 -1
- package/templates/root-consumer/.claude/hooks/typecheck-stop.sh.example +0 -0
- package/templates/root-consumer/.claude/rules/consumer-ux.md.example +1 -1
- package/templates/root-consumer/.claude/rules/definition-of-done.md.example +0 -0
- package/templates/root-consumer/.claude/rules/framework.md.example +0 -0
- package/templates/root-consumer/.claude/rules/git.md.example +0 -0
- package/templates/root-consumer/.claude/rules/security.md.example +0 -0
- package/templates/root-consumer/.claude/settings.json.example +1 -27
- package/templates/root-consumer/.claude/skills/brainstorm/SKILL.md.example +0 -0
- package/templates/root-consumer/.claude/skills/build/SKILL.md.example +23 -106
- package/templates/root-consumer/.claude/skills/design/SKILL.md.example +0 -0
- package/templates/root-consumer/.claude/skills/design/output-template.md +0 -0
- package/templates/root-consumer/.claude/skills/grill/SKILL.md.example +0 -0
- package/templates/root-consumer/.claude/skills/polish/SKILL.md.example +0 -0
- package/templates/root-consumer/.claude/skills/techdebt/SKILL.md.example +0 -0
- package/templates/root-consumer/.cursor/mcp.json.example +0 -0
- package/templates/root-consumer/.cursor/rules/no-docs.mdc.example +5 -1
- package/templates/root-consumer/.dndev/args.json.example +0 -0
- package/templates/root-consumer/.dndev.secrets.example +0 -0
- package/templates/root-consumer/.env.example +0 -1
- package/templates/root-consumer/.gemini/settings.json.example +0 -0
- package/templates/root-consumer/.gitignore.example +1 -0
- package/templates/root-consumer/.mcp.json.example +0 -0
- package/templates/root-consumer/.prettierrc.cjs.example +0 -0
- package/templates/root-consumer/AGENTS.md.example +63 -0
- package/templates/root-consumer/CLAUDE.md.example +1 -33
- package/templates/root-consumer/README.md.example +11 -33
- package/templates/root-consumer/entities/index.ts.example +0 -0
- package/templates/root-consumer/eslint.config.js.example +0 -0
- package/templates/root-consumer/tsconfig.json.example +0 -0
- package/templates/root-consumer/.claude/hooks/framework-compliance.sh.example +0 -56
- package/templates/root-consumer/.claude/hooks/guard-files.sh.example +0 -46
- package/templates/root-consumer/.claude/hooks/guard-mcp.sh.example +0 -91
- package/templates/root-consumer/.claude/hooks/guard-secrets.sh.example +0 -67
- package/templates/root-consumer/.claude/hooks/track-mcp-lookup.sh.example +0 -20
- package/templates/root-consumer/.claude/statusline.py.example +0 -79
- package/templates/root-consumer/.clinerules.example +0 -1
- package/templates/root-consumer/.cursorrules.example +0 -1
- package/templates/root-consumer/.github/copilot-instructions.md.example +0 -1
- package/templates/root-consumer/.windsurfrules.example +0 -1
- package/templates/root-consumer/AI.md.example +0 -108
- package/templates/root-consumer/CONVENTIONS.md.example +0 -1
- package/templates/root-consumer/GEMINI.md.example +0 -1
- package/templates/root-consumer/guides/dndev/AGENT_START_HERE.md.example +0 -135
- package/templates/root-consumer/guides/dndev/COMPONENTS_ADV.md.example +0 -276
- package/templates/root-consumer/guides/dndev/INDEX.md.example +0 -56
- package/templates/root-consumer/guides/dndev/SETUP_AUTH.md.example +0 -134
- package/templates/root-consumer/guides/dndev/SETUP_BILLING.md.example +0 -114
- package/templates/root-consumer/guides/dndev/SETUP_FIREBASE.md.example +0 -231
- package/templates/root-consumer/guides/dndev/SETUP_OAUTH.md.example +0 -59
- package/templates/root-consumer/guides/dndev/SETUP_OAUTH_PROVIDERS.md.example +0 -60
- package/templates/root-consumer/guides/dndev/SETUP_SOC2.md.example +0 -234
- package/templates/root-consumer/guides/dndev/SETUP_STRIPE.md.example +0 -62
- package/templates/root-consumer/guides/dndev/SETUP_SUPABASE.md.example +0 -262
- package/templates/root-consumer/guides/dndev/advanced/APP_CHECK.md.example +0 -111
- package/templates/root-consumer/guides/dndev/advanced/COOKIE_REFERENCE.md.example +0 -252
- package/templates/root-consumer/guides/dndev/advanced/EMULATORS.md.example +0 -48
- package/templates/root-consumer/guides/wai-way/WAI_WAY_CLI.md.example +0 -402
- package/templates/root-consumer/guides/wai-way/agents/architect.md.example +0 -78
- package/templates/root-consumer/guides/wai-way/agents/builder.md.example +0 -97
- package/templates/root-consumer/guides/wai-way/agents/extractor.md.example +0 -363
- package/templates/root-consumer/guides/wai-way/agents/polisher.md.example +0 -133
- package/templates/root-consumer/guides/wai-way/blueprints/0_brainstorm.md.example +0 -315
- package/templates/root-consumer/guides/wai-way/blueprints/1_scaffold.md.example +0 -133
- package/templates/root-consumer/guides/wai-way/blueprints/2_entities.md.example +0 -111
- package/templates/root-consumer/guides/wai-way/blueprints/3_compose.md.example +0 -148
- package/templates/root-consumer/guides/wai-way/blueprints/4_configure.md.example +0 -238
- package/templates/root-consumer/guides/wai-way/context_map.json.example +0 -127
- package/templates/root-consumer/guides/wai-way/entity_patterns.md.example +0 -839
- package/templates/root-consumer/guides/wai-way/hld_template.md.example +0 -138
- package/templates/root-consumer/guides/wai-way/lld_template.md.example +0 -103
- package/templates/root-consumer/guides/wai-way/page_patterns.md.example +0 -722
- package/templates/root-consumer/guides/wai-way/prd_template.md.example +0 -140
- package/templates/root-consumer/guides/wai-way/presets_guide.md.example +0 -217
- package/templates/root-consumer/guides/wai-way/spec_template.md.example +0 -313
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
# DoNotDev Framework - Agent Quick Start
|
|
2
|
-
|
|
3
|
-
**Persona:** Lead Developer | UX Designer | Expert Adviser.
|
|
4
|
-
**Intelligence Engine:** This project is pre-configured with the **`dndev` MCP Server** in `.mcp.json`.
|
|
5
|
-
|
|
6
|
-
**Critical Rule:**
|
|
7
|
-
> **DO NOT GUESS. DO NOT HALLUCINATE.**
|
|
8
|
-
> Use `lookup_symbol("ComponentName")` to get actual TypeScript types. Every symbol has JSDoc and Types. Every setup has a Guide. Use them.
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## Getting Started (for humans)
|
|
13
|
-
|
|
14
|
-
**Canonical flow:** The showcase app’s **Get Started** page is the single source of truth: `apps/showcase/src/pages/GetStartedPage.tsx` and `apps/showcase/src/pages/locales/getstarted_*.json`. Below is the same flow in short form.
|
|
15
|
-
|
|
16
|
-
1. **P0 — Prerequisites**
|
|
17
|
-
- **Runtime:** **Node.js 24** (nodejs.org) and **Bun 1.3+** (bun.sh). Both required.
|
|
18
|
-
- **IDE:** Any IDE (Cursor, VS Code, Windsurf, etc.). Need help? Use the collapsible “Need help setting up?” on the Get Started page.
|
|
19
|
-
2. **Create your project’s monorepo**
|
|
20
|
-
- `bunx create-donotdev my-app`
|
|
21
|
-
3. **Open the repo in your IDE**
|
|
22
|
-
- Start your IDE in that repo. Dependencies are already installed.
|
|
23
|
-
4. **Enable MCP, then read AI.md and follow the flow**
|
|
24
|
-
- Talk with your agent; ask it to load the MCP (Cursor: Ctrl+Shift+P → “MCP Server” → enable “donotdev”; other IDEs: see “How to enable MCP” collapsible on the Get Started page).
|
|
25
|
-
- Then have the agent read the root **`AI.md`** and this file (**`guides/dndev/AGENT_START_HERE.md`**). Follow the phases.
|
|
26
|
-
5. **AI helps with provider; cd there, bun install, run**
|
|
27
|
-
- AI helps you choose and set up your provider (Firebase, Supabase, or custom). Then `cd` into the app directory if needed, `bun install`, and `dndev dev` / `dndev build` / `dndev deploy`.
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
## Demo App — Canonical Reference
|
|
32
|
-
|
|
33
|
-
**Before building anything, look at the demo app:** `packages/cli/templates/app-demo/`
|
|
34
|
-
|
|
35
|
-
It demonstrates the correct way to use the framework:
|
|
36
|
-
- Per-route layout switching via `PageMeta.preset` (landing → admin → docs)
|
|
37
|
-
- SaaS pages as thin template wrappers (~5 lines each)
|
|
38
|
-
- Component showcase with filterable grid and detail pages
|
|
39
|
-
- Entity definition with `defineEntity()`
|
|
40
|
-
- Zero custom CSS in page files
|
|
41
|
-
- Auth-guarded routes alongside public routes
|
|
42
|
-
|
|
43
|
-
**Copy from the demo app, then customize.** Don't invent patterns — the demo app IS the pattern.
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## First Thing to Call: list_features()
|
|
48
|
-
|
|
49
|
-
Call **`list_features()`** before designing or coding. It lists all framework packages with a one-line summary from each README (templates, core, ui, auth, billing, etc.). Use it so you don't reinvent what the framework already provides (blog, CRUD, billing, legal pages, etc.).
|
|
50
|
-
|
|
51
|
-
---
|
|
52
|
-
|
|
53
|
-
## The WAI-WAY Workflow (5 Phases)
|
|
54
|
-
|
|
55
|
-
Call `start_phase(N)` to begin each phase. It returns the blueprint, agent persona, and files to read.
|
|
56
|
-
|
|
57
|
-
### Phase 0: BRAINSTORM (Extractor)
|
|
58
|
-
- **MCP:** `start_phase(0)`
|
|
59
|
-
- **Goal:** Validated spec. Use BMAD probing questions to turn a vague idea into a complete `spec_template.md`.
|
|
60
|
-
- **Discovery:** `search_framework('topic')` to see what's possible.
|
|
61
|
-
|
|
62
|
-
### Phase 1: SCAFFOLD (Extractor)
|
|
63
|
-
- **MCP:** `start_phase(1)`
|
|
64
|
-
- **Goal:** Running skeleton. Run `dndev create-app` (interactive wizard, run directly — never `bunx`) and create `*Page.tsx` stubs.
|
|
65
|
-
|
|
66
|
-
### Phase 2: ENTITIES (Architect)
|
|
67
|
-
- **MCP:** `start_phase(2)`
|
|
68
|
-
- **Goal:** Single Source of Truth. Define entities in `entities/` using `defineEntity()`.
|
|
69
|
-
- **Types:** `lookup_symbol('defineEntity')` for exact props and @examples.
|
|
70
|
-
|
|
71
|
-
### Phase 3: COMPOSE (Builder)
|
|
72
|
-
- **MCP:** `start_phase(3)`
|
|
73
|
-
- **Goal:** Functional pages. Hardcode all strings. No i18n yet.
|
|
74
|
-
- **Types:** `lookup_symbol('Button')`, `lookup_symbol('EntityList')`, etc.
|
|
75
|
-
|
|
76
|
-
### Phase 4: CONFIGURE (Polisher)
|
|
77
|
-
- **MCP:** `start_phase(4)`
|
|
78
|
-
- **Goal:** QA & Polish. Update `app.ts`, `.env`, verify mobile (375px).
|
|
79
|
-
- **Lessons:** `record_lesson('Project quirk found')`.
|
|
80
|
-
|
|
81
|
-
Call `complete_phase()` after each phase. It records progress and tells you what's next.
|
|
82
|
-
|
|
83
|
-
---
|
|
84
|
-
|
|
85
|
-
## Mindset & Standards
|
|
86
|
-
|
|
87
|
-
* **SSOT Pattern:** The Entity is the brain. Change fields in `entities/*.ts` first. UI and DB follow.
|
|
88
|
-
* **Composition > Customization:** Do not write custom CSS. Use `<Stack>`, `<Grid>`, and component props.
|
|
89
|
-
* **Hardcode First:** In Phase 3, never use i18n. Validate the UI with real strings first.
|
|
90
|
-
* **Zero Drift:** Your documentation is the **compiled code**. `lookup_symbol` shows the current reality.
|
|
91
|
-
|
|
92
|
-
## Before You Start Coding
|
|
93
|
-
|
|
94
|
-
Check that the user has completed environment setup:
|
|
95
|
-
1. Firebase configured? (`.env` has `VITE_FIREBASE_API_KEY` filled in)
|
|
96
|
-
2. Service account key exists? (`service-account-key.json` in app root)
|
|
97
|
-
3. Emulators work? (`dndev emu start` runs without errors)
|
|
98
|
-
|
|
99
|
-
If not, coach them: "Run `dndev coach` to see what to configure, fill in the .env values, then run `dndev setup`." See [SETUP_FIREBASE.md](./SETUP_FIREBASE.md) or [SETUP_SUPABASE.md](./SETUP_SUPABASE.md).
|
|
100
|
-
|
|
101
|
-
---
|
|
102
|
-
|
|
103
|
-
## Project Args (`.dndev/args.json`)
|
|
104
|
-
|
|
105
|
-
Generated by `dndev init`. All features ON by default — Phase 0 narrows down based on what the user actually needs.
|
|
106
|
-
|
|
107
|
-
```json
|
|
108
|
-
{
|
|
109
|
-
"platform": "firebase",
|
|
110
|
-
"strictness": "enforced",
|
|
111
|
-
"features": ["crud", "auth", "i18n", "billing", "oauth", "functions"],
|
|
112
|
-
"region": "europe-west1"
|
|
113
|
-
}
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
| Field | Values | Effect |
|
|
117
|
-
|-------|--------|--------|
|
|
118
|
-
| `platform` | `firebase`, `vercel` | Derived from builder choice |
|
|
119
|
-
| `strictness` | `enforced`, `warnings`, `permissive` | `enforced` = blocks `complete_phase` on convention violations. `warnings` = reports but allows. `permissive` = skips checks. |
|
|
120
|
-
| `features` | `crud`, `auth`, `i18n`, `billing`, `oauth`, `functions` | Filters gotchas — remove features the project doesn't use to reduce noise |
|
|
121
|
-
| `region` | any GCP region | Informational, shown in `start_phase` context |
|
|
122
|
-
|
|
123
|
-
`start_phase()` returns project args + phase-relevant gotchas automatically. `complete_phase()` respects `strictness`.
|
|
124
|
-
|
|
125
|
-
**Without MCP:** `args.json` and `GOTCHAS.md` are plain files. Any agent can read them directly.
|
|
126
|
-
|
|
127
|
-
---
|
|
128
|
-
|
|
129
|
-
## Gotchas (`guides/dndev/GOTCHAS.md`)
|
|
130
|
-
|
|
131
|
-
Common mistakes, phase-tagged. `start_phase(N)` automatically filters and returns only the gotchas relevant to phase N and your enabled features. Read the full file for reference: [GOTCHAS.md](../guides/dndev/GOTCHAS.md).
|
|
132
|
-
|
|
133
|
-
---
|
|
134
|
-
|
|
135
|
-
**Starting:** Call `list_features()` first, then `get_phase_status()` to see where you are, then `start_phase(0)` to begin.
|
|
@@ -1,276 +0,0 @@
|
|
|
1
|
-
# Advanced Components (@donotdev/components)
|
|
2
|
-
|
|
3
|
-
High-level, opinionated, and marketing-focused UI components from `@donotdev/components`.
|
|
4
|
-
|
|
5
|
-
All advanced components are included in `@donotdev/components` — no additional package needed.
|
|
6
|
-
Styles are automatically included via `@donotdev/components/styles`.
|
|
7
|
-
|
|
8
|
-
## Components
|
|
9
|
-
|
|
10
|
-
### Crawl
|
|
11
|
-
|
|
12
|
-
Cinematic 3D text crawl component with lazy loading.
|
|
13
|
-
|
|
14
|
-
```tsx
|
|
15
|
-
import { Crawl } from '@donotdev/components';
|
|
16
|
-
|
|
17
|
-
<Crawl
|
|
18
|
-
intro?: ReactNode | string
|
|
19
|
-
title?: ReactNode | string
|
|
20
|
-
content: ReactNode | string | string[]
|
|
21
|
-
duration?: number // @default 26
|
|
22
|
-
contentHeight?: string // @default "150vh"
|
|
23
|
-
tiltAngle?: number
|
|
24
|
-
className?: string
|
|
25
|
-
style?: CSSProperties
|
|
26
|
-
aria-label?: string
|
|
27
|
-
/>
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
### Marquee
|
|
31
|
-
|
|
32
|
-
Production-grade marquee with accessibility, reduced motion support, and smart behavior detection.
|
|
33
|
-
|
|
34
|
-
```tsx
|
|
35
|
-
import { Marquee } from '@donotdev/components';
|
|
36
|
-
|
|
37
|
-
<Marquee<T>
|
|
38
|
-
items: T[]
|
|
39
|
-
renderItem: (item: T, index: number) => ReactNode
|
|
40
|
-
className?: string
|
|
41
|
-
itemClassName?: string
|
|
42
|
-
gap?: 'none' | 'tight' | 'medium' | 'large' // @default 'medium'
|
|
43
|
-
speed?: number // px per second
|
|
44
|
-
direction?: 'left' | 'right' | 'up' | 'down' | 'auto' // @default 'auto'
|
|
45
|
-
pauseOnHover?: boolean
|
|
46
|
-
ariaLabel?: string
|
|
47
|
-
reducedMotion?: 'respect' | 'ignore'
|
|
48
|
-
behavior?: 'bounce' | 'infinite' | 'auto'
|
|
49
|
-
pauseOnFocusWithin?: boolean
|
|
50
|
-
easing?: 'linear' | 'ease-in-out' | 'ease-out'
|
|
51
|
-
/>
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
### Roadmap
|
|
55
|
-
|
|
56
|
-
Timeline component with horizontal (desktop) / vertical (mobile) layout. Features animated progress line, glowing nodes, and lift-on-hover cards.
|
|
57
|
-
|
|
58
|
-
```tsx
|
|
59
|
-
import { Roadmap } from '@donotdev/components';
|
|
60
|
-
import type { RoadmapStep } from '@donotdev/components';
|
|
61
|
-
|
|
62
|
-
<Roadmap
|
|
63
|
-
steps: RoadmapStep[]
|
|
64
|
-
className?: string
|
|
65
|
-
variant?: CardVariant // @default 'default'
|
|
66
|
-
/>
|
|
67
|
-
|
|
68
|
-
// RoadmapStep interface:
|
|
69
|
-
interface RoadmapStep {
|
|
70
|
-
phase: string // e.g., "Week 1", "Days 1-2"
|
|
71
|
-
icon: LucideIcon
|
|
72
|
-
title: string
|
|
73
|
-
subtitle: string
|
|
74
|
-
description?: string
|
|
75
|
-
content?: CardContent // Optional content shown in popover on click
|
|
76
|
-
}
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
### StackedCards
|
|
80
|
-
|
|
81
|
-
Simple scroll-reveal stacked cards. Active card shows full content, stacked cards show only bottom edge with number.
|
|
82
|
-
|
|
83
|
-
```tsx
|
|
84
|
-
import { StackedCards } from '@donotdev/components';
|
|
85
|
-
import type { StackedCardData } from '@donotdev/components';
|
|
86
|
-
|
|
87
|
-
<StackedCards
|
|
88
|
-
items: StackedCardData[]
|
|
89
|
-
variant?: SurfaceVariantProps['variant']
|
|
90
|
-
ariaLabel?: string
|
|
91
|
-
threshold?: number // Intersection threshold (0.0 - 1.0) @default 0.3
|
|
92
|
-
className?: string
|
|
93
|
-
style?: CSSProperties
|
|
94
|
-
/>
|
|
95
|
-
|
|
96
|
-
// StackedCardData extends ComponentData with:
|
|
97
|
-
interface StackedCardData extends ComponentData {
|
|
98
|
-
number?: string | number // Custom number/label (e.g. "01", "Week 1"). Defaults to index.
|
|
99
|
-
}
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
### Reveal
|
|
103
|
-
|
|
104
|
-
Reveal component for staggered animations. Features viewport-based visibility detection, directional animations, and customizable stagger delays.
|
|
105
|
-
|
|
106
|
-
```tsx
|
|
107
|
-
import { Reveal } from '@donotdev/components';
|
|
108
|
-
|
|
109
|
-
<Reveal
|
|
110
|
-
items: string[] | ReactNode[]
|
|
111
|
-
direction?: 'left' | 'right' | 'top' | 'bottom' | 'fade-in' | 'alternate-h' | 'alternate-v'
|
|
112
|
-
stagger?: number // milliseconds between items
|
|
113
|
-
threshold?: number
|
|
114
|
-
distance?: number // animation distance in pixels
|
|
115
|
-
duration?: number // animation duration in milliseconds
|
|
116
|
-
once?: boolean // if true, only animate once
|
|
117
|
-
viewport?: boolean // if true, only animate items in viewport
|
|
118
|
-
overrides?: Array<{
|
|
119
|
-
index: number
|
|
120
|
-
direction: 'left' | 'right' | 'top' | 'bottom' | 'fade-in'
|
|
121
|
-
}>
|
|
122
|
-
className?: string
|
|
123
|
-
children?: ReactNode
|
|
124
|
-
/>
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
### Carousel
|
|
128
|
-
|
|
129
|
-
Premium carousel component with lazy loading built-in. Features true infinite circular loop, hardware-accelerated animations, swipe/touch gestures, and autoplay with pause-on-hover.
|
|
130
|
-
|
|
131
|
-
```tsx
|
|
132
|
-
import { Carousel } from '@donotdev/components';
|
|
133
|
-
import type { CarouselProps, CarouselRef } from '@donotdev/components';
|
|
134
|
-
|
|
135
|
-
<Carousel<T>
|
|
136
|
-
items: T[]
|
|
137
|
-
renderItem: (item: T, index: number, isActive: boolean) => ReactNode
|
|
138
|
-
className?: string
|
|
139
|
-
slideClassName?: string
|
|
140
|
-
showArrows?: boolean
|
|
141
|
-
showDots?: boolean
|
|
142
|
-
showProgress?: boolean
|
|
143
|
-
autoplay?: boolean
|
|
144
|
-
autoplayInterval?: number // milliseconds
|
|
145
|
-
transitionDuration?: number // milliseconds
|
|
146
|
-
loop?: boolean
|
|
147
|
-
// ... and more props
|
|
148
|
-
/>
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
### SplitReveal
|
|
152
|
-
|
|
153
|
-
Split reveal component for displaying content in two columns. Features left column content and right column stat cards or custom content with reveal animations.
|
|
154
|
-
|
|
155
|
-
```tsx
|
|
156
|
-
import { SplitReveal } from '@donotdev/components';
|
|
157
|
-
import type { StatCardData } from '@donotdev/components';
|
|
158
|
-
|
|
159
|
-
<SplitReveal
|
|
160
|
-
left: ReactNode
|
|
161
|
-
right: ReactNode | StatCardData[]
|
|
162
|
-
leftDirection?: 'left' | 'right' | 'top' | 'bottom' | 'fade-in' // @default 'left'
|
|
163
|
-
rightDirection?: 'left' | 'right' | 'top' | 'bottom' | 'fade-in' // @default 'right'
|
|
164
|
-
threshold?: number // @default 0.3
|
|
165
|
-
className?: string
|
|
166
|
-
/>
|
|
167
|
-
|
|
168
|
-
// StatCardData interface:
|
|
169
|
-
interface StatCardData {
|
|
170
|
-
title: string
|
|
171
|
-
description: string
|
|
172
|
-
}
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
## Notes
|
|
176
|
-
|
|
177
|
-
- All components are lazy-loaded by default for optimal performance
|
|
178
|
-
- Components use framework theme variables for consistent styling
|
|
179
|
-
- Most components support reduced motion preferences
|
|
180
|
-
- All components are SSR-safe and work with both Vite and Next.js
|
|
181
|
-
|
|
182
|
-
## FAQSection (from @donotdev/core)
|
|
183
|
-
|
|
184
|
-
FAQ section component for displaying frequently asked questions using accordion. Reads FAQ items from i18n JSON files.
|
|
185
|
-
|
|
186
|
-
**Note:** This component is from `@donotdev/core`, not `@donotdev/components`. It requires i18n setup with translation files.
|
|
187
|
-
|
|
188
|
-
```tsx
|
|
189
|
-
import { FAQSection, useTranslation } from '@donotdev/core';
|
|
190
|
-
import { Section } from '@donotdev/components';
|
|
191
|
-
|
|
192
|
-
function FAQPage() {
|
|
193
|
-
const { t } = useTranslation(['faq']);
|
|
194
|
-
|
|
195
|
-
return (
|
|
196
|
-
<Section>
|
|
197
|
-
<FAQSection t={t} keyPrefix="faqs.items" maxIndex={50} />
|
|
198
|
-
</Section>
|
|
199
|
-
);
|
|
200
|
-
}
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
**Props:**
|
|
204
|
-
- `t: TFunction` - Translation function from `useTranslation` hook
|
|
205
|
-
- `keyPrefix: string` - Base key prefix for FAQ items (e.g., `'faqs.items'`)
|
|
206
|
-
- `maxIndex?: number` - Maximum number of FAQ items to check (default: 50)
|
|
207
|
-
- `className?: string` - CSS class for container
|
|
208
|
-
- `itemClassName?: string` - CSS class for each accordion item
|
|
209
|
-
- `aria-label?: string` - ARIA label for accessibility (default: 'Frequently Asked Questions')
|
|
210
|
-
|
|
211
|
-
**JSON Structure:**
|
|
212
|
-
|
|
213
|
-
FAQ items must be in your i18n JSON files with this structure:
|
|
214
|
-
|
|
215
|
-
```json
|
|
216
|
-
{
|
|
217
|
-
"faqs": {
|
|
218
|
-
"items": [
|
|
219
|
-
{
|
|
220
|
-
"q": "Question text",
|
|
221
|
-
"a": "Answer text"
|
|
222
|
-
},
|
|
223
|
-
{
|
|
224
|
-
"q": "Another question",
|
|
225
|
-
"a": "Another answer"
|
|
226
|
-
}
|
|
227
|
-
]
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
The component uses `translateObjectArray` to automatically load all items from `keyPrefix` (e.g., `faqs.items[0]`, `faqs.items[1]`, etc.) up to `maxIndex`.
|
|
233
|
-
|
|
234
|
-
**Example:**
|
|
235
|
-
|
|
236
|
-
```tsx
|
|
237
|
-
// src/pages/FAQPage.tsx
|
|
238
|
-
import { FAQSection, useTranslation } from '@donotdev/core';
|
|
239
|
-
import { HeroSection, Section } from '@donotdev/components';
|
|
240
|
-
import { PageContainer } from '@donotdev/ui';
|
|
241
|
-
|
|
242
|
-
export const NAMESPACE = 'faq';
|
|
243
|
-
|
|
244
|
-
function FAQPage() {
|
|
245
|
-
const { t } = useTranslation([NAMESPACE]);
|
|
246
|
-
|
|
247
|
-
return (
|
|
248
|
-
<PageContainer variant="docs">
|
|
249
|
-
<HeroSection title={t('title')} subtitle={t('subtitle')} />
|
|
250
|
-
<Section>
|
|
251
|
-
<FAQSection t={t} keyPrefix="faqs.items" maxIndex={50} />
|
|
252
|
-
</Section>
|
|
253
|
-
</PageContainer>
|
|
254
|
-
);
|
|
255
|
-
}
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
```json
|
|
259
|
-
// src/pages/locales/faq_en.json
|
|
260
|
-
{
|
|
261
|
-
"title": "Frequently Asked Questions",
|
|
262
|
-
"subtitle": "Everything you need to know.",
|
|
263
|
-
"faqs": {
|
|
264
|
-
"items": [
|
|
265
|
-
{
|
|
266
|
-
"q": "How long does the free trial last?",
|
|
267
|
-
"a": "There is no limit. You can use the framework packages indefinitely for development and local testing."
|
|
268
|
-
},
|
|
269
|
-
{
|
|
270
|
-
"q": "What is the watermark?",
|
|
271
|
-
"a": "The watermark is a floating button that appears when running applications without a valid license."
|
|
272
|
-
}
|
|
273
|
-
]
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
```
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
# DoNotDev Framework Guides
|
|
2
|
-
|
|
3
|
-
**For AI Agents:** See [AGENT_START_HERE.md](./AGENT_START_HERE.md) - **START HERE**
|
|
4
|
-
|
|
5
|
-
**AI System:** Commands in `.claude/commands/`, agents in `.claude/agents/` (synced via `dndev bump`)
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Getting Started
|
|
10
|
-
|
|
11
|
-
- **Human flow:** P0 (Bun/Node + AI IDE) -> Install CLI & `dndev init` -> Run **AI.md** -> Enjoy.
|
|
12
|
-
- [SETUP_FIREBASE.md](./SETUP_FIREBASE.md) - Firebase project setup (`dndev coach` -> `dndev setup`)
|
|
13
|
-
- [SETUP_SUPABASE.md](./SETUP_SUPABASE.md) - Supabase project setup (`dndev coach` -> `dndev setup`)
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
## Feature Setup
|
|
18
|
-
|
|
19
|
-
- [SETUP_AUTH.md](./SETUP_AUTH.md) - Authentication (pre-configured)
|
|
20
|
-
- [SETUP_OAUTH.md](./SETUP_OAUTH.md) - OAuth connections (pre-configured)
|
|
21
|
-
- [SETUP_OAUTH_PROVIDERS.md](./SETUP_OAUTH_PROVIDERS.md) - OAuth provider configuration
|
|
22
|
-
- [SETUP_BILLING.md](./SETUP_BILLING.md) - Stripe subscriptions (pre-configured)
|
|
23
|
-
- [SETUP_STRIPE.md](./SETUP_STRIPE.md) - Stripe integration details
|
|
24
|
-
- [SETUP_SOC2.md](./SETUP_SOC2.md) - SOC2 compliance
|
|
25
|
-
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
## Component Reference
|
|
29
|
-
|
|
30
|
-
- [COMPONENTS_ADV.md](./COMPONENTS_ADV.md) - Advanced components (@donotdev/components)
|
|
31
|
-
|
|
32
|
-
---
|
|
33
|
-
|
|
34
|
-
## Advanced
|
|
35
|
-
|
|
36
|
-
- [advanced/APP_CHECK.md](./advanced/APP_CHECK.md) - Abuse protection
|
|
37
|
-
- [advanced/EMULATORS.md](./advanced/EMULATORS.md) - Local emulator setup
|
|
38
|
-
- [advanced/COOKIE_REFERENCE.md](./advanced/COOKIE_REFERENCE.md) - Cookie consent reference
|
|
39
|
-
|
|
40
|
-
---
|
|
41
|
-
|
|
42
|
-
## Covered by Package Guidelines (MCP)
|
|
43
|
-
|
|
44
|
-
The following topics are maintained as package guidelines and served via MCP `get_guideline()`. They are not duplicated here:
|
|
45
|
-
|
|
46
|
-
**Core:** App Config, CI/CD, Env Setup, I18n, PWA, Testing, Themes, Essences
|
|
47
|
-
**UI:** Components, Gotchas, Layouts, Pages, Routing, SEO
|
|
48
|
-
**Components:** Atomic Components, API Reference
|
|
49
|
-
**Templates:** Blog
|
|
50
|
-
**Functions:** Functions, Vercel
|
|
51
|
-
**CRUD:** CRUD Setup, CRUD Components
|
|
52
|
-
**CLI:** Version Control
|
|
53
|
-
|
|
54
|
-
---
|
|
55
|
-
|
|
56
|
-
**Convention over configuration. AI-first design.**
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
# Setup: Authentication
|
|
2
|
-
|
|
3
|
-
**Most is pre-configured.** Works with Firebase Auth or Supabase Auth. Add env vars and config. Framework handles providers, callbacks, sessions.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Standard Use
|
|
8
|
-
|
|
9
|
-
**Environment:**
|
|
10
|
-
```bash
|
|
11
|
-
# .env
|
|
12
|
-
VITE_AUTH_PARTNERS=password,emailLink,google,github,facebook
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
**Config:**
|
|
16
|
-
```typescript
|
|
17
|
-
// src/config/app.ts
|
|
18
|
-
export const appConfig: AppConfig = {
|
|
19
|
-
auth: {
|
|
20
|
-
// authRoute: null, // Default: show sign-in in-place (no redirect)
|
|
21
|
-
// authRoute: '/signin', // Optional: redirect to custom login page
|
|
22
|
-
// loginPath: '/login', // Optional: undefined = header providers
|
|
23
|
-
profilePath: '/profile',
|
|
24
|
-
},
|
|
25
|
-
};
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
**Firebase:** Enable providers in Firebase Console → Authentication → Sign-in method
|
|
29
|
-
**Supabase:** Enable providers in Supabase Dashboard → Authentication → Providers
|
|
30
|
-
|
|
31
|
-
### Redirect URLs (Supabase only)
|
|
32
|
-
|
|
33
|
-
After OAuth (Google, GitHub, etc.), Supabase redirects the user back to your app. You must tell Supabase which URLs are allowed.
|
|
34
|
-
|
|
35
|
-
**Supabase Dashboard → Authentication → URL Configuration:**
|
|
36
|
-
|
|
37
|
-
| Setting | Value |
|
|
38
|
-
|---------|-------|
|
|
39
|
-
| **Site URL** | Your **production** URL (e.g., `https://myapp.vercel.app`) |
|
|
40
|
-
| **Redirect URLs** | All URLs where auth should work (see below) |
|
|
41
|
-
|
|
42
|
-
**Add to Redirect URLs:**
|
|
43
|
-
- `http://localhost:5173` — local Vite dev
|
|
44
|
-
- `http://localhost:3000` — local Next.js dev
|
|
45
|
-
- `https://myapp.vercel.app` — production
|
|
46
|
-
- `https://*-yourteam.vercel.app` — Vercel preview deploys
|
|
47
|
-
|
|
48
|
-
> **Site URL must be production.** It's the fallback when no redirect URL matches. If it's `localhost:3000`, your deployed app redirects to localhost after OAuth.
|
|
49
|
-
|
|
50
|
-
---
|
|
51
|
-
|
|
52
|
-
## Advanced: Protected Routes
|
|
53
|
-
|
|
54
|
-
```tsx
|
|
55
|
-
// Basic protection
|
|
56
|
-
export const meta: PageMeta = {
|
|
57
|
-
namespace: NAMESPACE,
|
|
58
|
-
auth: { required: true },
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
// Role-based access
|
|
62
|
-
export const meta: PageMeta = {
|
|
63
|
-
namespace: NAMESPACE,
|
|
64
|
-
auth: { required: true, role: 'admin' },
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
// Tier-based access
|
|
68
|
-
export const meta: PageMeta = {
|
|
69
|
-
namespace: NAMESPACE,
|
|
70
|
-
auth: { required: true, tier: 'pro' },
|
|
71
|
-
};
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
---
|
|
75
|
-
|
|
76
|
-
## Advanced: Components & Hooks
|
|
77
|
-
|
|
78
|
-
```tsx
|
|
79
|
-
import { useAuth } from '@donotdev/auth';
|
|
80
|
-
import { MultipleAuthProviders, AuthPartnerButton } from '@donotdev/auth';
|
|
81
|
-
import { AuthHeader, AuthMenu } from '@donotdev/ui';
|
|
82
|
-
import { LoginTemplate } from '@donotdev/templates';
|
|
83
|
-
|
|
84
|
-
// Hook
|
|
85
|
-
const user = useAuth('user');
|
|
86
|
-
const signIn = useAuth('signInWithEmail');
|
|
87
|
-
const signOut = useAuth('signOut');
|
|
88
|
-
|
|
89
|
-
// Components
|
|
90
|
-
<MultipleAuthProviders layout="vertical" emailMode="signin" />
|
|
91
|
-
<AuthPartnerButton partnerId="google" method="popup" />
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
**Pre-configured:** `AuthHeader` in layout (null if auth disabled), OAuth callbacks, session management, account linking.
|
|
95
|
-
|
|
96
|
-
---
|
|
97
|
-
|
|
98
|
-
## User Roles
|
|
99
|
-
|
|
100
|
-
**Role hierarchy:** `guest (0) < user (1) < admin (2) < super (3)`
|
|
101
|
-
|
|
102
|
-
**Default:** All authenticated users are `'user'` role.
|
|
103
|
-
|
|
104
|
-
**Setting admin/super roles:**
|
|
105
|
-
|
|
106
|
-
**Firebase** — Set customClaims:
|
|
107
|
-
```typescript
|
|
108
|
-
import { getFirebaseAdminAuth } from '@donotdev/firebase/server';
|
|
109
|
-
|
|
110
|
-
const auth = getFirebaseAdminAuth();
|
|
111
|
-
await auth.setCustomUserClaims(userId, {
|
|
112
|
-
role: 'admin', // or 'super'
|
|
113
|
-
isAdmin: true // legacy support
|
|
114
|
-
});
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
**Supabase** — Set user metadata:
|
|
118
|
-
```sql
|
|
119
|
-
-- In Supabase Dashboard → SQL Editor
|
|
120
|
-
UPDATE auth.users SET raw_app_meta_data = raw_app_meta_data || '{"role": "admin"}' WHERE id = '<user-id>';
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
**Using CLI:**
|
|
124
|
-
```bash
|
|
125
|
-
dndev make-admin <userId>
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
**Note:** User must sign out and sign in again for role changes to take effect.
|
|
129
|
-
|
|
130
|
-
**Used by:** CRUD access control, protected routes, field visibility filtering.
|
|
131
|
-
|
|
132
|
-
---
|
|
133
|
-
|
|
134
|
-
**Add env vars, get auth. Framework handles the rest.**
|