@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,722 +0,0 @@
|
|
|
1
|
-
# Page Pattern Catalog
|
|
2
|
-
|
|
3
|
-
> **Don't invent page structures. Copy patterns, customize content.**
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Pattern Index
|
|
8
|
-
|
|
9
|
-
| Pattern | Use For | Key Components |
|
|
10
|
-
|---------|---------|----------------|
|
|
11
|
-
| [Dashboard](#dashboard) | Main logged-in view, stats, quick actions | Section, Grid, Card, ActionCard |
|
|
12
|
-
| [List Page](#list-page) | Entity CRUD table | EntityList |
|
|
13
|
-
| [Form Page](#form-page) | Entity create/edit | EntityFormRenderer |
|
|
14
|
-
| [Landing/Home](#landinghome) | Marketing, conversion | HeroSection, Section, Card, CTA |
|
|
15
|
-
| [Pricing](#pricing) | Plan comparison | PricingTable, Section |
|
|
16
|
-
| [Settings](#settings) | User preferences | Section, form components |
|
|
17
|
-
| [Profile](#profile) | User profile display/edit | Section, Card, Avatar |
|
|
18
|
-
| [Detail Page](#detail-page) | Single item display (non-edit) | Section (bleed), ImageGallery, Card, Grid |
|
|
19
|
-
| [Analytics](#analytics) | Charts and metrics | Section, Grid, Card, charts |
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## Dashboard
|
|
24
|
-
|
|
25
|
-
**Main logged-in view with KPIs, quick actions, alerts.**
|
|
26
|
-
|
|
27
|
-
```tsx
|
|
28
|
-
import { useEffect, useState } from 'react';
|
|
29
|
-
import { Spinner } from '@donotdev/components';
|
|
30
|
-
import { PageContainer, useNavigate } from '@donotdev/ui';
|
|
31
|
-
import { Section, Card, Grid, Stack, Button, Text, Badge } from '@donotdev/components';
|
|
32
|
-
import type { PageMeta } from '@donotdev/core';
|
|
33
|
-
import { ChartBar, Plus, ArrowRight } from 'lucide-react';
|
|
34
|
-
|
|
35
|
-
export const NAMESPACE = 'dashboard';
|
|
36
|
-
|
|
37
|
-
export const meta: PageMeta = {
|
|
38
|
-
namespace: NAMESPACE,
|
|
39
|
-
icon: <ChartBar />,
|
|
40
|
-
auth: { required: true },
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export default function DashboardPage() {
|
|
44
|
-
const navigate = useNavigate();
|
|
45
|
-
const [metrics, setMetrics] = useState<any>(null);
|
|
46
|
-
const [loading, setLoading] = useState(true);
|
|
47
|
-
|
|
48
|
-
useEffect(() => {
|
|
49
|
-
// Fetch dashboard metrics from API/function
|
|
50
|
-
fetchMetrics().then(setMetrics).finally(() => setLoading(false));
|
|
51
|
-
}, []);
|
|
52
|
-
|
|
53
|
-
return (
|
|
54
|
-
<PageContainer>
|
|
55
|
-
{/* Quick Actions */}
|
|
56
|
-
<Section title="Quick Actions" gridCols={[2, 2, 4, 4]}>
|
|
57
|
-
<Card
|
|
58
|
-
clickable
|
|
59
|
-
onClick={() => navigate('/items/new')}
|
|
60
|
-
icon={Plus}
|
|
61
|
-
title="Add New Item"
|
|
62
|
-
/>
|
|
63
|
-
{/* More action cards... */}
|
|
64
|
-
</Section>
|
|
65
|
-
|
|
66
|
-
{/* KPI Cards */}
|
|
67
|
-
<Section title="Overview" gridCols={[1, 2, 3, 3]}>
|
|
68
|
-
<Card variant="glass" title="Total Items">
|
|
69
|
-
{loading ? <Spinner overlay /> : (
|
|
70
|
-
<Text level="h2">{metrics?.totalItems ?? 0}</Text>
|
|
71
|
-
)}
|
|
72
|
-
</Card>
|
|
73
|
-
{/* More KPI cards... */}
|
|
74
|
-
</Section>
|
|
75
|
-
|
|
76
|
-
{/* Alerts/Actions Needed */}
|
|
77
|
-
{metrics?.needsAttention > 0 && (
|
|
78
|
-
<Section title="Needs Attention">
|
|
79
|
-
<Card variant="secondary">
|
|
80
|
-
<Stack direction="row" justify="between" align="center">
|
|
81
|
-
<Text>{metrics.needsAttention} items need review</Text>
|
|
82
|
-
<Button variant="outline" onClick={() => navigate('/items?filter=attention')}>
|
|
83
|
-
View <ArrowRight size={16} />
|
|
84
|
-
</Button>
|
|
85
|
-
</Stack>
|
|
86
|
-
</Card>
|
|
87
|
-
</Section>
|
|
88
|
-
)}
|
|
89
|
-
</PageContainer>
|
|
90
|
-
);
|
|
91
|
-
}
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
**Key patterns:**
|
|
95
|
-
- Quick actions at top (cards with onClick)
|
|
96
|
-
- KPI cards in grid
|
|
97
|
-
- Alert/attention sections with actions
|
|
98
|
-
- Loading states with `<Spinner overlay />`
|
|
99
|
-
|
|
100
|
-
---
|
|
101
|
-
|
|
102
|
-
## List Page
|
|
103
|
-
|
|
104
|
-
**Entity CRUD table with search, filter, pagination.**
|
|
105
|
-
|
|
106
|
-
```tsx
|
|
107
|
-
import { Car } from 'lucide-react';
|
|
108
|
-
import { EntityList } from '@donotdev/crud';
|
|
109
|
-
import { useAuth } from '@donotdev/auth';
|
|
110
|
-
import type { PageMeta } from '@donotdev/core';
|
|
111
|
-
import { PageContainer } from '@donotdev/ui';
|
|
112
|
-
import { carEntity } from 'entities/car';
|
|
113
|
-
|
|
114
|
-
export const NAMESPACE = 'cars';
|
|
115
|
-
|
|
116
|
-
export const meta: PageMeta = {
|
|
117
|
-
namespace: NAMESPACE,
|
|
118
|
-
auth: { required: true, role: 'admin' },
|
|
119
|
-
route: '/cars',
|
|
120
|
-
icon: <Car />,
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
export default function CarsListPage() {
|
|
124
|
-
const user = useAuth('user');
|
|
125
|
-
|
|
126
|
-
return (
|
|
127
|
-
<PageContainer>
|
|
128
|
-
<EntityList
|
|
129
|
-
entity={carEntity}
|
|
130
|
-
userRole={user?.role}
|
|
131
|
-
/>
|
|
132
|
-
</PageContainer>
|
|
133
|
-
);
|
|
134
|
-
}
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
**Key patterns:**
|
|
138
|
-
- Minimal code - `EntityList` handles everything
|
|
139
|
-
- Pass `userRole` for column filtering
|
|
140
|
-
- Route matches collection (e.g., `/cars` for `cars` collection)
|
|
141
|
-
|
|
142
|
-
---
|
|
143
|
-
|
|
144
|
-
## Form Page
|
|
145
|
-
|
|
146
|
-
**Entity create/edit form.**
|
|
147
|
-
|
|
148
|
-
```tsx
|
|
149
|
-
import { useEffect, useState } from 'react';
|
|
150
|
-
import { PageContainer, Link, useNavigate } from '@donotdev/ui';
|
|
151
|
-
import { Section, Button, Alert } from '@donotdev/components';
|
|
152
|
-
import { EntityFormRenderer, useCrud } from '@donotdev/crud';
|
|
153
|
-
import { carEntity } from 'entities/car';
|
|
154
|
-
import { useTranslation } from '@donotdev/core';
|
|
155
|
-
import type { PageMeta } from '@donotdev/core';
|
|
156
|
-
import { useParams } from '@donotdev/ui';
|
|
157
|
-
|
|
158
|
-
export const NAMESPACE = 'car';
|
|
159
|
-
|
|
160
|
-
export const meta: PageMeta = {
|
|
161
|
-
namespace: NAMESPACE,
|
|
162
|
-
route: '/cars/:id',
|
|
163
|
-
auth: { required: true, role: 'admin' },
|
|
164
|
-
hideFromMenu: true, // Don't show in nav
|
|
165
|
-
};
|
|
166
|
-
|
|
167
|
-
export default function CarPage() {
|
|
168
|
-
const { t } = useTranslation(NAMESPACE);
|
|
169
|
-
const { id } = useParams<{ id: string }>();
|
|
170
|
-
const navigate = useNavigate();
|
|
171
|
-
const isNew = id === 'new';
|
|
172
|
-
|
|
173
|
-
const { get, add, update, error } = useCrud(carEntity);
|
|
174
|
-
const [data, setData] = useState<any>(null);
|
|
175
|
-
|
|
176
|
-
// Fetch existing data for edit mode
|
|
177
|
-
useEffect(() => {
|
|
178
|
-
if (!isNew && id) {
|
|
179
|
-
get(id).then(setData);
|
|
180
|
-
}
|
|
181
|
-
}, [id, isNew, get]);
|
|
182
|
-
|
|
183
|
-
const handleSubmit = async (formData: any) => {
|
|
184
|
-
if (isNew) {
|
|
185
|
-
add(formData);
|
|
186
|
-
} else if (id) {
|
|
187
|
-
update(id, formData);
|
|
188
|
-
}
|
|
189
|
-
navigate('/cars');
|
|
190
|
-
};
|
|
191
|
-
|
|
192
|
-
// Error state
|
|
193
|
-
if (!isNew && error) {
|
|
194
|
-
return (
|
|
195
|
-
<PageContainer>
|
|
196
|
-
<Section title="Error">
|
|
197
|
-
<Alert variant="error" description="Failed to load data" />
|
|
198
|
-
<Link path="/cars">
|
|
199
|
-
<Button variant="outline">Back to list</Button>
|
|
200
|
-
</Link>
|
|
201
|
-
</Section>
|
|
202
|
-
</PageContainer>
|
|
203
|
-
);
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
return (
|
|
207
|
-
<PageContainer>
|
|
208
|
-
<Section title={isNew ? 'Create Car' : 'Edit Car'}>
|
|
209
|
-
{isNew ? (
|
|
210
|
-
<EntityFormRenderer
|
|
211
|
-
entity={carEntity}
|
|
212
|
-
operation="create"
|
|
213
|
-
onSubmit={handleSubmit}
|
|
214
|
-
defaultValues={{ status: 'draft' }}
|
|
215
|
-
submitText="Create"
|
|
216
|
-
/>
|
|
217
|
-
) : (
|
|
218
|
-
<EntityFormRenderer
|
|
219
|
-
entity={carEntity}
|
|
220
|
-
operation="edit"
|
|
221
|
-
onSubmit={handleSubmit}
|
|
222
|
-
defaultValues={data}
|
|
223
|
-
submitText="Update"
|
|
224
|
-
/>
|
|
225
|
-
)}
|
|
226
|
-
</Section>
|
|
227
|
-
</PageContainer>
|
|
228
|
-
);
|
|
229
|
-
}
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
**Key patterns:**
|
|
233
|
-
- Route: `/[collection]/:id` where `id` can be "new"
|
|
234
|
-
- `hideFromMenu: true` - form pages don't show in nav
|
|
235
|
-
- Check `isNew` to determine create vs edit
|
|
236
|
-
- Don't mount form until data loaded (edit mode)
|
|
237
|
-
- Optimistic: navigate immediately, don't await
|
|
238
|
-
|
|
239
|
-
---
|
|
240
|
-
|
|
241
|
-
## Landing/Home
|
|
242
|
-
|
|
243
|
-
**Marketing page with hero, features, CTA.**
|
|
244
|
-
|
|
245
|
-
```tsx
|
|
246
|
-
import { PageContainer, useNavigate } from '@donotdev/ui';
|
|
247
|
-
import { HeroSection, Section, CallToAction, Card, Grid, Button } from '@donotdev/components';
|
|
248
|
-
import type { PageMeta } from '@donotdev/core';
|
|
249
|
-
import { Home } from 'lucide-react';
|
|
250
|
-
|
|
251
|
-
export const NAMESPACE = 'home';
|
|
252
|
-
|
|
253
|
-
export const meta: PageMeta = {
|
|
254
|
-
namespace: NAMESPACE,
|
|
255
|
-
icon: <Home />,
|
|
256
|
-
// No auth - public page
|
|
257
|
-
};
|
|
258
|
-
|
|
259
|
-
export default function HomePage() {
|
|
260
|
-
const navigate = useNavigate();
|
|
261
|
-
|
|
262
|
-
return (
|
|
263
|
-
<PageContainer>
|
|
264
|
-
{/* Hero with background image — bleed for full-viewport-width */}
|
|
265
|
-
<HeroSection
|
|
266
|
-
bleed
|
|
267
|
-
backgroundImage="/images/hero.jpg"
|
|
268
|
-
title="Your App Name"
|
|
269
|
-
subtitle="One-line value proposition"
|
|
270
|
-
fullHeight
|
|
271
|
-
>
|
|
272
|
-
<Button onClick={() => navigate('/signup')}>Get Started</Button>
|
|
273
|
-
<Button variant="outline" onClick={() => navigate('/about')}>Learn More</Button>
|
|
274
|
-
</HeroSection>
|
|
275
|
-
|
|
276
|
-
<Section title="Features">
|
|
277
|
-
<Grid cols={[1, 2, 3, 3]} gap="large">
|
|
278
|
-
<Card
|
|
279
|
-
title="Feature One"
|
|
280
|
-
content="Brief description of the feature and its benefit."
|
|
281
|
-
/>
|
|
282
|
-
<Card
|
|
283
|
-
title="Feature Two"
|
|
284
|
-
content="Brief description of the feature and its benefit."
|
|
285
|
-
/>
|
|
286
|
-
<Card
|
|
287
|
-
title="Feature Three"
|
|
288
|
-
content="Brief description of the feature and its benefit."
|
|
289
|
-
/>
|
|
290
|
-
</Grid>
|
|
291
|
-
</Section>
|
|
292
|
-
|
|
293
|
-
<Section title="How It Works">
|
|
294
|
-
<Grid cols={[1, 1, 3, 3]}>
|
|
295
|
-
<Card title="1. Sign Up" content="Create your account in seconds." />
|
|
296
|
-
<Card title="2. Configure" content="Set up your preferences." />
|
|
297
|
-
<Card title="3. Launch" content="Start using immediately." />
|
|
298
|
-
</Grid>
|
|
299
|
-
</Section>
|
|
300
|
-
|
|
301
|
-
{/* Full-width CTA with background image */}
|
|
302
|
-
<CallToAction
|
|
303
|
-
bleed
|
|
304
|
-
backgroundImage="/images/cta-bg.jpg"
|
|
305
|
-
title="Ready to get started?"
|
|
306
|
-
subtitle="Start your free trial today"
|
|
307
|
-
primaryAction={<Button onClick={() => navigate('/signup')}>Start Free Trial</Button>}
|
|
308
|
-
/>
|
|
309
|
-
</PageContainer>
|
|
310
|
-
);
|
|
311
|
-
}
|
|
312
|
-
```
|
|
313
|
-
|
|
314
|
-
**Key patterns:**
|
|
315
|
-
- `HeroSection bleed backgroundImage` at top for immersive hero banner
|
|
316
|
-
- Feature grid with `Card` components
|
|
317
|
-
- `CallToAction bleed backgroundImage` for full-width CTA with image
|
|
318
|
-
- `Section bleed` for any full-width content (galleries, maps, videos)
|
|
319
|
-
- HARDCODE strings first, i18n later
|
|
320
|
-
|
|
321
|
-
---
|
|
322
|
-
|
|
323
|
-
## Pricing
|
|
324
|
-
|
|
325
|
-
**Plan comparison page.**
|
|
326
|
-
|
|
327
|
-
```tsx
|
|
328
|
-
import { PageContainer, useNavigate } from '@donotdev/ui';
|
|
329
|
-
import { Section, PricingTable } from '@donotdev/components';
|
|
330
|
-
import type { PageMeta } from '@donotdev/core';
|
|
331
|
-
import { DollarSign } from 'lucide-react';
|
|
332
|
-
|
|
333
|
-
export const NAMESPACE = 'pricing';
|
|
334
|
-
|
|
335
|
-
export const meta: PageMeta = {
|
|
336
|
-
namespace: NAMESPACE,
|
|
337
|
-
icon: <DollarSign />,
|
|
338
|
-
};
|
|
339
|
-
|
|
340
|
-
export default function PricingPage() {
|
|
341
|
-
const navigate = useNavigate();
|
|
342
|
-
|
|
343
|
-
const plans = [
|
|
344
|
-
{
|
|
345
|
-
name: 'Free',
|
|
346
|
-
price: 0,
|
|
347
|
-
period: 'forever',
|
|
348
|
-
features: ['5 projects', 'Basic support', 'Community access'],
|
|
349
|
-
cta: { label: 'Get Started', onClick: () => navigate('/signup') },
|
|
350
|
-
},
|
|
351
|
-
{
|
|
352
|
-
name: 'Pro',
|
|
353
|
-
price: 29,
|
|
354
|
-
period: 'month',
|
|
355
|
-
features: ['Unlimited projects', 'Priority support', 'Advanced analytics'],
|
|
356
|
-
cta: { label: 'Start Trial', onClick: () => navigate('/signup?plan=pro') },
|
|
357
|
-
highlighted: true,
|
|
358
|
-
},
|
|
359
|
-
{
|
|
360
|
-
name: 'Enterprise',
|
|
361
|
-
price: 99,
|
|
362
|
-
period: 'month',
|
|
363
|
-
features: ['Everything in Pro', 'Dedicated support', 'Custom integrations'],
|
|
364
|
-
cta: { label: 'Contact Sales', onClick: () => navigate('/contact') },
|
|
365
|
-
},
|
|
366
|
-
];
|
|
367
|
-
|
|
368
|
-
return (
|
|
369
|
-
<PageContainer>
|
|
370
|
-
<Section title="Choose Your Plan" textAlign="center">
|
|
371
|
-
<PricingTable plans={plans} />
|
|
372
|
-
</Section>
|
|
373
|
-
</PageContainer>
|
|
374
|
-
);
|
|
375
|
-
}
|
|
376
|
-
```
|
|
377
|
-
|
|
378
|
-
---
|
|
379
|
-
|
|
380
|
-
## Settings
|
|
381
|
-
|
|
382
|
-
**User preferences with grouped sections.**
|
|
383
|
-
|
|
384
|
-
```tsx
|
|
385
|
-
import { PageContainer } from '@donotdev/ui';
|
|
386
|
-
import { Section, Card, Stack, Switch, Select, Button } from '@donotdev/components';
|
|
387
|
-
import type { PageMeta } from '@donotdev/core';
|
|
388
|
-
import { Settings as SettingsIcon } from 'lucide-react';
|
|
389
|
-
|
|
390
|
-
export const NAMESPACE = 'settings';
|
|
391
|
-
|
|
392
|
-
export const meta: PageMeta = {
|
|
393
|
-
namespace: NAMESPACE,
|
|
394
|
-
icon: <SettingsIcon />,
|
|
395
|
-
auth: { required: true },
|
|
396
|
-
};
|
|
397
|
-
|
|
398
|
-
export default function SettingsPage() {
|
|
399
|
-
return (
|
|
400
|
-
<PageContainer>
|
|
401
|
-
<Section title="Appearance">
|
|
402
|
-
<Card>
|
|
403
|
-
<Stack direction="row" justify="between" align="center">
|
|
404
|
-
<Text>Theme</Text>
|
|
405
|
-
<Select
|
|
406
|
-
options={[
|
|
407
|
-
{ value: 'light', label: 'Light' },
|
|
408
|
-
{ value: 'dark', label: 'Dark' },
|
|
409
|
-
{ value: 'system', label: 'System' },
|
|
410
|
-
]}
|
|
411
|
-
defaultValue="system"
|
|
412
|
-
/>
|
|
413
|
-
</Stack>
|
|
414
|
-
</Card>
|
|
415
|
-
</Section>
|
|
416
|
-
|
|
417
|
-
<Section title="Notifications">
|
|
418
|
-
<Card>
|
|
419
|
-
<Stack direction="column">
|
|
420
|
-
<Stack direction="row" justify="between" align="center">
|
|
421
|
-
<Text>Email notifications</Text>
|
|
422
|
-
<Switch defaultChecked />
|
|
423
|
-
</Stack>
|
|
424
|
-
<Stack direction="row" justify="between" align="center">
|
|
425
|
-
<Text>Push notifications</Text>
|
|
426
|
-
<Switch />
|
|
427
|
-
</Stack>
|
|
428
|
-
</Stack>
|
|
429
|
-
</Card>
|
|
430
|
-
</Section>
|
|
431
|
-
|
|
432
|
-
<Section title="Danger Zone">
|
|
433
|
-
<Card variant="destructive">
|
|
434
|
-
<Stack direction="row" justify="between" align="center">
|
|
435
|
-
<Text>Delete account</Text>
|
|
436
|
-
<Button variant="destructive">Delete</Button>
|
|
437
|
-
</Stack>
|
|
438
|
-
</Card>
|
|
439
|
-
</Section>
|
|
440
|
-
</PageContainer>
|
|
441
|
-
);
|
|
442
|
-
}
|
|
443
|
-
```
|
|
444
|
-
|
|
445
|
-
---
|
|
446
|
-
|
|
447
|
-
## Profile
|
|
448
|
-
|
|
449
|
-
**User profile display with edit.**
|
|
450
|
-
|
|
451
|
-
```tsx
|
|
452
|
-
import { PageContainer } from '@donotdev/ui';
|
|
453
|
-
import { Section, Card, Stack, Text, Avatar, Button } from '@donotdev/components';
|
|
454
|
-
import { useAuth } from '@donotdev/auth';
|
|
455
|
-
import type { PageMeta } from '@donotdev/core';
|
|
456
|
-
import { User } from 'lucide-react';
|
|
457
|
-
|
|
458
|
-
export const NAMESPACE = 'profile';
|
|
459
|
-
|
|
460
|
-
export const meta: PageMeta = {
|
|
461
|
-
namespace: NAMESPACE,
|
|
462
|
-
icon: <User />,
|
|
463
|
-
auth: { required: true },
|
|
464
|
-
};
|
|
465
|
-
|
|
466
|
-
export default function ProfilePage() {
|
|
467
|
-
const user = useAuth('user');
|
|
468
|
-
|
|
469
|
-
return (
|
|
470
|
-
<PageContainer>
|
|
471
|
-
<Section>
|
|
472
|
-
<Card>
|
|
473
|
-
<Stack direction="row" gap="large" align="center">
|
|
474
|
-
<Avatar
|
|
475
|
-
src={user?.photoURL}
|
|
476
|
-
fallback={user?.displayName?.[0] || 'U'}
|
|
477
|
-
size="large"
|
|
478
|
-
/>
|
|
479
|
-
<Stack direction="column" gap="tight">
|
|
480
|
-
<Text level="h2">{user?.displayName || 'User'}</Text>
|
|
481
|
-
<Text variant="muted">{user?.email}</Text>
|
|
482
|
-
</Stack>
|
|
483
|
-
</Stack>
|
|
484
|
-
</Card>
|
|
485
|
-
</Section>
|
|
486
|
-
|
|
487
|
-
<Section title="Account Details">
|
|
488
|
-
<Card>
|
|
489
|
-
<Stack direction="column">
|
|
490
|
-
<Stack direction="row" justify="between">
|
|
491
|
-
<Text variant="muted">Email</Text>
|
|
492
|
-
<Text>{user?.email}</Text>
|
|
493
|
-
</Stack>
|
|
494
|
-
<Stack direction="row" justify="between">
|
|
495
|
-
<Text variant="muted">Member since</Text>
|
|
496
|
-
<Text>{user?.createdAt?.toLocaleDateString()}</Text>
|
|
497
|
-
</Stack>
|
|
498
|
-
<Stack direction="row" justify="between">
|
|
499
|
-
<Text variant="muted">Role</Text>
|
|
500
|
-
<Text>{user?.role || 'user'}</Text>
|
|
501
|
-
</Stack>
|
|
502
|
-
</Stack>
|
|
503
|
-
</Card>
|
|
504
|
-
</Section>
|
|
505
|
-
|
|
506
|
-
<Section>
|
|
507
|
-
<Button variant="outline">Edit Profile</Button>
|
|
508
|
-
</Section>
|
|
509
|
-
</PageContainer>
|
|
510
|
-
);
|
|
511
|
-
}
|
|
512
|
-
```
|
|
513
|
-
|
|
514
|
-
---
|
|
515
|
-
|
|
516
|
-
## Detail Page
|
|
517
|
-
|
|
518
|
-
**Single item display (read-only).**
|
|
519
|
-
|
|
520
|
-
```tsx
|
|
521
|
-
import { useEffect, useState } from 'react';
|
|
522
|
-
import { Spinner } from '@donotdev/components';
|
|
523
|
-
import { PageContainer, useNavigate } from '@donotdev/ui';
|
|
524
|
-
import { Section, Card, Grid, Stack, Text, Button, Badge } from '@donotdev/components';
|
|
525
|
-
import { ImageGallery } from '@donotdev/components';
|
|
526
|
-
import { useCrud } from '@donotdev/crud';
|
|
527
|
-
import { productEntity } from 'entities/product';
|
|
528
|
-
import type { PageMeta } from '@donotdev/core';
|
|
529
|
-
import { useParams } from '@donotdev/ui';
|
|
530
|
-
|
|
531
|
-
export const NAMESPACE = 'product-detail';
|
|
532
|
-
|
|
533
|
-
export const meta: PageMeta = {
|
|
534
|
-
namespace: NAMESPACE,
|
|
535
|
-
route: '/products/:id',
|
|
536
|
-
hideFromMenu: true,
|
|
537
|
-
};
|
|
538
|
-
|
|
539
|
-
export default function ProductDetailPage() {
|
|
540
|
-
const { id } = useParams<{ id: string }>();
|
|
541
|
-
const navigate = useNavigate();
|
|
542
|
-
const { get } = useCrud(productEntity);
|
|
543
|
-
const [product, setProduct] = useState<any>(null);
|
|
544
|
-
const [loading, setLoading] = useState(true);
|
|
545
|
-
|
|
546
|
-
useEffect(() => {
|
|
547
|
-
if (id) {
|
|
548
|
-
get(id).then(setProduct).finally(() => setLoading(false));
|
|
549
|
-
}
|
|
550
|
-
}, [id, get]);
|
|
551
|
-
|
|
552
|
-
if (loading) return <PageContainer><Spinner overlay /></PageContainer>;
|
|
553
|
-
if (!product) return <PageContainer><Text>Product not found</Text></PageContainer>;
|
|
554
|
-
|
|
555
|
-
return (
|
|
556
|
-
<PageContainer>
|
|
557
|
-
{/* Full-width image gallery — bleed breaks out of content constraints */}
|
|
558
|
-
{product.images?.length > 0 && (
|
|
559
|
-
<Section bleed>
|
|
560
|
-
<ImageGallery images={product.images} />
|
|
561
|
-
</Section>
|
|
562
|
-
)}
|
|
563
|
-
|
|
564
|
-
<Section>
|
|
565
|
-
<Grid cols={[1, 1, 2, 2]} gap="large">
|
|
566
|
-
{/* Details */}
|
|
567
|
-
<Stack direction="column">
|
|
568
|
-
<Text level="h1">{product.name}</Text>
|
|
569
|
-
<Badge>{product.category}</Badge>
|
|
570
|
-
<Text level="h2">${product.price}</Text>
|
|
571
|
-
<Text>{product.description}</Text>
|
|
572
|
-
<Button onClick={() => navigate(`/admin/products/${id}`)}>
|
|
573
|
-
Edit
|
|
574
|
-
</Button>
|
|
575
|
-
</Stack>
|
|
576
|
-
</Grid>
|
|
577
|
-
</Section>
|
|
578
|
-
</PageContainer>
|
|
579
|
-
);
|
|
580
|
-
}
|
|
581
|
-
```
|
|
582
|
-
|
|
583
|
-
---
|
|
584
|
-
|
|
585
|
-
## Analytics
|
|
586
|
-
|
|
587
|
-
**Charts and metrics display.**
|
|
588
|
-
|
|
589
|
-
```tsx
|
|
590
|
-
import { useEffect, useState } from 'react';
|
|
591
|
-
import { Spinner } from '@donotdev/components';
|
|
592
|
-
import { PageContainer } from '@donotdev/ui';
|
|
593
|
-
import { Section, Card, Grid, Stack, Text } from '@donotdev/components';
|
|
594
|
-
import type { PageMeta } from '@donotdev/core';
|
|
595
|
-
import { TrendingUp } from 'lucide-react';
|
|
596
|
-
|
|
597
|
-
export const NAMESPACE = 'analytics';
|
|
598
|
-
|
|
599
|
-
export const meta: PageMeta = {
|
|
600
|
-
namespace: NAMESPACE,
|
|
601
|
-
icon: <TrendingUp />,
|
|
602
|
-
auth: { required: true, role: 'admin' },
|
|
603
|
-
};
|
|
604
|
-
|
|
605
|
-
export default function AnalyticsPage() {
|
|
606
|
-
const [data, setData] = useState<any>(null);
|
|
607
|
-
const [loading, setLoading] = useState(true);
|
|
608
|
-
|
|
609
|
-
useEffect(() => {
|
|
610
|
-
fetchAnalytics().then(setData).finally(() => setLoading(false));
|
|
611
|
-
}, []);
|
|
612
|
-
|
|
613
|
-
if (loading) return <PageContainer><Spinner overlay /></PageContainer>;
|
|
614
|
-
|
|
615
|
-
return (
|
|
616
|
-
<PageContainer>
|
|
617
|
-
{/* Summary Cards */}
|
|
618
|
-
<Section gridCols={[2, 4, 4, 4]}>
|
|
619
|
-
<Card variant="glass">
|
|
620
|
-
<Stack direction="column" gap="tight">
|
|
621
|
-
<Text variant="muted">Total Revenue</Text>
|
|
622
|
-
<Text level="h2">${data?.revenue?.toLocaleString()}</Text>
|
|
623
|
-
</Stack>
|
|
624
|
-
</Card>
|
|
625
|
-
<Card variant="glass">
|
|
626
|
-
<Stack direction="column" gap="tight">
|
|
627
|
-
<Text variant="muted">Orders</Text>
|
|
628
|
-
<Text level="h2">{data?.orders}</Text>
|
|
629
|
-
</Stack>
|
|
630
|
-
</Card>
|
|
631
|
-
{/* More cards... */}
|
|
632
|
-
</Section>
|
|
633
|
-
|
|
634
|
-
{/* Charts */}
|
|
635
|
-
<Section title="Revenue Over Time">
|
|
636
|
-
<Card>
|
|
637
|
-
{/* Your chart component here */}
|
|
638
|
-
<div style={{ height: 300 }}>Chart placeholder</div>
|
|
639
|
-
</Card>
|
|
640
|
-
</Section>
|
|
641
|
-
|
|
642
|
-
<Section title="Top Products" gridCols={[1, 2, 2, 2]}>
|
|
643
|
-
{data?.topProducts?.map((product: any) => (
|
|
644
|
-
<Card key={product.id}>
|
|
645
|
-
<Stack direction="row" justify="between">
|
|
646
|
-
<Text>{product.name}</Text>
|
|
647
|
-
<Text level="h4">{product.sales} sales</Text>
|
|
648
|
-
</Stack>
|
|
649
|
-
</Card>
|
|
650
|
-
))}
|
|
651
|
-
</Section>
|
|
652
|
-
</PageContainer>
|
|
653
|
-
);
|
|
654
|
-
}
|
|
655
|
-
```
|
|
656
|
-
|
|
657
|
-
---
|
|
658
|
-
|
|
659
|
-
## PageMeta Reference
|
|
660
|
-
|
|
661
|
-
Every page exports `meta: PageMeta`:
|
|
662
|
-
|
|
663
|
-
```tsx
|
|
664
|
-
export const meta: PageMeta = {
|
|
665
|
-
namespace: 'page-name', // i18n namespace, required
|
|
666
|
-
icon: <IconComponent />, // lucide-react icon, shown in nav
|
|
667
|
-
|
|
668
|
-
// Auth options
|
|
669
|
-
auth: true, // Requires login
|
|
670
|
-
auth: { required: true }, // Same as above
|
|
671
|
-
auth: { required: true, role: 'admin' }, // Requires specific role
|
|
672
|
-
|
|
673
|
-
// Route options
|
|
674
|
-
route: '/custom-path', // Override auto-generated route
|
|
675
|
-
route: '/items/:id', // Dynamic route
|
|
676
|
-
|
|
677
|
-
// Navigation options
|
|
678
|
-
hideFromMenu: true, // Don't show in sidebar/nav
|
|
679
|
-
};
|
|
680
|
-
```
|
|
681
|
-
|
|
682
|
-
---
|
|
683
|
-
|
|
684
|
-
## Full-Width Bleed (Breakthrough)
|
|
685
|
-
|
|
686
|
-
**When content needs to span the full viewport width**, use the `bleed` prop on Section, HeroSection, or CallToAction. This breaks out of `PageContainer` content constraints — no manual CSS needed.
|
|
687
|
-
|
|
688
|
-
```tsx
|
|
689
|
-
// Image gallery spanning full width (real estate, car listings, etc.)
|
|
690
|
-
<Section bleed>
|
|
691
|
-
<ImageGallery images={listing.images} />
|
|
692
|
-
</Section>
|
|
693
|
-
|
|
694
|
-
// Hero banner with background image
|
|
695
|
-
<HeroSection bleed backgroundImage="/hero.jpg" title="Welcome" fullHeight>
|
|
696
|
-
<Button>Get Started</Button>
|
|
697
|
-
</HeroSection>
|
|
698
|
-
|
|
699
|
-
// CTA with background image
|
|
700
|
-
<CallToAction bleed backgroundImage="/cta.jpg" title="Join Us" primaryAction={<Button>Sign Up</Button>} />
|
|
701
|
-
|
|
702
|
-
// Any content — map, video, testimonial wall
|
|
703
|
-
<Section bleed>
|
|
704
|
-
<MyMapComponent />
|
|
705
|
-
</Section>
|
|
706
|
-
```
|
|
707
|
-
|
|
708
|
-
**How it works:** CSS `width: 100vw; margin-inline: calc(50% - 50vw)` — works at any nesting depth.
|
|
709
|
-
|
|
710
|
-
**`backgroundImage` prop** (HeroSection, CallToAction only): Adds a cover image with a dark gradient overlay (`::before` pseudo-element) so text remains readable. Text automatically turns white.
|
|
711
|
-
|
|
712
|
-
---
|
|
713
|
-
|
|
714
|
-
## Usage
|
|
715
|
-
|
|
716
|
-
1. **Find pattern** that matches your page type
|
|
717
|
-
2. **Copy** the page component
|
|
718
|
-
3. **Customize** content, entity, routes
|
|
719
|
-
4. **Update** PageMeta for auth/nav requirements
|
|
720
|
-
5. **HARDCODE** strings first, i18n later
|
|
721
|
-
|
|
722
|
-
**Do NOT invent new page structures unless none fit.**
|