create-stackforge 0.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.
Files changed (165) hide show
  1. package/README.md +125 -0
  2. package/bin/cli.js +2 -0
  3. package/dist/cli.js +3148 -0
  4. package/dist/cli.js.map +1 -0
  5. package/dist/npm-registry-F7EVX3RR.js +18 -0
  6. package/dist/npm-registry-F7EVX3RR.js.map +1 -0
  7. package/package.json +74 -0
  8. package/templates/api/graphql/client-usage.jsx +14 -0
  9. package/templates/api/graphql/client-usage.tsx +14 -0
  10. package/templates/api/graphql/client.js +12 -0
  11. package/templates/api/graphql/client.ts +12 -0
  12. package/templates/api/graphql/route.js +32 -0
  13. package/templates/api/graphql/route.ts +23 -0
  14. package/templates/api/graphql/schema.graphql +13 -0
  15. package/templates/api/graphql/vite-server.js +27 -0
  16. package/templates/api/graphql/vite-server.ts +27 -0
  17. package/templates/api/rest/client-usage.jsx +14 -0
  18. package/templates/api/rest/client-usage.tsx +14 -0
  19. package/templates/api/rest/client.js +4 -0
  20. package/templates/api/rest/client.ts +4 -0
  21. package/templates/api/rest/route.js +3 -0
  22. package/templates/api/rest/route.ts +3 -0
  23. package/templates/api/rest/users-route.js +11 -0
  24. package/templates/api/rest/users-route.ts +11 -0
  25. package/templates/api/rest/vite-server.js +15 -0
  26. package/templates/api/rest/vite-server.ts +15 -0
  27. package/templates/api/trpc/client-usage.jsx +26 -0
  28. package/templates/api/trpc/client-usage.tsx +26 -0
  29. package/templates/api/trpc/client-vite.js +15 -0
  30. package/templates/api/trpc/client-vite.ts +16 -0
  31. package/templates/api/trpc/client.js +13 -0
  32. package/templates/api/trpc/client.ts +14 -0
  33. package/templates/api/trpc/root.ts +11 -0
  34. package/templates/api/trpc/route.js +12 -0
  35. package/templates/api/trpc/route.ts +12 -0
  36. package/templates/api/trpc/trpc.ts +6 -0
  37. package/templates/api/trpc/vite-server.js +9 -0
  38. package/templates/api/trpc/vite-server.ts +9 -0
  39. package/templates/auth/clerk-protected-page.jsx +11 -0
  40. package/templates/auth/clerk-protected-page.tsx +11 -0
  41. package/templates/auth/clerk-protected.jsx +11 -0
  42. package/templates/auth/clerk-protected.tsx +11 -0
  43. package/templates/auth/clerk-signin.jsx +11 -0
  44. package/templates/auth/clerk-signin.tsx +11 -0
  45. package/templates/auth/clerk.README.md +8 -0
  46. package/templates/auth/nextauth-options.js +3 -0
  47. package/templates/auth/nextauth-options.ts +5 -0
  48. package/templates/auth/nextauth-protected-page.jsx +12 -0
  49. package/templates/auth/nextauth-protected-page.tsx +12 -0
  50. package/templates/auth/nextauth-protected.jsx +12 -0
  51. package/templates/auth/nextauth-protected.tsx +12 -0
  52. package/templates/auth/nextauth-route.ts +6 -0
  53. package/templates/auth/nextauth-signin.jsx +15 -0
  54. package/templates/auth/nextauth-signin.tsx +15 -0
  55. package/templates/auth/nextauth.README.md +10 -0
  56. package/templates/auth/supabase-protected-page.jsx +13 -0
  57. package/templates/auth/supabase-protected-page.tsx +13 -0
  58. package/templates/auth/supabase-protected.jsx +13 -0
  59. package/templates/auth/supabase-protected.tsx +13 -0
  60. package/templates/auth/supabase-signin.jsx +25 -0
  61. package/templates/auth/supabase-signin.tsx +25 -0
  62. package/templates/auth/supabase-vite-signin.jsx +20 -0
  63. package/templates/auth/supabase-vite-signin.tsx +20 -0
  64. package/templates/auth/supabase.README.md +9 -0
  65. package/templates/database/drizzle/client.js +8 -0
  66. package/templates/database/drizzle/client.ts +8 -0
  67. package/templates/database/drizzle/drizzle.config.ts +6 -0
  68. package/templates/database/drizzle/example.js +6 -0
  69. package/templates/database/drizzle/example.ts +6 -0
  70. package/templates/database/drizzle/schema.ts +6 -0
  71. package/templates/database/mongoose/connection.js +13 -0
  72. package/templates/database/mongoose/connection.ts +13 -0
  73. package/templates/database/mongoose/model.js +7 -0
  74. package/templates/database/mongoose/model.ts +7 -0
  75. package/templates/database/prisma/client.js +3 -0
  76. package/templates/database/prisma/client.ts +3 -0
  77. package/templates/database/prisma/example.js +5 -0
  78. package/templates/database/prisma/example.ts +7 -0
  79. package/templates/database/prisma/schema.prisma +13 -0
  80. package/templates/database/providers/neon.README.md +9 -0
  81. package/templates/database/providers/supabase.README.md +9 -0
  82. package/templates/database/typeorm/data-source.js +15 -0
  83. package/templates/database/typeorm/data-source.ts +15 -0
  84. package/templates/database/typeorm/entity.js +10 -0
  85. package/templates/database/typeorm/entity.ts +10 -0
  86. package/templates/database/typeorm/migrations/README.md +5 -0
  87. package/templates/database/usage/drizzle-users.js +6 -0
  88. package/templates/database/usage/drizzle-users.ts +6 -0
  89. package/templates/database/usage/mongoose-users.js +5 -0
  90. package/templates/database/usage/mongoose-users.ts +5 -0
  91. package/templates/database/usage/prisma-users.js +5 -0
  92. package/templates/database/usage/prisma-users.ts +5 -0
  93. package/templates/database/usage/typeorm-users.js +9 -0
  94. package/templates/database/usage/typeorm-users.ts +9 -0
  95. package/templates/features/analytics/README.md +9 -0
  96. package/templates/features/analytics/posthog.js +7 -0
  97. package/templates/features/analytics/posthog.ts +9 -0
  98. package/templates/features/email/README.md +17 -0
  99. package/templates/features/email/resend.js +3 -0
  100. package/templates/features/email/resend.ts +3 -0
  101. package/templates/features/error-tracking/README.md +9 -0
  102. package/templates/features/error-tracking/sentry.js +7 -0
  103. package/templates/features/error-tracking/sentry.ts +7 -0
  104. package/templates/features/payments/README.md +17 -0
  105. package/templates/features/payments/stripe.js +5 -0
  106. package/templates/features/payments/stripe.ts +5 -0
  107. package/templates/features/storage/README.md +12 -0
  108. package/templates/features/storage/storage.js +5 -0
  109. package/templates/features/storage/storage.ts +5 -0
  110. package/templates/nextjs/app/actions.js +6 -0
  111. package/templates/nextjs/app/actions.ts +6 -0
  112. package/templates/nextjs/app/examples-page.jsx +16 -0
  113. package/templates/nextjs/app/examples-page.tsx +16 -0
  114. package/templates/nextjs/app/layout.jsx +7 -0
  115. package/templates/nextjs/app/layout.tsx +7 -0
  116. package/templates/nextjs/app/page.jsx +12 -0
  117. package/templates/nextjs/app/page.tsx +12 -0
  118. package/templates/nextjs/next.config.js +4 -0
  119. package/templates/nextjs/next.config.ts +7 -0
  120. package/templates/shared/.editorconfig +8 -0
  121. package/templates/ui/antd.README.md +7 -0
  122. package/templates/ui/antd.theme.js +5 -0
  123. package/templates/ui/antd.theme.ts +7 -0
  124. package/templates/ui/button.jsx +13 -0
  125. package/templates/ui/button.tsx +13 -0
  126. package/templates/ui/chakra.README.md +7 -0
  127. package/templates/ui/chakra.theme.js +8 -0
  128. package/templates/ui/chakra.theme.ts +8 -0
  129. package/templates/ui/components.json +14 -0
  130. package/templates/ui/demo-antd.jsx +5 -0
  131. package/templates/ui/demo-antd.tsx +5 -0
  132. package/templates/ui/demo-chakra.jsx +5 -0
  133. package/templates/ui/demo-chakra.tsx +5 -0
  134. package/templates/ui/demo-mantine.jsx +5 -0
  135. package/templates/ui/demo-mantine.tsx +5 -0
  136. package/templates/ui/demo-mui.jsx +5 -0
  137. package/templates/ui/demo-mui.tsx +5 -0
  138. package/templates/ui/demo-nextui.jsx +5 -0
  139. package/templates/ui/demo-nextui.tsx +5 -0
  140. package/templates/ui/demo-shadcn.jsx +5 -0
  141. package/templates/ui/demo-shadcn.tsx +5 -0
  142. package/templates/ui/demo-tailwind.jsx +3 -0
  143. package/templates/ui/demo-tailwind.tsx +3 -0
  144. package/templates/ui/mantine.README.md +7 -0
  145. package/templates/ui/mantine.theme.js +3 -0
  146. package/templates/ui/mantine.theme.ts +3 -0
  147. package/templates/ui/mui.README.md +7 -0
  148. package/templates/ui/mui.theme.js +7 -0
  149. package/templates/ui/mui.theme.ts +7 -0
  150. package/templates/ui/nextui.README.md +7 -0
  151. package/templates/ui/nextui.theme.js +1 -0
  152. package/templates/ui/nextui.theme.ts +1 -0
  153. package/templates/ui/postcss.config.js +1 -0
  154. package/templates/ui/shadcn.README.md +1 -0
  155. package/templates/ui/styles.css +3 -0
  156. package/templates/ui/tailwind.config.js +6 -0
  157. package/templates/ui/utils.js +3 -0
  158. package/templates/ui/utils.ts +3 -0
  159. package/templates/vite/App.jsx +12 -0
  160. package/templates/vite/App.tsx +12 -0
  161. package/templates/vite/index.html +12 -0
  162. package/templates/vite/main.jsx +12 -0
  163. package/templates/vite/main.tsx +12 -0
  164. package/templates/vite/vite-env.d.ts +1 -0
  165. package/templates/vite/vite.config.ts +12 -0
