create-stackkit-app 0.4.0 → 0.4.2
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 +25 -11
- package/dist/lib/create-project.js +88 -8
- package/dist/lib/template-composer.js +1 -1
- package/modules/auth/better-auth-express/adapters/mongoose-mongodb.ts +13 -0
- package/modules/auth/better-auth-express/adapters/prisma-mongodb.ts +15 -0
- package/modules/auth/better-auth-express/adapters/prisma-postgresql.ts +15 -0
- package/modules/auth/better-auth-express/files/schemas/prisma-mongodb-schema.prisma +72 -0
- package/modules/auth/better-auth-express/files/schemas/prisma-postgresql-schema.prisma +72 -0
- package/modules/auth/better-auth-express/module.json +26 -3
- package/modules/auth/better-auth-nextjs/adapters/mongoose-mongodb.ts +24 -0
- package/modules/auth/better-auth-nextjs/adapters/prisma-mongodb.ts +26 -0
- package/modules/auth/better-auth-nextjs/adapters/prisma-postgresql.ts +26 -0
- package/modules/auth/better-auth-nextjs/files/schemas/prisma-mongodb-schema.prisma +72 -0
- package/modules/auth/better-auth-nextjs/files/schemas/prisma-postgresql-schema.prisma +72 -0
- package/modules/auth/better-auth-nextjs/module.json +26 -5
- package/modules/auth/better-auth-react/module.json +7 -5
- package/modules/auth/clerk-express/module.json +23 -8
- package/modules/auth/clerk-nextjs/module.json +51 -14
- package/modules/auth/clerk-react/module.json +17 -7
- package/modules/database/mongoose-mongodb/module.json +44 -6
- package/modules/database/prisma-mongodb/files/prisma/schema.prisma +1 -1
- package/modules/database/prisma-mongodb/module.json +28 -4
- package/modules/database/prisma-postgresql/files/prisma/schema.prisma +1 -1
- package/modules/database/prisma-postgresql/module.json +28 -4
- package/package.json +3 -3
- package/templates/express/.env.example +11 -0
- package/templates/express/eslint.config.cjs +42 -0
- package/templates/express/package.json +38 -0
- package/templates/express/src/app.ts +69 -0
- package/templates/express/src/config/env.ts +23 -0
- package/templates/express/src/middlewares/error.middleware.ts +18 -0
- package/templates/express/src/server.ts +8 -0
- package/templates/{bases/express-base → express}/template.json +1 -1
- package/templates/express/tsconfig.json +14 -0
- package/templates/{bases/nextjs-base → nextjs}/app/page.tsx +5 -5
- package/templates/{bases/nextjs-base → nextjs}/template.json +1 -1
- package/templates/react-vite/.env.example +2 -0
- package/templates/react-vite/README.md +85 -0
- package/templates/react-vite/eslint.config.js +23 -0
- package/templates/{bases/react-vite-base → react-vite}/index.html +2 -1
- package/templates/react-vite/package.json +45 -0
- package/templates/react-vite/public/vite.svg +1 -0
- package/templates/react-vite/src/api/client.ts +47 -0
- package/templates/react-vite/src/api/services/user.service.ts +26 -0
- package/templates/react-vite/src/assets/react.svg +1 -0
- package/templates/react-vite/src/components/ErrorBoundary.tsx +51 -0
- package/templates/react-vite/src/components/Layout.tsx +13 -0
- package/templates/react-vite/src/components/Loading.tsx +8 -0
- package/templates/react-vite/src/components/SEO.tsx +49 -0
- package/templates/react-vite/src/config/constants.ts +5 -0
- package/templates/react-vite/src/hooks/index.ts +64 -0
- package/templates/react-vite/src/index.css +1 -0
- package/templates/react-vite/src/lib/queryClient.ts +12 -0
- package/templates/react-vite/src/main.tsx +22 -0
- package/templates/react-vite/src/pages/About.tsx +74 -0
- package/templates/react-vite/src/pages/Home.tsx +45 -0
- package/templates/react-vite/src/pages/NotFound.tsx +24 -0
- package/templates/react-vite/src/pages/UserProfile.tsx +40 -0
- package/templates/react-vite/src/router.tsx +33 -0
- package/templates/react-vite/src/types/api.ts +20 -0
- package/templates/react-vite/src/utils/helpers.ts +51 -0
- package/templates/react-vite/src/utils/storage.ts +35 -0
- package/templates/react-vite/src/vite-env.d.ts +11 -0
- package/templates/react-vite/template.json +20 -0
- package/templates/{bases/react-vite-base/tsconfig.json → react-vite/tsconfig.app.json} +10 -3
- package/templates/react-vite/tsconfig.json +7 -0
- package/templates/react-vite/tsconfig.node.json +26 -0
- package/templates/react-vite/vite.config.ts +13 -0
- package/modules/auth/authjs-express/files/lib/auth.ts +0 -40
- package/modules/auth/authjs-express/files/routes/auth.ts +0 -12
- package/modules/auth/authjs-express/module.json +0 -39
- package/modules/auth/authjs-nextjs/files/api/auth/[...nextauth]/route.ts +0 -3
- package/modules/auth/authjs-nextjs/files/lib/auth.ts +0 -43
- package/modules/auth/authjs-nextjs/module.json +0 -38
- package/modules/auth/nextauth/files/app-router/api/auth/[...nextauth]/route.ts +0 -6
- package/modules/auth/nextauth/files/lib/auth.ts +0 -82
- package/modules/auth/nextauth/files/pages-router/api/auth/[...nextauth].ts +0 -4
- package/modules/auth/nextauth/module.json +0 -50
- package/modules/database/drizzle-postgresql/files/drizzle.config.ts +0 -10
- package/modules/database/drizzle-postgresql/files/lib/db.ts +0 -7
- package/modules/database/drizzle-postgresql/files/lib/schema.ts +0 -8
- package/modules/database/drizzle-postgresql/module.json +0 -34
- package/templates/bases/express-base/.env.example +0 -2
- package/templates/bases/express-base/package.json +0 -23
- package/templates/bases/express-base/src/index.ts +0 -27
- package/templates/bases/express-base/tsconfig.json +0 -17
- package/templates/bases/nextjs-base/package-lock.json +0 -6538
- package/templates/bases/react-vite-base/package.json +0 -27
- package/templates/bases/react-vite-base/src/App.css +0 -14
- package/templates/bases/react-vite-base/src/App.tsx +0 -23
- package/templates/bases/react-vite-base/src/index.css +0 -68
- package/templates/bases/react-vite-base/src/main.tsx +0 -10
- package/templates/bases/react-vite-base/src/vite-env.d.ts +0 -1
- package/templates/bases/react-vite-base/template.json +0 -5
- package/templates/bases/react-vite-base/vite.config.ts +0 -7
- /package/templates/{bases/nextjs-base → nextjs}/README.md +0 -0
- /package/templates/{bases/nextjs-base → nextjs}/app/favicon.ico +0 -0
- /package/templates/{bases/nextjs-base → nextjs}/app/globals.css +0 -0
- /package/templates/{bases/nextjs-base → nextjs}/app/layout.tsx +0 -0
- /package/templates/{bases/nextjs-base → nextjs}/eslint.config.mjs +0 -0
- /package/templates/{bases/nextjs-base → nextjs}/next.config.ts +0 -0
- /package/templates/{bases/nextjs-base → nextjs}/package.json +0 -0
- /package/templates/{bases/nextjs-base → nextjs}/postcss.config.mjs +0 -0
- /package/templates/{bases/nextjs-base → nextjs}/public/file.svg +0 -0
- /package/templates/{bases/nextjs-base → nextjs}/public/globe.svg +0 -0
- /package/templates/{bases/nextjs-base → nextjs}/public/next.svg +0 -0
- /package/templates/{bases/nextjs-base → nextjs}/public/vercel.svg +0 -0
- /package/templates/{bases/nextjs-base → nextjs}/public/window.svg +0 -0
- /package/templates/{bases/nextjs-base → nextjs}/tsconfig.json +0 -0
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "auth",
|
|
3
|
-
"displayName": "NextAuth.js Authentication",
|
|
4
|
-
"description": "Add authentication with NextAuth.js (supports multiple providers)",
|
|
5
|
-
"category": "auth",
|
|
6
|
-
"supportedFrameworks": ["nextjs"],
|
|
7
|
-
"dependencies": {
|
|
8
|
-
"next-auth": "^4.24.5"
|
|
9
|
-
},
|
|
10
|
-
"envVars": [
|
|
11
|
-
{
|
|
12
|
-
"key": "NEXTAUTH_URL",
|
|
13
|
-
"value": "http://localhost:3000",
|
|
14
|
-
"description": "The URL of your application (change in production)",
|
|
15
|
-
"required": true
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"key": "NEXTAUTH_SECRET",
|
|
19
|
-
"value": "",
|
|
20
|
-
"description": "Secret for encrypting tokens. Generate with: openssl rand -base64 32",
|
|
21
|
-
"required": true
|
|
22
|
-
}
|
|
23
|
-
],
|
|
24
|
-
"patches": [
|
|
25
|
-
{
|
|
26
|
-
"type": "create-file",
|
|
27
|
-
"description": "Create NextAuth API route for App Router",
|
|
28
|
-
"source": "app-router/api/auth/[...nextauth]/route.ts",
|
|
29
|
-
"destination": "{{router}}/api/auth/[...nextauth]/route.ts",
|
|
30
|
-
"condition": {
|
|
31
|
-
"router": "app"
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"type": "create-file",
|
|
36
|
-
"description": "Create NextAuth API route for Pages Router",
|
|
37
|
-
"source": "pages-router/api/auth/[...nextauth].ts",
|
|
38
|
-
"destination": "{{router}}/api/auth/[...nextauth].ts",
|
|
39
|
-
"condition": {
|
|
40
|
-
"router": "pages"
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"type": "create-file",
|
|
45
|
-
"description": "Create auth configuration",
|
|
46
|
-
"source": "lib/auth.ts",
|
|
47
|
-
"destination": "{{lib}}/auth.ts"
|
|
48
|
-
}
|
|
49
|
-
]
|
|
50
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { pgTable, serial, text, timestamp } from 'drizzle-orm/pg-core';
|
|
2
|
-
|
|
3
|
-
export const users = pgTable('users', {
|
|
4
|
-
id: serial('id').primaryKey(),
|
|
5
|
-
name: text('name').notNull(),
|
|
6
|
-
email: text('email').notNull().unique(),
|
|
7
|
-
createdAt: timestamp('created_at').defaultNow(),
|
|
8
|
-
});
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "drizzle-postgresql",
|
|
3
|
-
"description": "Drizzle ORM with PostgreSQL",
|
|
4
|
-
"category": "database",
|
|
5
|
-
"dependencies": {
|
|
6
|
-
"drizzle-orm": "^0.36.4",
|
|
7
|
-
"postgres": "^3.4.5"
|
|
8
|
-
},
|
|
9
|
-
"devDependencies": {
|
|
10
|
-
"drizzle-kit": "^0.28.1"
|
|
11
|
-
},
|
|
12
|
-
"scripts": {
|
|
13
|
-
"db:generate": "drizzle-kit generate",
|
|
14
|
-
"db:migrate": "drizzle-kit migrate",
|
|
15
|
-
"db:studio": "drizzle-kit studio"
|
|
16
|
-
},
|
|
17
|
-
"env": {
|
|
18
|
-
"DATABASE_URL": "postgresql://postgres:password@localhost:5432/myapp"
|
|
19
|
-
},
|
|
20
|
-
"files": [
|
|
21
|
-
{
|
|
22
|
-
"source": "files/lib/db.ts",
|
|
23
|
-
"destination": "lib/db.ts"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"source": "files/lib/schema.ts",
|
|
27
|
-
"destination": "lib/schema.ts"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"source": "files/drizzle.config.ts",
|
|
31
|
-
"destination": "drizzle.config.ts"
|
|
32
|
-
}
|
|
33
|
-
]
|
|
34
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "my-app",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"scripts": {
|
|
6
|
-
"dev": "tsx watch src/index.ts",
|
|
7
|
-
"build": "tsc",
|
|
8
|
-
"start": "node dist/index.js",
|
|
9
|
-
"lint": "eslint src"
|
|
10
|
-
},
|
|
11
|
-
"dependencies": {
|
|
12
|
-
"express": "^4.21.2",
|
|
13
|
-
"dotenv": "^16.4.7",
|
|
14
|
-
"cors": "^2.8.5"
|
|
15
|
-
},
|
|
16
|
-
"devDependencies": {
|
|
17
|
-
"@types/express": "^5.0.0",
|
|
18
|
-
"@types/node": "^22.10.5",
|
|
19
|
-
"@types/cors": "^2.8.17",
|
|
20
|
-
"tsx": "^4.19.2",
|
|
21
|
-
"typescript": "^5.7.2"
|
|
22
|
-
}
|
|
23
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import express, { Request, Response } from 'express';
|
|
2
|
-
import dotenv from 'dotenv';
|
|
3
|
-
import cors from 'cors';
|
|
4
|
-
|
|
5
|
-
dotenv.config();
|
|
6
|
-
|
|
7
|
-
const app = express();
|
|
8
|
-
const PORT = process.env.PORT || 3000;
|
|
9
|
-
|
|
10
|
-
// Middleware
|
|
11
|
-
app.use(cors());
|
|
12
|
-
app.use(express.json());
|
|
13
|
-
app.use(express.urlencoded({ extended: true }));
|
|
14
|
-
|
|
15
|
-
// Routes
|
|
16
|
-
app.get('/health', (req: Request, res: Response) => {
|
|
17
|
-
res.json({ status: 'ok', timestamp: new Date().toISOString() });
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
app.get('/', (req: Request, res: Response) => {
|
|
21
|
-
res.json({ message: 'Welcome to StackKit API' });
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
// Start server
|
|
25
|
-
app.listen(PORT, () => {
|
|
26
|
-
console.log(`🚀 Server running on http://localhost:${PORT}`);
|
|
27
|
-
});
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2020",
|
|
4
|
-
"module": "commonjs",
|
|
5
|
-
"lib": ["ES2020"],
|
|
6
|
-
"outDir": "./dist",
|
|
7
|
-
"rootDir": "./src",
|
|
8
|
-
"strict": true,
|
|
9
|
-
"esModuleInterop": true,
|
|
10
|
-
"skipLibCheck": true,
|
|
11
|
-
"forceConsistentCasingInFileNames": true,
|
|
12
|
-
"resolveJsonModule": true,
|
|
13
|
-
"moduleResolution": "node"
|
|
14
|
-
},
|
|
15
|
-
"include": ["src/**/*"],
|
|
16
|
-
"exclude": ["node_modules", "dist"]
|
|
17
|
-
}
|