virastack 0.0.1 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +94 -18
- package/bin/virastack.js +7 -0
- package/package.json +43 -9
- package/src/commands/add.js +64 -0
- package/src/commands/init.js +286 -0
- package/src/i18n.js +231 -0
- package/src/index.js +64 -0
- package/src/utils/args.js +60 -0
- package/src/utils/copy-template.js +81 -0
- package/src/utils/exec.js +29 -0
- package/src/utils/git.js +38 -0
- package/src/utils/is-online.js +14 -0
- package/src/utils/package-info.js +12 -0
- package/src/utils/package-manager.js +33 -0
- package/src/utils/setup-env.js +25 -0
- package/src/utils/telemetry.js +86 -0
- package/src/utils/tools.js +48 -0
- package/src/utils/update-package-json.js +44 -0
- package/src/utils/update-readme.js +25 -0
- package/src/utils/validate-project-name.js +26 -0
- package/templates/nextjs/.changeset/README.md +8 -0
- package/templates/nextjs/.changeset/config.json +11 -0
- package/templates/nextjs/.env.example +6 -0
- package/templates/nextjs/.env.local +6 -0
- package/templates/nextjs/.eslintcache +1 -0
- package/templates/nextjs/.github/workflows/ci.yml +41 -0
- package/templates/nextjs/.husky/commit-msg +1 -0
- package/templates/nextjs/.husky/pre-commit +1 -0
- package/templates/nextjs/.husky/pre-push +1 -0
- package/templates/nextjs/.prettierignore +6 -0
- package/templates/nextjs/.prettierrc +42 -0
- package/templates/nextjs/.vscode/extensions.json +7 -0
- package/templates/nextjs/.vscode/settings.json +20 -0
- package/templates/nextjs/LICENSE +21 -0
- package/templates/nextjs/README.md +202 -0
- package/templates/nextjs/_gitignore +45 -0
- package/templates/nextjs/commitlint.config.js +6 -0
- package/templates/nextjs/eslint.config.mjs +27 -0
- package/templates/nextjs/knip.config.js +25 -0
- package/templates/nextjs/next-env.d.ts +6 -0
- package/templates/nextjs/next.config.ts +39 -0
- package/templates/nextjs/package.json +115 -0
- package/templates/nextjs/pnpm-lock.yaml +6467 -0
- package/templates/nextjs/pnpm-workspace.yaml +3 -0
- package/templates/nextjs/postcss.config.mjs +7 -0
- package/templates/nextjs/public/favicon.ico +0 -0
- package/templates/nextjs/public/llms.txt +96 -0
- package/templates/nextjs/public/logo.png +0 -0
- package/templates/nextjs/public/logo.webp +0 -0
- package/templates/nextjs/public/og.png +0 -0
- package/templates/nextjs/src/app/error.tsx +34 -0
- package/templates/nextjs/src/app/favicon.ico +0 -0
- package/templates/nextjs/src/app/global-error.tsx +32 -0
- package/templates/nextjs/src/app/layout.tsx +37 -0
- package/templates/nextjs/src/app/loading.tsx +12 -0
- package/templates/nextjs/src/app/manifest.ts +22 -0
- package/templates/nextjs/src/app/not-found.tsx +18 -0
- package/templates/nextjs/src/app/page.tsx +5 -0
- package/templates/nextjs/src/app/robots.ts +13 -0
- package/templates/nextjs/src/app/sitemap.ts +14 -0
- package/templates/nextjs/src/components/shared/ThemeToggle.tsx +30 -0
- package/templates/nextjs/src/components/ui/avatar.tsx +54 -0
- package/templates/nextjs/src/components/ui/button.tsx +46 -0
- package/templates/nextjs/src/components/ui/dialog.tsx +107 -0
- package/templates/nextjs/src/components/ui/field.tsx +24 -0
- package/templates/nextjs/src/components/ui/index.ts +27 -0
- package/templates/nextjs/src/components/ui/input.tsx +23 -0
- package/templates/nextjs/src/components/ui/label.tsx +17 -0
- package/templates/nextjs/src/components/ui/skeleton.tsx +13 -0
- package/templates/nextjs/src/components/ui/table.tsx +94 -0
- package/templates/nextjs/src/components/ui/tabs.tsx +46 -0
- package/templates/nextjs/src/config/seo.config.ts +37 -0
- package/templates/nextjs/src/config/site.config.ts +15 -0
- package/templates/nextjs/src/constants/index.ts +5 -0
- package/templates/nextjs/src/env.ts +41 -0
- package/templates/nextjs/src/features/landing/api/get-users.api.ts +7 -0
- package/templates/nextjs/src/features/landing/api/index.ts +2 -0
- package/templates/nextjs/src/features/landing/api/query-keys.ts +7 -0
- package/templates/nextjs/src/features/landing/components/CartDemo.tsx +66 -0
- package/templates/nextjs/src/features/landing/components/Features.tsx +39 -0
- package/templates/nextjs/src/features/landing/components/Hero.tsx +65 -0
- package/templates/nextjs/src/features/landing/components/LandingPage.tsx +17 -0
- package/templates/nextjs/src/features/landing/components/ProjectFormDemo.tsx +62 -0
- package/templates/nextjs/src/features/landing/components/Reveal.tsx +83 -0
- package/templates/nextjs/src/features/landing/components/Showcase.tsx +66 -0
- package/templates/nextjs/src/features/landing/components/UsersDemo.tsx +188 -0
- package/templates/nextjs/src/features/landing/data/features.data.tsx +47 -0
- package/templates/nextjs/src/features/landing/data/index.ts +1 -0
- package/templates/nextjs/src/features/landing/helpers/get-initials.ts +15 -0
- package/templates/nextjs/src/features/landing/helpers/index.ts +7 -0
- package/templates/nextjs/src/features/landing/helpers/motion.ts +21 -0
- package/templates/nextjs/src/features/landing/hooks/index.ts +1 -0
- package/templates/nextjs/src/features/landing/hooks/use-users.ts +16 -0
- package/templates/nextjs/src/features/landing/icons/index.ts +6 -0
- package/templates/nextjs/src/features/landing/icons/nextjs.tsx +68 -0
- package/templates/nextjs/src/features/landing/icons/react-hook-form.tsx +18 -0
- package/templates/nextjs/src/features/landing/icons/react.tsx +20 -0
- package/templates/nextjs/src/features/landing/icons/tailwind.tsx +14 -0
- package/templates/nextjs/src/features/landing/icons/tanstack.tsx +321 -0
- package/templates/nextjs/src/features/landing/icons/typescript.tsx +16 -0
- package/templates/nextjs/src/features/landing/index.ts +1 -0
- package/templates/nextjs/src/features/landing/schemas/index.ts +1 -0
- package/templates/nextjs/src/features/landing/schemas/project.schema.ts +7 -0
- package/templates/nextjs/src/features/landing/stores/counter.store.ts +18 -0
- package/templates/nextjs/src/features/landing/stores/index.ts +1 -0
- package/templates/nextjs/src/features/landing/types/index.ts +1 -0
- package/templates/nextjs/src/features/landing/types/user.types.ts +9 -0
- package/templates/nextjs/src/helpers/format-date.ts +13 -0
- package/templates/nextjs/src/helpers/index.ts +1 -0
- package/templates/nextjs/src/hooks/index.ts +5 -0
- package/templates/nextjs/src/lib/api.ts +97 -0
- package/templates/nextjs/src/lib/query-client.ts +18 -0
- package/templates/nextjs/src/lib/utils.ts +12 -0
- package/templates/nextjs/src/providers/Providers.tsx +15 -0
- package/templates/nextjs/src/providers/QueryProvider.tsx +19 -0
- package/templates/nextjs/src/providers/ThemeProvider.tsx +9 -0
- package/templates/nextjs/src/providers/index.ts +1 -0
- package/templates/nextjs/src/proxy.ts +6 -0
- package/templates/nextjs/src/schemas/index.ts +5 -0
- package/templates/nextjs/src/stores/index.ts +5 -0
- package/templates/nextjs/src/styles/tailwind.css +122 -0
- package/templates/nextjs/src/types/site-config.types.ts +10 -0
- package/templates/nextjs/tsconfig.json +45 -0
- package/templates/nextjs/tsconfig.tsbuildinfo +1 -0
- package/templates/tanstack/.changeset/README.md +8 -0
- package/templates/tanstack/.changeset/config.json +11 -0
- package/templates/tanstack/.env.example +6 -0
- package/templates/tanstack/.env.local +6 -0
- package/templates/tanstack/.eslintcache +1 -0
- package/templates/tanstack/.github/workflows/ci.yml +41 -0
- package/templates/tanstack/.husky/commit-msg +1 -0
- package/templates/tanstack/.husky/pre-commit +1 -0
- package/templates/tanstack/.husky/pre-push +1 -0
- package/templates/tanstack/.prettierignore +7 -0
- package/templates/tanstack/.prettierrc +41 -0
- package/templates/tanstack/.vscode/extensions.json +7 -0
- package/templates/tanstack/.vscode/settings.json +22 -0
- package/templates/tanstack/LICENSE +21 -0
- package/templates/tanstack/README.md +204 -0
- package/templates/tanstack/_gitignore +52 -0
- package/templates/tanstack/commitlint.config.js +6 -0
- package/templates/tanstack/eslint.config.js +28 -0
- package/templates/tanstack/knip.config.js +22 -0
- package/templates/tanstack/package.json +130 -0
- package/templates/tanstack/pnpm-lock.yaml +5835 -0
- package/templates/tanstack/pnpm-workspace.yaml +3 -0
- package/templates/tanstack/public/favicon.ico +0 -0
- package/templates/tanstack/public/llms.txt +86 -0
- package/templates/tanstack/public/logo.png +0 -0
- package/templates/tanstack/public/logo.webp +0 -0
- package/templates/tanstack/public/og.png +0 -0
- package/templates/tanstack/src/components/shared/DefaultCatchBoundary.tsx +36 -0
- package/templates/tanstack/src/components/shared/NotFound.tsx +18 -0
- package/templates/tanstack/src/components/shared/Pending.tsx +13 -0
- package/templates/tanstack/src/components/shared/ThemeToggle.tsx +31 -0
- package/templates/tanstack/src/components/ui/avatar.tsx +52 -0
- package/templates/tanstack/src/components/ui/button.tsx +47 -0
- package/templates/tanstack/src/components/ui/dialog.tsx +107 -0
- package/templates/tanstack/src/components/ui/field.tsx +24 -0
- package/templates/tanstack/src/components/ui/index.ts +27 -0
- package/templates/tanstack/src/components/ui/input.tsx +23 -0
- package/templates/tanstack/src/components/ui/label.tsx +17 -0
- package/templates/tanstack/src/components/ui/skeleton.tsx +13 -0
- package/templates/tanstack/src/components/ui/table.tsx +94 -0
- package/templates/tanstack/src/components/ui/tabs.tsx +46 -0
- package/templates/tanstack/src/config/seo.config.ts +52 -0
- package/templates/tanstack/src/config/site.config.ts +15 -0
- package/templates/tanstack/src/constants/index.ts +5 -0
- package/templates/tanstack/src/env.ts +47 -0
- package/templates/tanstack/src/features/landing/api/get-users.api.ts +7 -0
- package/templates/tanstack/src/features/landing/api/index.ts +2 -0
- package/templates/tanstack/src/features/landing/api/query-keys.ts +7 -0
- package/templates/tanstack/src/features/landing/components/CartDemo.tsx +66 -0
- package/templates/tanstack/src/features/landing/components/Features.tsx +39 -0
- package/templates/tanstack/src/features/landing/components/Hero.tsx +63 -0
- package/templates/tanstack/src/features/landing/components/LandingPage.tsx +17 -0
- package/templates/tanstack/src/features/landing/components/ProjectFormDemo.tsx +63 -0
- package/templates/tanstack/src/features/landing/components/Reveal.tsx +83 -0
- package/templates/tanstack/src/features/landing/components/Showcase.tsx +66 -0
- package/templates/tanstack/src/features/landing/components/UsersDemo.tsx +191 -0
- package/templates/tanstack/src/features/landing/data/features.data.tsx +45 -0
- package/templates/tanstack/src/features/landing/data/index.ts +1 -0
- package/templates/tanstack/src/features/landing/helpers/get-initials.ts +15 -0
- package/templates/tanstack/src/features/landing/helpers/index.ts +7 -0
- package/templates/tanstack/src/features/landing/helpers/motion.ts +21 -0
- package/templates/tanstack/src/features/landing/hooks/index.ts +1 -0
- package/templates/tanstack/src/features/landing/hooks/use-users.ts +19 -0
- package/templates/tanstack/src/features/landing/icons/index.ts +5 -0
- package/templates/tanstack/src/features/landing/icons/react-hook-form.tsx +18 -0
- package/templates/tanstack/src/features/landing/icons/react.tsx +20 -0
- package/templates/tanstack/src/features/landing/icons/tailwind.tsx +14 -0
- package/templates/tanstack/src/features/landing/icons/tanstack.tsx +321 -0
- package/templates/tanstack/src/features/landing/icons/typescript.tsx +16 -0
- package/templates/tanstack/src/features/landing/index.ts +1 -0
- package/templates/tanstack/src/features/landing/schemas/index.ts +1 -0
- package/templates/tanstack/src/features/landing/schemas/project.schema.ts +7 -0
- package/templates/tanstack/src/features/landing/stores/counter.store.ts +18 -0
- package/templates/tanstack/src/features/landing/stores/index.ts +1 -0
- package/templates/tanstack/src/features/landing/types/index.ts +1 -0
- package/templates/tanstack/src/features/landing/types/user.types.ts +9 -0
- package/templates/tanstack/src/helpers/format-date.ts +13 -0
- package/templates/tanstack/src/helpers/index.ts +1 -0
- package/templates/tanstack/src/hooks/index.ts +5 -0
- package/templates/tanstack/src/lib/api.ts +97 -0
- package/templates/tanstack/src/lib/query-client.ts +18 -0
- package/templates/tanstack/src/lib/utils.ts +13 -0
- package/templates/tanstack/src/providers/Providers.tsx +12 -0
- package/templates/tanstack/src/providers/ThemeProvider.tsx +98 -0
- package/templates/tanstack/src/providers/devtools.tsx +6 -0
- package/templates/tanstack/src/providers/index.ts +1 -0
- package/templates/tanstack/src/providers/root-provider.ts +9 -0
- package/templates/tanstack/src/routeTree.gen.ts +123 -0
- package/templates/tanstack/src/router.tsx +27 -0
- package/templates/tanstack/src/routes/__root.tsx +78 -0
- package/templates/tanstack/src/routes/index.tsx +13 -0
- package/templates/tanstack/src/routes/robots[.]txt.ts +21 -0
- package/templates/tanstack/src/routes/site[.]webmanifest.ts +32 -0
- package/templates/tanstack/src/routes/sitemap[.]xml.ts +27 -0
- package/templates/tanstack/src/schemas/index.ts +5 -0
- package/templates/tanstack/src/start.ts +20 -0
- package/templates/tanstack/src/stores/index.ts +5 -0
- package/templates/tanstack/src/styles/tailwind.css +123 -0
- package/templates/tanstack/src/types/site-config.types.ts +10 -0
- package/templates/tanstack/tsconfig.json +25 -0
- package/templates/tanstack/tsr.config.json +3 -0
- package/templates/tanstack/vite.config.ts +12 -0
- package/templates-i18n/nextjs/.changeset/README.md +8 -0
- package/templates-i18n/nextjs/.changeset/config.json +11 -0
- package/templates-i18n/nextjs/.env.example +6 -0
- package/templates-i18n/nextjs/.eslintcache +1 -0
- package/templates-i18n/nextjs/.github/workflows/ci.yml +41 -0
- package/templates-i18n/nextjs/.husky/commit-msg +1 -0
- package/templates-i18n/nextjs/.husky/pre-commit +1 -0
- package/templates-i18n/nextjs/.husky/pre-push +1 -0
- package/templates-i18n/nextjs/.prettierignore +6 -0
- package/templates-i18n/nextjs/.prettierrc +42 -0
- package/templates-i18n/nextjs/.vscode/extensions.json +7 -0
- package/templates-i18n/nextjs/.vscode/settings.json +20 -0
- package/templates-i18n/nextjs/LICENSE +21 -0
- package/templates-i18n/nextjs/README.md +202 -0
- package/templates-i18n/nextjs/_gitignore +45 -0
- package/templates-i18n/nextjs/commitlint.config.js +6 -0
- package/templates-i18n/nextjs/eslint.config.mjs +27 -0
- package/templates-i18n/nextjs/knip.config.js +29 -0
- package/templates-i18n/nextjs/next-env.d.ts +6 -0
- package/templates-i18n/nextjs/next.config.ts +42 -0
- package/templates-i18n/nextjs/package.json +117 -0
- package/templates-i18n/nextjs/pnpm-lock.yaml +6854 -0
- package/templates-i18n/nextjs/pnpm-workspace.yaml +3 -0
- package/templates-i18n/nextjs/postcss.config.mjs +7 -0
- package/templates-i18n/nextjs/public/favicon.ico +0 -0
- package/templates-i18n/nextjs/public/llms.txt +96 -0
- package/templates-i18n/nextjs/public/logo.png +0 -0
- package/templates-i18n/nextjs/public/logo.webp +0 -0
- package/templates-i18n/nextjs/public/og.png +0 -0
- package/templates-i18n/nextjs/src/app/[locale]/error.tsx +34 -0
- package/templates-i18n/nextjs/src/app/[locale]/layout.tsx +60 -0
- package/templates-i18n/nextjs/src/app/[locale]/loading.tsx +12 -0
- package/templates-i18n/nextjs/src/app/[locale]/not-found.tsx +18 -0
- package/templates-i18n/nextjs/src/app/[locale]/page.tsx +10 -0
- package/templates-i18n/nextjs/src/app/favicon.ico +0 -0
- package/templates-i18n/nextjs/src/app/global-error.tsx +32 -0
- package/templates-i18n/nextjs/src/app/manifest.ts +22 -0
- package/templates-i18n/nextjs/src/app/robots.ts +13 -0
- package/templates-i18n/nextjs/src/app/sitemap.ts +14 -0
- package/templates-i18n/nextjs/src/components/shared/LanguageSwitcher.tsx +48 -0
- package/templates-i18n/nextjs/src/components/shared/ThemeToggle.tsx +30 -0
- package/templates-i18n/nextjs/src/components/ui/avatar.tsx +54 -0
- package/templates-i18n/nextjs/src/components/ui/button.tsx +46 -0
- package/templates-i18n/nextjs/src/components/ui/dialog.tsx +107 -0
- package/templates-i18n/nextjs/src/components/ui/field.tsx +24 -0
- package/templates-i18n/nextjs/src/components/ui/index.ts +27 -0
- package/templates-i18n/nextjs/src/components/ui/input.tsx +23 -0
- package/templates-i18n/nextjs/src/components/ui/label.tsx +17 -0
- package/templates-i18n/nextjs/src/components/ui/skeleton.tsx +13 -0
- package/templates-i18n/nextjs/src/components/ui/table.tsx +94 -0
- package/templates-i18n/nextjs/src/components/ui/tabs.tsx +46 -0
- package/templates-i18n/nextjs/src/config/seo.config.ts +37 -0
- package/templates-i18n/nextjs/src/config/site.config.ts +15 -0
- package/templates-i18n/nextjs/src/constants/index.ts +5 -0
- package/templates-i18n/nextjs/src/env.ts +41 -0
- package/templates-i18n/nextjs/src/features/landing/api/get-users.api.ts +7 -0
- package/templates-i18n/nextjs/src/features/landing/api/index.ts +2 -0
- package/templates-i18n/nextjs/src/features/landing/api/query-keys.ts +7 -0
- package/templates-i18n/nextjs/src/features/landing/components/CartDemo.tsx +68 -0
- package/templates-i18n/nextjs/src/features/landing/components/Features.tsx +84 -0
- package/templates-i18n/nextjs/src/features/landing/components/Hero.tsx +76 -0
- package/templates-i18n/nextjs/src/features/landing/components/LandingPage.tsx +17 -0
- package/templates-i18n/nextjs/src/features/landing/components/ProjectFormDemo.tsx +64 -0
- package/templates-i18n/nextjs/src/features/landing/components/Reveal.tsx +83 -0
- package/templates-i18n/nextjs/src/features/landing/components/Showcase.tsx +83 -0
- package/templates-i18n/nextjs/src/features/landing/components/UsersDemo.tsx +191 -0
- package/templates-i18n/nextjs/src/features/landing/data/features.data.tsx +47 -0
- package/templates-i18n/nextjs/src/features/landing/data/index.ts +1 -0
- package/templates-i18n/nextjs/src/features/landing/helpers/get-initials.ts +15 -0
- package/templates-i18n/nextjs/src/features/landing/helpers/index.ts +7 -0
- package/templates-i18n/nextjs/src/features/landing/helpers/motion.ts +21 -0
- package/templates-i18n/nextjs/src/features/landing/hooks/index.ts +1 -0
- package/templates-i18n/nextjs/src/features/landing/hooks/use-users.ts +16 -0
- package/templates-i18n/nextjs/src/features/landing/icons/index.ts +6 -0
- package/templates-i18n/nextjs/src/features/landing/icons/nextjs.tsx +68 -0
- package/templates-i18n/nextjs/src/features/landing/icons/react-hook-form.tsx +18 -0
- package/templates-i18n/nextjs/src/features/landing/icons/react.tsx +20 -0
- package/templates-i18n/nextjs/src/features/landing/icons/tailwind.tsx +14 -0
- package/templates-i18n/nextjs/src/features/landing/icons/tanstack.tsx +321 -0
- package/templates-i18n/nextjs/src/features/landing/icons/typescript.tsx +16 -0
- package/templates-i18n/nextjs/src/features/landing/index.ts +1 -0
- package/templates-i18n/nextjs/src/features/landing/schemas/index.ts +1 -0
- package/templates-i18n/nextjs/src/features/landing/schemas/project.schema.ts +9 -0
- package/templates-i18n/nextjs/src/features/landing/stores/counter.store.ts +18 -0
- package/templates-i18n/nextjs/src/features/landing/stores/index.ts +1 -0
- package/templates-i18n/nextjs/src/features/landing/types/index.ts +1 -0
- package/templates-i18n/nextjs/src/features/landing/types/user.types.ts +9 -0
- package/templates-i18n/nextjs/src/helpers/format-date.ts +13 -0
- package/templates-i18n/nextjs/src/helpers/index.ts +1 -0
- package/templates-i18n/nextjs/src/hooks/index.ts +5 -0
- package/templates-i18n/nextjs/src/i18n/request.ts +16 -0
- package/templates-i18n/nextjs/src/i18n/routing.ts +11 -0
- package/templates-i18n/nextjs/src/lib/api.ts +97 -0
- package/templates-i18n/nextjs/src/lib/query-client.ts +18 -0
- package/templates-i18n/nextjs/src/lib/utils.ts +12 -0
- package/templates-i18n/nextjs/src/messages/en.json +55 -0
- package/templates-i18n/nextjs/src/messages/tr.json +55 -0
- package/templates-i18n/nextjs/src/providers/Providers.tsx +15 -0
- package/templates-i18n/nextjs/src/providers/QueryProvider.tsx +19 -0
- package/templates-i18n/nextjs/src/providers/ThemeProvider.tsx +9 -0
- package/templates-i18n/nextjs/src/providers/index.ts +1 -0
- package/templates-i18n/nextjs/src/proxy.ts +16 -0
- package/templates-i18n/nextjs/src/schemas/index.ts +5 -0
- package/templates-i18n/nextjs/src/stores/index.ts +5 -0
- package/templates-i18n/nextjs/src/styles/tailwind.css +122 -0
- package/templates-i18n/nextjs/src/types/site-config.types.ts +10 -0
- package/templates-i18n/nextjs/tsconfig.json +45 -0
- package/templates-i18n/nextjs/tsconfig.tsbuildinfo +1 -0
- package/templates-i18n/tanstack/.changeset/README.md +8 -0
- package/templates-i18n/tanstack/.changeset/config.json +11 -0
- package/templates-i18n/tanstack/.env.example +6 -0
- package/templates-i18n/tanstack/.eslintcache +1 -0
- package/templates-i18n/tanstack/.github/workflows/ci.yml +41 -0
- package/templates-i18n/tanstack/.husky/commit-msg +1 -0
- package/templates-i18n/tanstack/.husky/pre-commit +1 -0
- package/templates-i18n/tanstack/.husky/pre-push +1 -0
- package/templates-i18n/tanstack/.prettierignore +7 -0
- package/templates-i18n/tanstack/.prettierrc +41 -0
- package/templates-i18n/tanstack/.vscode/extensions.json +7 -0
- package/templates-i18n/tanstack/.vscode/settings.json +22 -0
- package/templates-i18n/tanstack/LICENSE +21 -0
- package/templates-i18n/tanstack/README.md +204 -0
- package/templates-i18n/tanstack/_gitignore +52 -0
- package/templates-i18n/tanstack/commitlint.config.js +6 -0
- package/templates-i18n/tanstack/eslint.config.js +29 -0
- package/templates-i18n/tanstack/knip.config.js +26 -0
- package/templates-i18n/tanstack/messages/en.json +65 -0
- package/templates-i18n/tanstack/messages/tr.json +65 -0
- package/templates-i18n/tanstack/package.json +132 -0
- package/templates-i18n/tanstack/pnpm-lock.yaml +5998 -0
- package/templates-i18n/tanstack/pnpm-workspace.yaml +3 -0
- package/templates-i18n/tanstack/project.inlang/README.md +157 -0
- package/templates-i18n/tanstack/project.inlang/settings.json +9 -0
- package/templates-i18n/tanstack/public/favicon.ico +0 -0
- package/templates-i18n/tanstack/public/llms.txt +86 -0
- package/templates-i18n/tanstack/public/logo.png +0 -0
- package/templates-i18n/tanstack/public/logo.webp +0 -0
- package/templates-i18n/tanstack/public/og.png +0 -0
- package/templates-i18n/tanstack/src/components/shared/DefaultCatchBoundary.tsx +36 -0
- package/templates-i18n/tanstack/src/components/shared/LanguageSwitcher.tsx +57 -0
- package/templates-i18n/tanstack/src/components/shared/NotFound.tsx +18 -0
- package/templates-i18n/tanstack/src/components/shared/Pending.tsx +13 -0
- package/templates-i18n/tanstack/src/components/shared/ThemeToggle.tsx +31 -0
- package/templates-i18n/tanstack/src/components/ui/avatar.tsx +52 -0
- package/templates-i18n/tanstack/src/components/ui/button.tsx +47 -0
- package/templates-i18n/tanstack/src/components/ui/dialog.tsx +107 -0
- package/templates-i18n/tanstack/src/components/ui/field.tsx +24 -0
- package/templates-i18n/tanstack/src/components/ui/index.ts +27 -0
- package/templates-i18n/tanstack/src/components/ui/input.tsx +23 -0
- package/templates-i18n/tanstack/src/components/ui/label.tsx +17 -0
- package/templates-i18n/tanstack/src/components/ui/skeleton.tsx +13 -0
- package/templates-i18n/tanstack/src/components/ui/table.tsx +94 -0
- package/templates-i18n/tanstack/src/components/ui/tabs.tsx +46 -0
- package/templates-i18n/tanstack/src/config/seo.config.ts +52 -0
- package/templates-i18n/tanstack/src/config/site.config.ts +15 -0
- package/templates-i18n/tanstack/src/constants/index.ts +5 -0
- package/templates-i18n/tanstack/src/env.ts +47 -0
- package/templates-i18n/tanstack/src/features/landing/api/get-users.api.ts +7 -0
- package/templates-i18n/tanstack/src/features/landing/api/index.ts +2 -0
- package/templates-i18n/tanstack/src/features/landing/api/query-keys.ts +7 -0
- package/templates-i18n/tanstack/src/features/landing/components/CartDemo.tsx +67 -0
- package/templates-i18n/tanstack/src/features/landing/components/Features.tsx +79 -0
- package/templates-i18n/tanstack/src/features/landing/components/Hero.tsx +68 -0
- package/templates-i18n/tanstack/src/features/landing/components/LandingPage.tsx +17 -0
- package/templates-i18n/tanstack/src/features/landing/components/ProjectFormDemo.tsx +64 -0
- package/templates-i18n/tanstack/src/features/landing/components/Reveal.tsx +83 -0
- package/templates-i18n/tanstack/src/features/landing/components/Showcase.tsx +81 -0
- package/templates-i18n/tanstack/src/features/landing/components/UsersDemo.tsx +191 -0
- package/templates-i18n/tanstack/src/features/landing/data/features.data.tsx +45 -0
- package/templates-i18n/tanstack/src/features/landing/data/index.ts +1 -0
- package/templates-i18n/tanstack/src/features/landing/helpers/get-initials.ts +15 -0
- package/templates-i18n/tanstack/src/features/landing/helpers/index.ts +7 -0
- package/templates-i18n/tanstack/src/features/landing/helpers/motion.ts +21 -0
- package/templates-i18n/tanstack/src/features/landing/hooks/index.ts +1 -0
- package/templates-i18n/tanstack/src/features/landing/hooks/use-users.ts +19 -0
- package/templates-i18n/tanstack/src/features/landing/icons/index.ts +5 -0
- package/templates-i18n/tanstack/src/features/landing/icons/react-hook-form.tsx +18 -0
- package/templates-i18n/tanstack/src/features/landing/icons/react.tsx +20 -0
- package/templates-i18n/tanstack/src/features/landing/icons/tailwind.tsx +14 -0
- package/templates-i18n/tanstack/src/features/landing/icons/tanstack.tsx +321 -0
- package/templates-i18n/tanstack/src/features/landing/icons/typescript.tsx +16 -0
- package/templates-i18n/tanstack/src/features/landing/index.ts +1 -0
- package/templates-i18n/tanstack/src/features/landing/schemas/index.ts +1 -0
- package/templates-i18n/tanstack/src/features/landing/schemas/project.schema.ts +10 -0
- package/templates-i18n/tanstack/src/features/landing/stores/counter.store.ts +18 -0
- package/templates-i18n/tanstack/src/features/landing/stores/index.ts +1 -0
- package/templates-i18n/tanstack/src/features/landing/types/index.ts +1 -0
- package/templates-i18n/tanstack/src/features/landing/types/user.types.ts +9 -0
- package/templates-i18n/tanstack/src/helpers/format-date.ts +13 -0
- package/templates-i18n/tanstack/src/helpers/index.ts +1 -0
- package/templates-i18n/tanstack/src/hooks/index.ts +5 -0
- package/templates-i18n/tanstack/src/lib/api.ts +97 -0
- package/templates-i18n/tanstack/src/lib/query-client.ts +18 -0
- package/templates-i18n/tanstack/src/lib/utils.ts +13 -0
- package/templates-i18n/tanstack/src/paraglide/README.md +162 -0
- package/templates-i18n/tanstack/src/providers/Providers.tsx +12 -0
- package/templates-i18n/tanstack/src/providers/ThemeProvider.tsx +98 -0
- package/templates-i18n/tanstack/src/providers/devtools.tsx +6 -0
- package/templates-i18n/tanstack/src/providers/index.ts +1 -0
- package/templates-i18n/tanstack/src/providers/root-provider.ts +9 -0
- package/templates-i18n/tanstack/src/routeTree.gen.ts +179 -0
- package/templates-i18n/tanstack/src/router.tsx +27 -0
- package/templates-i18n/tanstack/src/routes/$lang/index.tsx +13 -0
- package/templates-i18n/tanstack/src/routes/$lang.tsx +22 -0
- package/templates-i18n/tanstack/src/routes/__root.tsx +80 -0
- package/templates-i18n/tanstack/src/routes/index.tsx +13 -0
- package/templates-i18n/tanstack/src/routes/robots[.]txt.ts +21 -0
- package/templates-i18n/tanstack/src/routes/site[.]webmanifest.ts +32 -0
- package/templates-i18n/tanstack/src/routes/sitemap[.]xml.ts +27 -0
- package/templates-i18n/tanstack/src/schemas/index.ts +5 -0
- package/templates-i18n/tanstack/src/server.ts +10 -0
- package/templates-i18n/tanstack/src/start.ts +20 -0
- package/templates-i18n/tanstack/src/stores/index.ts +5 -0
- package/templates-i18n/tanstack/src/styles/tailwind.css +123 -0
- package/templates-i18n/tanstack/src/types/site-config.types.ts +10 -0
- package/templates-i18n/tanstack/tsconfig.json +26 -0
- package/templates-i18n/tanstack/tsr.config.json +3 -0
- package/templates-i18n/tanstack/vite.config.ts +31 -0
- package/index.js +0 -3
- package/public/start.jpg +0 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
|
|
3
|
+
import { cn } from "@/lib/utils";
|
|
4
|
+
|
|
5
|
+
export function FieldDescription({ className, ...props }: ComponentProps<"p">) {
|
|
6
|
+
return (
|
|
7
|
+
<p
|
|
8
|
+
data-slot="field-description"
|
|
9
|
+
className={cn("text-sm font-normal text-muted-foreground", className)}
|
|
10
|
+
{...props}
|
|
11
|
+
/>
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function FieldError({ className, ...props }: ComponentProps<"p">) {
|
|
16
|
+
return (
|
|
17
|
+
<p
|
|
18
|
+
role="alert"
|
|
19
|
+
data-slot="field-error"
|
|
20
|
+
className={cn("text-sm font-normal text-destructive", className)}
|
|
21
|
+
{...props}
|
|
22
|
+
/>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export { Button, buttonVariants, type ButtonProps } from "@/components/ui/button";
|
|
2
|
+
export { FieldDescription, FieldError } from "@/components/ui/field";
|
|
3
|
+
export { Input } from "@/components/ui/input";
|
|
4
|
+
export { Label } from "@/components/ui/label";
|
|
5
|
+
export { Skeleton } from "@/components/ui/skeleton";
|
|
6
|
+
export {
|
|
7
|
+
Dialog,
|
|
8
|
+
DialogClose,
|
|
9
|
+
DialogContent,
|
|
10
|
+
DialogDescription,
|
|
11
|
+
DialogFooter,
|
|
12
|
+
DialogHeader,
|
|
13
|
+
DialogTitle,
|
|
14
|
+
DialogTrigger,
|
|
15
|
+
} from "@/components/ui/dialog";
|
|
16
|
+
export { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
|
17
|
+
export { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
|
|
18
|
+
export {
|
|
19
|
+
Table,
|
|
20
|
+
TableBody,
|
|
21
|
+
TableCaption,
|
|
22
|
+
TableCell,
|
|
23
|
+
TableFooter,
|
|
24
|
+
TableHead,
|
|
25
|
+
TableHeader,
|
|
26
|
+
TableRow,
|
|
27
|
+
} from "@/components/ui/table";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
|
|
3
|
+
import { Input as BaseInput } from "@base-ui/react/input";
|
|
4
|
+
|
|
5
|
+
import { cn } from "@/lib/utils";
|
|
6
|
+
|
|
7
|
+
export function Input({ className, ...props }: ComponentProps<typeof BaseInput>) {
|
|
8
|
+
return (
|
|
9
|
+
<BaseInput
|
|
10
|
+
data-slot="input"
|
|
11
|
+
className={cn(
|
|
12
|
+
"flex h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-xs transition-[color,box-shadow] outline-none",
|
|
13
|
+
"placeholder:text-muted-foreground",
|
|
14
|
+
"focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
|
15
|
+
"disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
16
|
+
"aria-invalid:border-destructive aria-invalid:ring-destructive/20",
|
|
17
|
+
"file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground",
|
|
18
|
+
className,
|
|
19
|
+
)}
|
|
20
|
+
{...props}
|
|
21
|
+
/>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
|
|
3
|
+
import { cn } from "@/lib/utils";
|
|
4
|
+
|
|
5
|
+
export function Label({ className, ...props }: ComponentProps<"label">) {
|
|
6
|
+
return (
|
|
7
|
+
<label
|
|
8
|
+
data-slot="label"
|
|
9
|
+
className={cn(
|
|
10
|
+
"flex items-center gap-2 text-sm leading-none font-medium select-none",
|
|
11
|
+
"peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
12
|
+
className,
|
|
13
|
+
)}
|
|
14
|
+
{...props}
|
|
15
|
+
/>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
|
|
3
|
+
import { cn } from "@/lib/utils";
|
|
4
|
+
|
|
5
|
+
export function Skeleton({ className, ...props }: ComponentProps<"div">) {
|
|
6
|
+
return (
|
|
7
|
+
<div
|
|
8
|
+
data-slot="skeleton"
|
|
9
|
+
className={cn("animate-pulse rounded-md bg-accent", className)}
|
|
10
|
+
{...props}
|
|
11
|
+
/>
|
|
12
|
+
);
|
|
13
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
|
|
3
|
+
import { cn } from "@/lib/utils";
|
|
4
|
+
|
|
5
|
+
const Table = React.forwardRef<HTMLTableElement, React.HTMLAttributes<HTMLTableElement>>(
|
|
6
|
+
({ className, ...props }, ref) => (
|
|
7
|
+
<div className="relative w-full overflow-auto">
|
|
8
|
+
<table ref={ref} className={cn("w-full caption-bottom text-sm", className)} {...props} />
|
|
9
|
+
</div>
|
|
10
|
+
),
|
|
11
|
+
);
|
|
12
|
+
Table.displayName = "Table";
|
|
13
|
+
|
|
14
|
+
const TableHeader = React.forwardRef<
|
|
15
|
+
HTMLTableSectionElement,
|
|
16
|
+
React.HTMLAttributes<HTMLTableSectionElement>
|
|
17
|
+
>(({ className, ...props }, ref) => (
|
|
18
|
+
<thead ref={ref} className={cn("[&_tr]:border-b", className)} {...props} />
|
|
19
|
+
));
|
|
20
|
+
TableHeader.displayName = "TableHeader";
|
|
21
|
+
|
|
22
|
+
const TableBody = React.forwardRef<
|
|
23
|
+
HTMLTableSectionElement,
|
|
24
|
+
React.HTMLAttributes<HTMLTableSectionElement>
|
|
25
|
+
>(({ className, ...props }, ref) => (
|
|
26
|
+
<tbody ref={ref} className={cn("[&_tr:last-child]:border-0", className)} {...props} />
|
|
27
|
+
));
|
|
28
|
+
TableBody.displayName = "TableBody";
|
|
29
|
+
|
|
30
|
+
const TableFooter = React.forwardRef<
|
|
31
|
+
HTMLTableSectionElement,
|
|
32
|
+
React.HTMLAttributes<HTMLTableSectionElement>
|
|
33
|
+
>(({ className, ...props }, ref) => (
|
|
34
|
+
<tfoot
|
|
35
|
+
ref={ref}
|
|
36
|
+
className={cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className)}
|
|
37
|
+
{...props}
|
|
38
|
+
/>
|
|
39
|
+
));
|
|
40
|
+
TableFooter.displayName = "TableFooter";
|
|
41
|
+
|
|
42
|
+
const TableRow = React.forwardRef<HTMLTableRowElement, React.HTMLAttributes<HTMLTableRowElement>>(
|
|
43
|
+
({ className, ...props }, ref) => (
|
|
44
|
+
<tr
|
|
45
|
+
ref={ref}
|
|
46
|
+
className={cn(
|
|
47
|
+
"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
|
|
48
|
+
className,
|
|
49
|
+
)}
|
|
50
|
+
{...props}
|
|
51
|
+
/>
|
|
52
|
+
),
|
|
53
|
+
);
|
|
54
|
+
TableRow.displayName = "TableRow";
|
|
55
|
+
|
|
56
|
+
const TableHead = React.forwardRef<
|
|
57
|
+
HTMLTableCellElement,
|
|
58
|
+
React.ThHTMLAttributes<HTMLTableCellElement>
|
|
59
|
+
>(({ className, ...props }, ref) => (
|
|
60
|
+
<th
|
|
61
|
+
ref={ref}
|
|
62
|
+
className={cn(
|
|
63
|
+
"h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
64
|
+
className,
|
|
65
|
+
)}
|
|
66
|
+
{...props}
|
|
67
|
+
/>
|
|
68
|
+
));
|
|
69
|
+
TableHead.displayName = "TableHead";
|
|
70
|
+
|
|
71
|
+
const TableCell = React.forwardRef<
|
|
72
|
+
HTMLTableCellElement,
|
|
73
|
+
React.TdHTMLAttributes<HTMLTableCellElement>
|
|
74
|
+
>(({ className, ...props }, ref) => (
|
|
75
|
+
<td
|
|
76
|
+
ref={ref}
|
|
77
|
+
className={cn(
|
|
78
|
+
"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
79
|
+
className,
|
|
80
|
+
)}
|
|
81
|
+
{...props}
|
|
82
|
+
/>
|
|
83
|
+
));
|
|
84
|
+
TableCell.displayName = "TableCell";
|
|
85
|
+
|
|
86
|
+
const TableCaption = React.forwardRef<
|
|
87
|
+
HTMLTableCaptionElement,
|
|
88
|
+
React.HTMLAttributes<HTMLTableCaptionElement>
|
|
89
|
+
>(({ className, ...props }, ref) => (
|
|
90
|
+
<caption ref={ref} className={cn("mt-4 text-sm text-muted-foreground", className)} {...props} />
|
|
91
|
+
));
|
|
92
|
+
TableCaption.displayName = "TableCaption";
|
|
93
|
+
|
|
94
|
+
export { Table, TableHeader, TableBody, TableFooter, TableRow, TableHead, TableCell, TableCaption };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
|
|
3
|
+
import { Tabs as BaseTabs } from "@base-ui/react/tabs";
|
|
4
|
+
|
|
5
|
+
import { cn } from "@/lib/utils";
|
|
6
|
+
|
|
7
|
+
export function Tabs({ className, ...props }: ComponentProps<typeof BaseTabs.Root>) {
|
|
8
|
+
return (
|
|
9
|
+
<BaseTabs.Root data-slot="tabs" className={cn("flex flex-col gap-3", className)} {...props} />
|
|
10
|
+
);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function TabsList({ className, ...props }: ComponentProps<typeof BaseTabs.List>) {
|
|
14
|
+
return (
|
|
15
|
+
<BaseTabs.List
|
|
16
|
+
data-slot="tabs-list"
|
|
17
|
+
className={cn(
|
|
18
|
+
"relative inline-flex h-9 w-fit items-center rounded-lg bg-muted p-[3px] text-muted-foreground",
|
|
19
|
+
className,
|
|
20
|
+
)}
|
|
21
|
+
{...props}
|
|
22
|
+
/>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function TabsTrigger({ className, ...props }: ComponentProps<typeof BaseTabs.Tab>) {
|
|
27
|
+
return (
|
|
28
|
+
<BaseTabs.Tab
|
|
29
|
+
data-slot="tabs-trigger"
|
|
30
|
+
className={cn(
|
|
31
|
+
"inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none",
|
|
32
|
+
"text-foreground data-[selected]:bg-background data-[selected]:shadow-sm",
|
|
33
|
+
"focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
|
34
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
35
|
+
className,
|
|
36
|
+
)}
|
|
37
|
+
{...props}
|
|
38
|
+
/>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function TabsContent({ className, ...props }: ComponentProps<typeof BaseTabs.Panel>) {
|
|
43
|
+
return (
|
|
44
|
+
<BaseTabs.Panel data-slot="tabs-content" className={cn("outline-none", className)} {...props} />
|
|
45
|
+
);
|
|
46
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { Metadata } from "next";
|
|
2
|
+
|
|
3
|
+
import { siteConfig } from "@/config/site.config";
|
|
4
|
+
|
|
5
|
+
export const defaultMetadata: Metadata = {
|
|
6
|
+
metadataBase: new URL(siteConfig.url),
|
|
7
|
+
title: {
|
|
8
|
+
default: siteConfig.name,
|
|
9
|
+
template: `%s · ${siteConfig.name}`,
|
|
10
|
+
},
|
|
11
|
+
description: siteConfig.description,
|
|
12
|
+
keywords: ["Next.js", "React", "TypeScript", "Tailwind CSS", "ViraStack", "Boilerplate"],
|
|
13
|
+
authors: [{ name: "ViraStack", url: siteConfig.url }],
|
|
14
|
+
creator: "ViraStack",
|
|
15
|
+
openGraph: {
|
|
16
|
+
type: "website",
|
|
17
|
+
locale: "en_US",
|
|
18
|
+
url: siteConfig.url,
|
|
19
|
+
title: siteConfig.name,
|
|
20
|
+
description: siteConfig.description,
|
|
21
|
+
siteName: siteConfig.name,
|
|
22
|
+
images: [{ url: siteConfig.ogImage, width: 1200, height: 630, alt: siteConfig.name }],
|
|
23
|
+
},
|
|
24
|
+
twitter: {
|
|
25
|
+
card: "summary_large_image",
|
|
26
|
+
title: siteConfig.name,
|
|
27
|
+
description: siteConfig.description,
|
|
28
|
+
images: [siteConfig.ogImage],
|
|
29
|
+
},
|
|
30
|
+
icons: {
|
|
31
|
+
icon: "/logo.webp",
|
|
32
|
+
},
|
|
33
|
+
robots: {
|
|
34
|
+
index: true,
|
|
35
|
+
follow: true,
|
|
36
|
+
},
|
|
37
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { SiteConfig } from "@/types/site-config.types";
|
|
2
|
+
import { env } from "@/env";
|
|
3
|
+
|
|
4
|
+
// FIXME: replace with your own site metadata.
|
|
5
|
+
export const siteConfig: SiteConfig = {
|
|
6
|
+
name: env.NEXT_PUBLIC_APP_NAME,
|
|
7
|
+
description:
|
|
8
|
+
"Premium Next.js boilerplate built for scalable UI/UX, clean architecture, and agent-ready developer experience.",
|
|
9
|
+
url: env.NEXT_PUBLIC_APP_URL,
|
|
10
|
+
ogImage: `${env.NEXT_PUBLIC_APP_URL}/og.png`,
|
|
11
|
+
links: {
|
|
12
|
+
github: "https://github.com/virastack/start",
|
|
13
|
+
twitter: "https://x.com/virastack",
|
|
14
|
+
},
|
|
15
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Type-safe environment variable schema.
|
|
5
|
+
*
|
|
6
|
+
* Server-only variables MUST NOT be prefixed with `NEXT_PUBLIC_`.
|
|
7
|
+
* Client-exposed variables MUST be prefixed with `NEXT_PUBLIC_` and
|
|
8
|
+
* explicitly re-read via `process.env.NEXT_PUBLIC_*` at usage sites
|
|
9
|
+
* (Next.js inlines these at build time; dynamic access does not work).
|
|
10
|
+
*/
|
|
11
|
+
const serverSchema = z.object({
|
|
12
|
+
NODE_ENV: z.enum(["development", "production", "test"]).default("development"),
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
const clientSchema = z.object({
|
|
16
|
+
NEXT_PUBLIC_APP_URL: z.string().url().default("http://localhost:3000"),
|
|
17
|
+
NEXT_PUBLIC_APP_NAME: z.string().min(1).default("ViraStack Start - Next.js Edition"),
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const serverParsed = serverSchema.safeParse({
|
|
21
|
+
NODE_ENV: process.env.NODE_ENV,
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
const clientParsed = clientSchema.safeParse({
|
|
25
|
+
NEXT_PUBLIC_APP_URL: process.env.NEXT_PUBLIC_APP_URL,
|
|
26
|
+
NEXT_PUBLIC_APP_NAME: process.env.NEXT_PUBLIC_APP_NAME,
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
if (!serverParsed.success || !clientParsed.success) {
|
|
30
|
+
console.error(
|
|
31
|
+
"❌ Invalid environment variables:",
|
|
32
|
+
serverParsed.error?.flatten().fieldErrors,
|
|
33
|
+
clientParsed.error?.flatten().fieldErrors,
|
|
34
|
+
);
|
|
35
|
+
throw new Error("Invalid environment variables. Check src/env.ts");
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export const env = {
|
|
39
|
+
...serverParsed.data,
|
|
40
|
+
...clientParsed.data,
|
|
41
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export const userKeys = {
|
|
2
|
+
all: ["users"] as const,
|
|
3
|
+
lists: () => [...userKeys.all, "list"] as const,
|
|
4
|
+
list: (filters?: object) => [...userKeys.lists(), { filters }] as const,
|
|
5
|
+
details: () => [...userKeys.all, "detail"] as const,
|
|
6
|
+
detail: (id: string) => [...userKeys.details(), id] as const,
|
|
7
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { MinusIcon, PlusIcon, ShirtIcon, Trash2Icon } from "lucide-react";
|
|
4
|
+
import { useTranslations } from "next-intl";
|
|
5
|
+
|
|
6
|
+
import { Button } from "@/components/ui/button";
|
|
7
|
+
import { useCounterStore } from "@/features/landing/stores";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Demonstrates global client state with Zustand via a mini cart UI.
|
|
11
|
+
*/
|
|
12
|
+
export function CartDemo() {
|
|
13
|
+
const { count, increment, decrement, reset } = useCounterStore();
|
|
14
|
+
const t = useTranslations("Index");
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<div className="flex flex-col gap-4">
|
|
18
|
+
<div className="flex items-center gap-4 rounded-xl border border-border/50 bg-background/50 p-3">
|
|
19
|
+
<div className="flex h-12 w-12 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary">
|
|
20
|
+
<ShirtIcon className="size-6" />
|
|
21
|
+
</div>
|
|
22
|
+
<div className="flex flex-1 flex-col">
|
|
23
|
+
<h5 className="font-medium text-foreground">{t("cart_item_name")}</h5>
|
|
24
|
+
<p className="text-sm text-muted-foreground">{t("cart_item_variant")}</p>
|
|
25
|
+
</div>
|
|
26
|
+
<div className="flex flex-col items-end gap-1">
|
|
27
|
+
<span className="font-semibold text-foreground">{count * 350}</span>
|
|
28
|
+
<span className="text-xs text-muted-foreground">{t("cart_item_total")}</span>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
<div className="flex items-center justify-between">
|
|
33
|
+
<div className="flex items-center gap-2">
|
|
34
|
+
<Button
|
|
35
|
+
variant="outline"
|
|
36
|
+
size="icon"
|
|
37
|
+
className="h-8 w-8 rounded-full"
|
|
38
|
+
aria-label="Decrement"
|
|
39
|
+
onClick={decrement}
|
|
40
|
+
disabled={count === 0}
|
|
41
|
+
>
|
|
42
|
+
<MinusIcon className="size-4" />
|
|
43
|
+
</Button>
|
|
44
|
+
<span className="w-6 text-center font-medium tabular-nums">{count}</span>
|
|
45
|
+
<Button
|
|
46
|
+
variant="outline"
|
|
47
|
+
size="icon"
|
|
48
|
+
className="h-8 w-8 rounded-full"
|
|
49
|
+
aria-label="Increment"
|
|
50
|
+
onClick={increment}
|
|
51
|
+
>
|
|
52
|
+
<PlusIcon className="size-4" />
|
|
53
|
+
</Button>
|
|
54
|
+
</div>
|
|
55
|
+
<Button
|
|
56
|
+
variant="ghost"
|
|
57
|
+
size="sm"
|
|
58
|
+
className="h-8 gap-1.5 px-2 text-muted-foreground hover:text-destructive"
|
|
59
|
+
onClick={reset}
|
|
60
|
+
disabled={count === 0}
|
|
61
|
+
>
|
|
62
|
+
<Trash2Icon className="size-3.5" />
|
|
63
|
+
<span className="text-xs">{t("cart_clear")}</span>
|
|
64
|
+
</Button>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
);
|
|
68
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { useTranslations } from "next-intl";
|
|
2
|
+
|
|
3
|
+
import { RevealGroup, RevealItem } from "@/features/landing/components/Reveal";
|
|
4
|
+
import { featureCardClassName } from "@/features/landing/helpers";
|
|
5
|
+
import {
|
|
6
|
+
NextjsIcon,
|
|
7
|
+
ReactHookFormIcon,
|
|
8
|
+
TailwindIcon,
|
|
9
|
+
TanstackIcon,
|
|
10
|
+
TypescriptIcon,
|
|
11
|
+
} from "@/features/landing/icons";
|
|
12
|
+
|
|
13
|
+
export function Features() {
|
|
14
|
+
const t = useTranslations("Index");
|
|
15
|
+
|
|
16
|
+
const FEATURES = [
|
|
17
|
+
{
|
|
18
|
+
title: t("feature_1_title"),
|
|
19
|
+
description: t("feature_1_desc"),
|
|
20
|
+
icon: <NextjsIcon className="size-7 text-primary" />,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
title: t("feature_2_title"),
|
|
24
|
+
description: t("feature_2_desc"),
|
|
25
|
+
icon: <TypescriptIcon className="size-7 text-primary" />,
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
title: t("feature_3_title"),
|
|
29
|
+
description: t("feature_3_desc"),
|
|
30
|
+
icon: <TanstackIcon className="size-7 text-primary" />,
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
title: t("feature_4_title"),
|
|
34
|
+
description: t("feature_4_desc"),
|
|
35
|
+
icon: <TailwindIcon className="size-7 text-primary" />,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
title: t("feature_5_title"),
|
|
39
|
+
description: t("feature_5_desc"),
|
|
40
|
+
icon: <ReactHookFormIcon className="size-7 text-primary" />,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
title: t("feature_6_title"),
|
|
44
|
+
description: t("feature_6_desc"),
|
|
45
|
+
/* eslint-disable-next-line @next/next/no-img-element */
|
|
46
|
+
icon: <img src="/logo.webp" alt="ViraStack Logo" className="size-7" />,
|
|
47
|
+
},
|
|
48
|
+
];
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<section id="features" className="mx-auto max-w-5xl px-6 py-16">
|
|
52
|
+
<RevealGroup className="mb-16 text-center">
|
|
53
|
+
<RevealItem>
|
|
54
|
+
<h2 className="text-3xl font-semibold tracking-tight text-balance">
|
|
55
|
+
{t("features_title")}
|
|
56
|
+
</h2>
|
|
57
|
+
</RevealItem>
|
|
58
|
+
<RevealItem>
|
|
59
|
+
<p className="mx-auto mt-3 max-w-xl text-base text-balance text-muted-foreground">
|
|
60
|
+
{t("features_subtitle")}
|
|
61
|
+
</p>
|
|
62
|
+
</RevealItem>
|
|
63
|
+
</RevealGroup>
|
|
64
|
+
|
|
65
|
+
<RevealGroup className="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3">
|
|
66
|
+
{FEATURES.map((feature) => (
|
|
67
|
+
<RevealItem key={feature.title} className={featureCardClassName}>
|
|
68
|
+
<div className="mb-2 flex h-12 w-12 items-center justify-center rounded-xl bg-primary/10 transition-transform duration-200 ease-out group-hover:scale-105">
|
|
69
|
+
{feature.icon}
|
|
70
|
+
</div>
|
|
71
|
+
<div className="flex flex-col gap-1.5">
|
|
72
|
+
<h3 className="text-base font-semibold text-balance text-foreground md:text-lg">
|
|
73
|
+
{feature.title}
|
|
74
|
+
</h3>
|
|
75
|
+
<p className="text-sm leading-relaxed text-pretty text-muted-foreground">
|
|
76
|
+
{feature.description}
|
|
77
|
+
</p>
|
|
78
|
+
</div>
|
|
79
|
+
</RevealItem>
|
|
80
|
+
))}
|
|
81
|
+
</RevealGroup>
|
|
82
|
+
</section>
|
|
83
|
+
);
|
|
84
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import Link from "next/link";
|
|
2
|
+
|
|
3
|
+
import { useTranslations } from "next-intl";
|
|
4
|
+
|
|
5
|
+
import { siteConfig } from "@/config/site.config";
|
|
6
|
+
|
|
7
|
+
import { LanguageSwitcher } from "@/components/shared/LanguageSwitcher";
|
|
8
|
+
import { ThemeToggle } from "@/components/shared/ThemeToggle";
|
|
9
|
+
import { Button } from "@/components/ui/button";
|
|
10
|
+
import { Reveal } from "@/features/landing/components/Reveal";
|
|
11
|
+
import { NextjsIcon, ReactIcon, TailwindIcon } from "@/features/landing/icons";
|
|
12
|
+
|
|
13
|
+
export function Hero() {
|
|
14
|
+
const t = useTranslations("Index");
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<section className="mx-auto flex max-w-3xl flex-col items-center gap-6 px-6 pt-24 pb-16 text-center">
|
|
18
|
+
<Reveal mode="mount" delay={0} y={-8}>
|
|
19
|
+
<span className="rounded-full border border-border px-3 py-1 text-xs font-medium text-muted-foreground">
|
|
20
|
+
{t("hero_badge")}
|
|
21
|
+
</span>
|
|
22
|
+
</Reveal>
|
|
23
|
+
|
|
24
|
+
<h1 className="mb-2 text-center text-4xl lg:text-6xl">
|
|
25
|
+
<span className="font-black text-primary">{t("hero_title_1")}</span>{" "}
|
|
26
|
+
<span className="font-medium text-teal-500 italic">{t("hero_title_2")}</span>
|
|
27
|
+
<span className="mt-2 block text-lg font-normal text-muted-foreground lg:text-xl">
|
|
28
|
+
Next.js Edition
|
|
29
|
+
</span>
|
|
30
|
+
</h1>
|
|
31
|
+
|
|
32
|
+
<p className="max-w-2xl text-base leading-relaxed text-balance text-muted-foreground sm:text-lg">
|
|
33
|
+
{t.rich("hero_desc", {
|
|
34
|
+
nextjs: (chunks) => (
|
|
35
|
+
<span className="inline-flex items-center gap-1 font-semibold text-foreground">
|
|
36
|
+
<NextjsIcon className="h-4 w-4" />
|
|
37
|
+
{chunks}
|
|
38
|
+
</span>
|
|
39
|
+
),
|
|
40
|
+
react: (chunks) => (
|
|
41
|
+
<span className="inline-flex items-center gap-1 font-semibold text-foreground">
|
|
42
|
+
<ReactIcon className="h-4 w-4" />
|
|
43
|
+
{chunks}
|
|
44
|
+
</span>
|
|
45
|
+
),
|
|
46
|
+
tailwind: (chunks) => (
|
|
47
|
+
<span className="inline-flex items-center gap-1 font-semibold text-foreground">
|
|
48
|
+
<TailwindIcon className="h-4 w-4" />
|
|
49
|
+
{chunks}
|
|
50
|
+
</span>
|
|
51
|
+
),
|
|
52
|
+
zustand: (chunks) => <span className="font-medium text-foreground italic">{chunks}</span>,
|
|
53
|
+
tanstack: (chunks) => (
|
|
54
|
+
<span className="font-medium text-foreground italic">{chunks}</span>
|
|
55
|
+
),
|
|
56
|
+
rhf: (chunks) => <span className="font-medium text-foreground italic">{chunks}</span>,
|
|
57
|
+
})}
|
|
58
|
+
</p>
|
|
59
|
+
|
|
60
|
+
<Reveal mode="mount" delay={0.1} className="mt-2 flex items-center gap-2">
|
|
61
|
+
<Button
|
|
62
|
+
className="h-10 px-4 py-2"
|
|
63
|
+
nativeButton={false}
|
|
64
|
+
render={<Link href={siteConfig.links.github} target="_blank" rel="noreferrer" />}
|
|
65
|
+
>
|
|
66
|
+
<span>⭐</span>
|
|
67
|
+
<span>{t("github")}</span>
|
|
68
|
+
</Button>
|
|
69
|
+
<LanguageSwitcher />
|
|
70
|
+
<div className="h-10 w-10 [&>button]:h-full [&>button]:w-full">
|
|
71
|
+
<ThemeToggle />
|
|
72
|
+
</div>
|
|
73
|
+
</Reveal>
|
|
74
|
+
</section>
|
|
75
|
+
);
|
|
76
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Features } from "@/features/landing/components/Features";
|
|
2
|
+
import { Hero } from "@/features/landing/components/Hero";
|
|
3
|
+
import { Showcase } from "@/features/landing/components/Showcase";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Demo landing surface. Delete `src/features/landing` and replace
|
|
7
|
+
* `src/app/page.tsx` when you start your own product UI.
|
|
8
|
+
*/
|
|
9
|
+
export function LandingPage() {
|
|
10
|
+
return (
|
|
11
|
+
<main className="flex-1">
|
|
12
|
+
<Hero />
|
|
13
|
+
<Features />
|
|
14
|
+
<Showcase />
|
|
15
|
+
</main>
|
|
16
|
+
);
|
|
17
|
+
}
|