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.
- package/README.md +125 -0
- package/bin/cli.js +2 -0
- package/dist/cli.js +3148 -0
- package/dist/cli.js.map +1 -0
- package/dist/npm-registry-F7EVX3RR.js +18 -0
- package/dist/npm-registry-F7EVX3RR.js.map +1 -0
- package/package.json +74 -0
- package/templates/api/graphql/client-usage.jsx +14 -0
- package/templates/api/graphql/client-usage.tsx +14 -0
- package/templates/api/graphql/client.js +12 -0
- package/templates/api/graphql/client.ts +12 -0
- package/templates/api/graphql/route.js +32 -0
- package/templates/api/graphql/route.ts +23 -0
- package/templates/api/graphql/schema.graphql +13 -0
- package/templates/api/graphql/vite-server.js +27 -0
- package/templates/api/graphql/vite-server.ts +27 -0
- package/templates/api/rest/client-usage.jsx +14 -0
- package/templates/api/rest/client-usage.tsx +14 -0
- package/templates/api/rest/client.js +4 -0
- package/templates/api/rest/client.ts +4 -0
- package/templates/api/rest/route.js +3 -0
- package/templates/api/rest/route.ts +3 -0
- package/templates/api/rest/users-route.js +11 -0
- package/templates/api/rest/users-route.ts +11 -0
- package/templates/api/rest/vite-server.js +15 -0
- package/templates/api/rest/vite-server.ts +15 -0
- package/templates/api/trpc/client-usage.jsx +26 -0
- package/templates/api/trpc/client-usage.tsx +26 -0
- package/templates/api/trpc/client-vite.js +15 -0
- package/templates/api/trpc/client-vite.ts +16 -0
- package/templates/api/trpc/client.js +13 -0
- package/templates/api/trpc/client.ts +14 -0
- package/templates/api/trpc/root.ts +11 -0
- package/templates/api/trpc/route.js +12 -0
- package/templates/api/trpc/route.ts +12 -0
- package/templates/api/trpc/trpc.ts +6 -0
- package/templates/api/trpc/vite-server.js +9 -0
- package/templates/api/trpc/vite-server.ts +9 -0
- package/templates/auth/clerk-protected-page.jsx +11 -0
- package/templates/auth/clerk-protected-page.tsx +11 -0
- package/templates/auth/clerk-protected.jsx +11 -0
- package/templates/auth/clerk-protected.tsx +11 -0
- package/templates/auth/clerk-signin.jsx +11 -0
- package/templates/auth/clerk-signin.tsx +11 -0
- package/templates/auth/clerk.README.md +8 -0
- package/templates/auth/nextauth-options.js +3 -0
- package/templates/auth/nextauth-options.ts +5 -0
- package/templates/auth/nextauth-protected-page.jsx +12 -0
- package/templates/auth/nextauth-protected-page.tsx +12 -0
- package/templates/auth/nextauth-protected.jsx +12 -0
- package/templates/auth/nextauth-protected.tsx +12 -0
- package/templates/auth/nextauth-route.ts +6 -0
- package/templates/auth/nextauth-signin.jsx +15 -0
- package/templates/auth/nextauth-signin.tsx +15 -0
- package/templates/auth/nextauth.README.md +10 -0
- package/templates/auth/supabase-protected-page.jsx +13 -0
- package/templates/auth/supabase-protected-page.tsx +13 -0
- package/templates/auth/supabase-protected.jsx +13 -0
- package/templates/auth/supabase-protected.tsx +13 -0
- package/templates/auth/supabase-signin.jsx +25 -0
- package/templates/auth/supabase-signin.tsx +25 -0
- package/templates/auth/supabase-vite-signin.jsx +20 -0
- package/templates/auth/supabase-vite-signin.tsx +20 -0
- package/templates/auth/supabase.README.md +9 -0
- package/templates/database/drizzle/client.js +8 -0
- package/templates/database/drizzle/client.ts +8 -0
- package/templates/database/drizzle/drizzle.config.ts +6 -0
- package/templates/database/drizzle/example.js +6 -0
- package/templates/database/drizzle/example.ts +6 -0
- package/templates/database/drizzle/schema.ts +6 -0
- package/templates/database/mongoose/connection.js +13 -0
- package/templates/database/mongoose/connection.ts +13 -0
- package/templates/database/mongoose/model.js +7 -0
- package/templates/database/mongoose/model.ts +7 -0
- package/templates/database/prisma/client.js +3 -0
- package/templates/database/prisma/client.ts +3 -0
- package/templates/database/prisma/example.js +5 -0
- package/templates/database/prisma/example.ts +7 -0
- package/templates/database/prisma/schema.prisma +13 -0
- package/templates/database/providers/neon.README.md +9 -0
- package/templates/database/providers/supabase.README.md +9 -0
- package/templates/database/typeorm/data-source.js +15 -0
- package/templates/database/typeorm/data-source.ts +15 -0
- package/templates/database/typeorm/entity.js +10 -0
- package/templates/database/typeorm/entity.ts +10 -0
- package/templates/database/typeorm/migrations/README.md +5 -0
- package/templates/database/usage/drizzle-users.js +6 -0
- package/templates/database/usage/drizzle-users.ts +6 -0
- package/templates/database/usage/mongoose-users.js +5 -0
- package/templates/database/usage/mongoose-users.ts +5 -0
- package/templates/database/usage/prisma-users.js +5 -0
- package/templates/database/usage/prisma-users.ts +5 -0
- package/templates/database/usage/typeorm-users.js +9 -0
- package/templates/database/usage/typeorm-users.ts +9 -0
- package/templates/features/analytics/README.md +9 -0
- package/templates/features/analytics/posthog.js +7 -0
- package/templates/features/analytics/posthog.ts +9 -0
- package/templates/features/email/README.md +17 -0
- package/templates/features/email/resend.js +3 -0
- package/templates/features/email/resend.ts +3 -0
- package/templates/features/error-tracking/README.md +9 -0
- package/templates/features/error-tracking/sentry.js +7 -0
- package/templates/features/error-tracking/sentry.ts +7 -0
- package/templates/features/payments/README.md +17 -0
- package/templates/features/payments/stripe.js +5 -0
- package/templates/features/payments/stripe.ts +5 -0
- package/templates/features/storage/README.md +12 -0
- package/templates/features/storage/storage.js +5 -0
- package/templates/features/storage/storage.ts +5 -0
- package/templates/nextjs/app/actions.js +6 -0
- package/templates/nextjs/app/actions.ts +6 -0
- package/templates/nextjs/app/examples-page.jsx +16 -0
- package/templates/nextjs/app/examples-page.tsx +16 -0
- package/templates/nextjs/app/layout.jsx +7 -0
- package/templates/nextjs/app/layout.tsx +7 -0
- package/templates/nextjs/app/page.jsx +12 -0
- package/templates/nextjs/app/page.tsx +12 -0
- package/templates/nextjs/next.config.js +4 -0
- package/templates/nextjs/next.config.ts +7 -0
- package/templates/shared/.editorconfig +8 -0
- package/templates/ui/antd.README.md +7 -0
- package/templates/ui/antd.theme.js +5 -0
- package/templates/ui/antd.theme.ts +7 -0
- package/templates/ui/button.jsx +13 -0
- package/templates/ui/button.tsx +13 -0
- package/templates/ui/chakra.README.md +7 -0
- package/templates/ui/chakra.theme.js +8 -0
- package/templates/ui/chakra.theme.ts +8 -0
- package/templates/ui/components.json +14 -0
- package/templates/ui/demo-antd.jsx +5 -0
- package/templates/ui/demo-antd.tsx +5 -0
- package/templates/ui/demo-chakra.jsx +5 -0
- package/templates/ui/demo-chakra.tsx +5 -0
- package/templates/ui/demo-mantine.jsx +5 -0
- package/templates/ui/demo-mantine.tsx +5 -0
- package/templates/ui/demo-mui.jsx +5 -0
- package/templates/ui/demo-mui.tsx +5 -0
- package/templates/ui/demo-nextui.jsx +5 -0
- package/templates/ui/demo-nextui.tsx +5 -0
- package/templates/ui/demo-shadcn.jsx +5 -0
- package/templates/ui/demo-shadcn.tsx +5 -0
- package/templates/ui/demo-tailwind.jsx +3 -0
- package/templates/ui/demo-tailwind.tsx +3 -0
- package/templates/ui/mantine.README.md +7 -0
- package/templates/ui/mantine.theme.js +3 -0
- package/templates/ui/mantine.theme.ts +3 -0
- package/templates/ui/mui.README.md +7 -0
- package/templates/ui/mui.theme.js +7 -0
- package/templates/ui/mui.theme.ts +7 -0
- package/templates/ui/nextui.README.md +7 -0
- package/templates/ui/nextui.theme.js +1 -0
- package/templates/ui/nextui.theme.ts +1 -0
- package/templates/ui/postcss.config.js +1 -0
- package/templates/ui/shadcn.README.md +1 -0
- package/templates/ui/styles.css +3 -0
- package/templates/ui/tailwind.config.js +6 -0
- package/templates/ui/utils.js +3 -0
- package/templates/ui/utils.ts +3 -0
- package/templates/vite/App.jsx +12 -0
- package/templates/vite/App.tsx +12 -0
- package/templates/vite/index.html +12 -0
- package/templates/vite/main.jsx +12 -0
- package/templates/vite/main.tsx +12 -0
- package/templates/vite/vite-env.d.ts +1 -0
- package/templates/vite/vite.config.ts +12 -0
|
@@ -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,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,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,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,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 @@
|
|
|
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,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" />
|