@@ -0,0 +1,9 @@
1
+ # Error Tracking
2
+
3
+ This project includes Sentry (Next.js).
4
+
5
+ Configure:
6
+ - Add `SENTRY_DSN`
7
+
8
+ Usage:
9
+ - Initialize in `src/lib/sentry.ts`.
@@ -0,0 +1,7 @@
1
+ import * as Sentry from '@sentry/nextjs';
2
+
3
+ Sentry.init({
4
+ dsn: process.env.SENTRY_DSN || ''
5
+ });
6
+
7
+ export { Sentry };
@@ -0,0 +1,7 @@
1
+ import * as Sentry from '@sentry/nextjs';
2
+
3
+ export function initSentry() {
4
+ const dsn = process.env.SENTRY_DSN || '';
5
+ if (!dsn) return;
6
+ Sentry.init({ dsn });
7
+ }
@@ -0,0 +1,17 @@
1
+ # Payments (Stripe)
2
+
3
+ ## Setup
4
+ 1. Add STRIPE_SECRET_KEY to .env.
5
+ 2. Client lives at src/lib/stripe.ts (server-side use only).
6
+
7
+ ## Example
8
+ ```ts
9
+ import { stripe } from '@/lib/stripe';
10
+
11
+ const session = await stripe.checkout.sessions.create({
12
+ mode: 'payment',
13
+ line_items: [{ price: 'price_123', quantity: 1 }],
14
+ success_url: 'https://example.com/success',
15
+ cancel_url: 'https://example.com/cancel'
16
+ });
17
+ ```
@@ -0,0 +1,5 @@
1
+ import Stripe from 'stripe';
2
+
3
+ export const stripe = new Stripe(process.env.STRIPE_SECRET_KEY || '', {
4
+ apiVersion: '2023-10-16'
5
+ });
@@ -0,0 +1,5 @@
1
+ import Stripe from 'stripe';
2
+
3
+ export const stripe = new Stripe(process.env.STRIPE_SECRET_KEY || '', {
4
+ apiVersion: '2023-10-16'
5
+ });
@@ -0,0 +1,12 @@
1
+ # Storage (Cloudinary)
2
+
3
+ ## Setup
4
+ 1. Add CLOUDINARY_URL to .env.
5
+ 2. Configure Cloudinary in your app code as needed.
6
+
7
+ ## Example
8
+ ```ts
9
+ import { v2 as cloudinary } from 'cloudinary';
10
+
11
+ cloudinary.config({ url: process.env.CLOUDINARY_URL });
12
+ ```
@@ -0,0 +1,5 @@
1
+ import { v2 as cloudinary } from 'cloudinary';
2
+
3
+ cloudinary.config({ url: process.env.CLOUDINARY_URL });
4
+
5
+ export { cloudinary };
@@ -0,0 +1,5 @@
1
+ import { v2 as cloudinary } from 'cloudinary';
2
+
3
+ cloudinary.config({ url: process.env.CLOUDINARY_URL });
4
+
5
+ export { cloudinary };
@@ -0,0 +1,6 @@
1
+ 'use server';
2
+
3
+ export async function exampleAction(formData) {
4
+ const name = String(formData.get('name') || 'world');
5
+ console.log(`Hello ${name}`);
6
+ }
@@ -0,0 +1,6 @@
1
+ 'use server';
2
+
3
+ export async function exampleAction(formData: FormData) {
4
+ const name = String(formData.get('name') || 'world');
5
+ console.log(`Hello ${name}`);
6
+ }
@@ -0,0 +1,16 @@
1
+ {{imports}}{{uiDemoImport}}import { exampleAction } from '../actions';
2
+
3
+ export default function ExamplesPage() {
4
+ return (
5
+ <main>
6
+ <h1>API Examples</h1>
7
+ <form action={exampleAction}>
8
+ <input name="name" placeholder="Your name" />
9
+ <button type="submit">Run server action</button>
10
+ </form>
11
+ {{featureNotes}}
12
+ {{components}}
13
+ {{uiDemoComponent}}
14
+ </main>
15
+ );
16
+ }
@@ -0,0 +1,16 @@
1
+ {{imports}}{{uiDemoImport}}import { exampleAction } from '../actions';
2
+
3
+ export default function ExamplesPage() {
4
+ return (
5
+ <main>
6
+ <h1>API Examples</h1>
7
+ <form action={exampleAction}>
8
+ <input name="name" placeholder="Your name" />
9
+ <button type="submit">Run server action</button>
10
+ </form>
11
+ {{featureNotes}}
12
+ {{components}}
13
+ {{uiDemoComponent}}
14
+ </main>
15
+ );
16
+ }
@@ -0,0 +1,7 @@
1
+ {{importCss}}{{providersImport}}export default function RootLayout({ children }) {
2
+ return (
3
+ <html lang="en">
4
+ <body>{{wrapChildren}}</body>
5
+ </html>
6
+ );
7
+ }
@@ -0,0 +1,7 @@
1
+ {{importCss}}{{providersImport}}export default function RootLayout({ children }: { children: React.ReactNode }) {
2
+ return (
3
+ <html lang="en">
4
+ <body>{{wrapChildren}}</body>
5
+ </html>
6
+ );
7
+ }
@@ -0,0 +1,12 @@
1
+ import Link from 'next/link';
2
+
3
+ export default function Page() {
4
+ return (
5
+ <main>
6
+ <h1>Welcome to {{projectName}}</h1>
7
+ <ul>
8
+ {{links}}
9
+ </ul>
10
+ </main>
11
+ );
12
+ }
@@ -0,0 +1,12 @@
1
+ import Link from 'next/link';
2
+
3
+ export default function Page() {
4
+ return (
5
+ <main>
6
+ <h1>Welcome to {{projectName}}</h1>
7
+ <ul>
8
+ {{links}}
9
+ </ul>
10
+ </main>
11
+ );
12
+ }
@@ -0,0 +1,4 @@
1
+ /** @type {import('next').NextConfig} */
2
+ const nextConfig = {};
3
+
4
+ export default nextConfig;
@@ -0,0 +1,7 @@
1
+ import type { NextConfig } from 'next';
2
+
3
+ const nextConfig: NextConfig = {
4
+ reactStrictMode: true
5
+ };
6
+
7
+ export default nextConfig;
@@ -0,0 +1,8 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ insert_final_newline = true
7
+ indent_style = space
8
+ indent_size = 2
@@ -0,0 +1,7 @@
1
+ # Ant Design Setup
2
+
3
+ This project uses Ant Design.
4
+
5
+ Next steps:
6
+ - Import `antd/dist/reset.css` in your entry file.
7
+ - Use components directly from `antd`.
@@ -0,0 +1,5 @@
1
+ export const theme = {
2
+ token: {
3
+ colorPrimary: '#1677ff'
4
+ }
5
+ };
@@ -0,0 +1,7 @@
1
+ import type { ThemeConfig } from 'antd';
2
+
3
+ export const theme: ThemeConfig = {
4
+ token: {
5
+ colorPrimary: '#1677ff'
6
+ }
7
+ };
@@ -0,0 +1,13 @@
1
+ import { cn } from '../../lib/utils';
2
+
3
+ export function Button({ className, ...props }) {
4
+ return (
5
+ <button
6
+ className={cn(
7
+ 'inline-flex items-center justify-center rounded-md bg-black px-3 py-2 text-sm text-white',
8
+ className
9
+ )}
10
+ {...props}
11
+ />
12
+ );
13
+ }
@@ -0,0 +1,13 @@
1
+ import { cn } from '../../lib/utils';
2
+
3
+ export function Button({ className, ...props }: React.ButtonHTMLAttributes<HTMLButtonElement>) {
4
+ return (
5
+ <button
6
+ className={cn(
7
+ 'inline-flex items-center justify-center rounded-md bg-black px-3 py-2 text-sm text-white',
8
+ className
9
+ )}
10
+ {...props}
11
+ />
12
+ );
13
+ }
@@ -0,0 +1,7 @@
1
+ # Chakra UI Setup
2
+
3
+ This project uses Chakra UI.
4
+
5
+ Next steps:
6
+ - Wrap your app with `ChakraProvider`.
7
+ - Extend theme in `src/theme.ts`.
@@ -0,0 +1,8 @@
1
+ import { extendTheme } from '@chakra-ui/react';
2
+
3
+ export const theme = extendTheme({
4
+ config: {
5
+ initialColorMode: 'light',
6
+ useSystemColorMode: false
7
+ }
8
+ });
@@ -0,0 +1,8 @@
1
+ import { extendTheme } from '@chakra-ui/react';
2
+
3
+ export const theme = extendTheme({
4
+ config: {
5
+ initialColorMode: 'light',
6
+ useSystemColorMode: false
7
+ }
8
+ });
@@ -0,0 +1,14 @@
1
+ {
2
+ "style": "default",
3
+ "rsc": true,
4
+ "tailwind": {
5
+ "config": "tailwind.config.js",
6
+ "css": "src/styles.css",
7
+ "baseColor": "slate",
8
+ "cssVariables": true
9
+ },
10
+ "aliases": {
11
+ "components": "src/components",
12
+ "utils": "src/lib/utils"
13
+ }
14
+ }
@@ -0,0 +1,5 @@
1
+ import { Button } from 'antd';
2
+
3
+ export function UiDemo() {
4
+ return <Button type="primary">AntD Button</Button>;
5
+ }
@@ -0,0 +1,5 @@
1
+ import { Button } from 'antd';
2
+
3
+ export function UiDemo() {
4
+ return <Button type="primary">AntD Button</Button>;
5
+ }
@@ -0,0 +1,5 @@
1
+ import { Button } from '@chakra-ui/react';
2
+
3
+ export function UiDemo() {
4
+ return <Button colorScheme="blue">Chakra Button</Button>;
5
+ }
@@ -0,0 +1,5 @@
1
+ import { Button } from '@chakra-ui/react';
2
+
3
+ export function UiDemo() {
4
+ return <Button colorScheme="blue">Chakra Button</Button>;
5
+ }
@@ -0,0 +1,5 @@
1
+ import { Button } from '@mantine/core';
2
+
3
+ export function UiDemo() {
4
+ return <Button>Mantine Button</Button>;
5
+ }
@@ -0,0 +1,5 @@
1
+ import { Button } from '@mantine/core';
2
+
3
+ export function UiDemo() {
4
+ return <Button>Mantine Button</Button>;
5
+ }
@@ -0,0 +1,5 @@
1
+ import { Button } from '@mui/material';
2
+
3
+ export function UiDemo() {
4
+ return <Button variant="contained">MUI Button</Button>;
5
+ }
@@ -0,0 +1,5 @@
1
+ import { Button } from '@mui/material';
2
+
3
+ export function UiDemo() {
4
+ return <Button variant="contained">MUI Button</Button>;
5
+ }
@@ -0,0 +1,5 @@
1
+ import { Button } from '@nextui-org/react';
2
+
3
+ export function UiDemo() {
4
+ return <Button color="primary">NextUI Button</Button>;
5
+ }
@@ -0,0 +1,5 @@
1
+ import { Button } from '@nextui-org/react';
2
+
3
+ export function UiDemo() {
4
+ return <Button color="primary">NextUI Button</Button>;
5
+ }
@@ -0,0 +1,5 @@
1
+ import { Button } from './ui/button';
2
+
3
+ export function UiDemo() {
4
+ return <Button>shadcn/ui Button</Button>;
5
+ }
@@ -0,0 +1,5 @@
1
+ import { Button } from './ui/button';
2
+
3
+ export function UiDemo() {
4
+ return <Button>shadcn/ui Button</Button>;
5
+ }
@@ -0,0 +1,3 @@
1
+ export function UiDemo() {
2
+ return <button className="rounded bg-black px-3 py-2 text-sm text-white">Tailwind Button</button>;
3
+ }
@@ -0,0 +1,3 @@
1
+ export function UiDemo() {
2
+ return <button className="rounded bg-black px-3 py-2 text-sm text-white">Tailwind Button</button>;
3
+ }
@@ -0,0 +1,7 @@
1
+ # Mantine Setup
2
+
3
+ This project uses Mantine.
4
+
5
+ Next steps:
6
+ - Wrap your app with `MantineProvider`.
7
+ - Add global styles in `src/main.tsx` or app layout.
@@ -0,0 +1,3 @@
1
+ import { createTheme } from '@mantine/core';
2
+
3
+ export const theme = createTheme({});
@@ -0,0 +1,3 @@
1
+ import { createTheme } from '@mantine/core';
2
+
3
+ export const theme = createTheme({});
@@ -0,0 +1,7 @@
1
+ # MUI Setup
2
+
3
+ This project uses MUI.
4
+
5
+ Next steps:
6
+ - Wrap your app with `ThemeProvider`.
7
+ - Customize theme in `src/theme.ts`.
@@ -0,0 +1,7 @@
1
+ import { createTheme } from '@mui/material/styles';
2
+
3
+ export const theme = createTheme({
4
+ palette: {
5
+ mode: 'light'
6
+ }
7
+ });
@@ -0,0 +1,7 @@
1
+ import { createTheme } from '@mui/material/styles';
2
+
3
+ export const theme = createTheme({
4
+ palette: {
5
+ mode: 'light'
6
+ }
7
+ });
@@ -0,0 +1,7 @@
1
+ # NextUI Setup
2
+
3
+ This project uses NextUI.
4
+
5
+ Next steps:
6
+ - Wrap your app with `NextUIProvider`.
7
+ - Import styles in your entry file.
@@ -0,0 +1 @@
1
+ export const theme = {};
@@ -0,0 +1 @@
1
+ export const theme = {};
@@ -0,0 +1 @@
1
+ export default { plugins: { tailwindcss: {}, autoprefixer: {} } };
@@ -0,0 +1 @@
1
+ shadcn/ui components go here
@@ -0,0 +1,3 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
@@ -0,0 +1,6 @@
1
+ /** @type {import('tailwindcss').Config} */
2
+ export default {
3
+ content: ['./app/**/*.{ts,tsx,js,jsx}', './src/**/*.{ts,tsx,js,jsx}'],
4
+ theme: { extend: {} },
5
+ plugins: []
6
+ };
@@ -0,0 +1,3 @@
1
+ export function cn(...classes) {
2
+ return classes.filter(Boolean).join(' ');
3
+ }
@@ -0,0 +1,3 @@
1
+ export function cn(...classes: Array<string | false | null | undefined>) {
2
+ return classes.filter(Boolean).join(' ');
3
+ }
@@ -0,0 +1,12 @@
1
+ {{apiImports}}{{uiDemoImport}}export default function App() {
2
+ const apiUrl = import.meta.env.VITE_API_URL || 'http://localhost:3001';
3
+ return (
4
+ <main>
5
+ <h1>Welcome to {{projectName}}</h1>
6
+ <p>API base: {apiUrl}</p>
7
+ {{featureNotes}}
8
+ {{apiExamples}}
9
+ {{uiDemoComponent}}
10
+ </main>
11
+ );
12
+ }
@@ -0,0 +1,12 @@
1
+ {{apiImports}}{{uiDemoImport}}export default function App() {
2
+ const apiUrl = import.meta.env.VITE_API_URL || 'http://localhost:3001';
3
+ return (
4
+ <main>
5
+ <h1>Welcome to {{projectName}}</h1>
6
+ <p>API base: {apiUrl}</p>
7
+ {{featureNotes}}
8
+ {{apiExamples}}
9
+ {{uiDemoComponent}}
10
+ </main>
11
+ );
12
+ }
@@ -0,0 +1,12 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>{{projectName}}</title>
7
+ </head>
8
+ <body>
9
+ <div id="root"></div>
10
+ <script type="module" src="/src/main.{{ext}}"></script>
11
+ </body>
12
+ </html>
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import ReactDOM from 'react-dom/client';
3
+ import App from './App';
4
+ {{importCss}}
5
+ {{providersImport}}
6
+ {{initImports}}
7
+ {{initCalls}}
8
+ ReactDOM.createRoot(document.getElementById('root')).render(
9
+ <React.StrictMode>
10
+ {{wrapApp}}
11
+ </React.StrictMode>
12
+ );
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import ReactDOM from 'react-dom/client';
3
+ import App from './App';
4
+ {{importCss}}
5
+ {{providersImport}}
6
+ {{initImports}}
7
+ {{initCalls}}
8
+ ReactDOM.createRoot(document.getElementById('root')!).render(
9
+ <React.StrictMode>
10
+ {{wrapApp}}
11
+ </React.StrictMode>
12
+ );
@@ -0,0 +1 @@
1
+ /// <reference types="vite/client" />
@@ -0,0 +1,12 @@
1
+ import { defineConfig } from 'vite';
2
+ import path from 'node:path';
3
+ import react from '@vitejs/plugin-react-swc';
4
+
5
+ export default defineConfig({
6
+ plugins: [react()],
7
+ resolve: {
8
+ alias: {
9
+ '@': path.resolve(__dirname, './src')
10
+ }
11
+ }
12
+ });