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.
Files changed (109) hide show
  1. package/README.md +25 -11
  2. package/dist/lib/create-project.js +88 -8
  3. package/dist/lib/template-composer.js +1 -1
  4. package/modules/auth/better-auth-express/adapters/mongoose-mongodb.ts +13 -0
  5. package/modules/auth/better-auth-express/adapters/prisma-mongodb.ts +15 -0
  6. package/modules/auth/better-auth-express/adapters/prisma-postgresql.ts +15 -0
  7. package/modules/auth/better-auth-express/files/schemas/prisma-mongodb-schema.prisma +72 -0
  8. package/modules/auth/better-auth-express/files/schemas/prisma-postgresql-schema.prisma +72 -0
  9. package/modules/auth/better-auth-express/module.json +26 -3
  10. package/modules/auth/better-auth-nextjs/adapters/mongoose-mongodb.ts +24 -0
  11. package/modules/auth/better-auth-nextjs/adapters/prisma-mongodb.ts +26 -0
  12. package/modules/auth/better-auth-nextjs/adapters/prisma-postgresql.ts +26 -0
  13. package/modules/auth/better-auth-nextjs/files/schemas/prisma-mongodb-schema.prisma +72 -0
  14. package/modules/auth/better-auth-nextjs/files/schemas/prisma-postgresql-schema.prisma +72 -0
  15. package/modules/auth/better-auth-nextjs/module.json +26 -5
  16. package/modules/auth/better-auth-react/module.json +7 -5
  17. package/modules/auth/clerk-express/module.json +23 -8
  18. package/modules/auth/clerk-nextjs/module.json +51 -14
  19. package/modules/auth/clerk-react/module.json +17 -7
  20. package/modules/database/mongoose-mongodb/module.json +44 -6
  21. package/modules/database/prisma-mongodb/files/prisma/schema.prisma +1 -1
  22. package/modules/database/prisma-mongodb/module.json +28 -4
  23. package/modules/database/prisma-postgresql/files/prisma/schema.prisma +1 -1
  24. package/modules/database/prisma-postgresql/module.json +28 -4
  25. package/package.json +3 -3
  26. package/templates/express/.env.example +11 -0
  27. package/templates/express/eslint.config.cjs +42 -0
  28. package/templates/express/package.json +38 -0
  29. package/templates/express/src/app.ts +69 -0
  30. package/templates/express/src/config/env.ts +23 -0
  31. package/templates/express/src/middlewares/error.middleware.ts +18 -0
  32. package/templates/express/src/server.ts +8 -0
  33. package/templates/{bases/express-base → express}/template.json +1 -1
  34. package/templates/express/tsconfig.json +14 -0
  35. package/templates/{bases/nextjs-base → nextjs}/app/page.tsx +5 -5
  36. package/templates/{bases/nextjs-base → nextjs}/template.json +1 -1
  37. package/templates/react-vite/.env.example +2 -0
  38. package/templates/react-vite/README.md +85 -0
  39. package/templates/react-vite/eslint.config.js +23 -0
  40. package/templates/{bases/react-vite-base → react-vite}/index.html +2 -1
  41. package/templates/react-vite/package.json +45 -0
  42. package/templates/react-vite/public/vite.svg +1 -0
  43. package/templates/react-vite/src/api/client.ts +47 -0
  44. package/templates/react-vite/src/api/services/user.service.ts +26 -0
  45. package/templates/react-vite/src/assets/react.svg +1 -0
  46. package/templates/react-vite/src/components/ErrorBoundary.tsx +51 -0
  47. package/templates/react-vite/src/components/Layout.tsx +13 -0
  48. package/templates/react-vite/src/components/Loading.tsx +8 -0
  49. package/templates/react-vite/src/components/SEO.tsx +49 -0
  50. package/templates/react-vite/src/config/constants.ts +5 -0
  51. package/templates/react-vite/src/hooks/index.ts +64 -0
  52. package/templates/react-vite/src/index.css +1 -0
  53. package/templates/react-vite/src/lib/queryClient.ts +12 -0
  54. package/templates/react-vite/src/main.tsx +22 -0
  55. package/templates/react-vite/src/pages/About.tsx +74 -0
  56. package/templates/react-vite/src/pages/Home.tsx +45 -0
  57. package/templates/react-vite/src/pages/NotFound.tsx +24 -0
  58. package/templates/react-vite/src/pages/UserProfile.tsx +40 -0
  59. package/templates/react-vite/src/router.tsx +33 -0
  60. package/templates/react-vite/src/types/api.ts +20 -0
  61. package/templates/react-vite/src/utils/helpers.ts +51 -0
  62. package/templates/react-vite/src/utils/storage.ts +35 -0
  63. package/templates/react-vite/src/vite-env.d.ts +11 -0
  64. package/templates/react-vite/template.json +20 -0
  65. package/templates/{bases/react-vite-base/tsconfig.json → react-vite/tsconfig.app.json} +10 -3
  66. package/templates/react-vite/tsconfig.json +7 -0
  67. package/templates/react-vite/tsconfig.node.json +26 -0
  68. package/templates/react-vite/vite.config.ts +13 -0
  69. package/modules/auth/authjs-express/files/lib/auth.ts +0 -40
  70. package/modules/auth/authjs-express/files/routes/auth.ts +0 -12
  71. package/modules/auth/authjs-express/module.json +0 -39
  72. package/modules/auth/authjs-nextjs/files/api/auth/[...nextauth]/route.ts +0 -3
  73. package/modules/auth/authjs-nextjs/files/lib/auth.ts +0 -43
  74. package/modules/auth/authjs-nextjs/module.json +0 -38
  75. package/modules/auth/nextauth/files/app-router/api/auth/[...nextauth]/route.ts +0 -6
  76. package/modules/auth/nextauth/files/lib/auth.ts +0 -82
  77. package/modules/auth/nextauth/files/pages-router/api/auth/[...nextauth].ts +0 -4
  78. package/modules/auth/nextauth/module.json +0 -50
  79. package/modules/database/drizzle-postgresql/files/drizzle.config.ts +0 -10
  80. package/modules/database/drizzle-postgresql/files/lib/db.ts +0 -7
  81. package/modules/database/drizzle-postgresql/files/lib/schema.ts +0 -8
  82. package/modules/database/drizzle-postgresql/module.json +0 -34
  83. package/templates/bases/express-base/.env.example +0 -2
  84. package/templates/bases/express-base/package.json +0 -23
  85. package/templates/bases/express-base/src/index.ts +0 -27
  86. package/templates/bases/express-base/tsconfig.json +0 -17
  87. package/templates/bases/nextjs-base/package-lock.json +0 -6538
  88. package/templates/bases/react-vite-base/package.json +0 -27
  89. package/templates/bases/react-vite-base/src/App.css +0 -14
  90. package/templates/bases/react-vite-base/src/App.tsx +0 -23
  91. package/templates/bases/react-vite-base/src/index.css +0 -68
  92. package/templates/bases/react-vite-base/src/main.tsx +0 -10
  93. package/templates/bases/react-vite-base/src/vite-env.d.ts +0 -1
  94. package/templates/bases/react-vite-base/template.json +0 -5
  95. package/templates/bases/react-vite-base/vite.config.ts +0 -7
  96. /package/templates/{bases/nextjs-base → nextjs}/README.md +0 -0
  97. /package/templates/{bases/nextjs-base → nextjs}/app/favicon.ico +0 -0
  98. /package/templates/{bases/nextjs-base → nextjs}/app/globals.css +0 -0
  99. /package/templates/{bases/nextjs-base → nextjs}/app/layout.tsx +0 -0
  100. /package/templates/{bases/nextjs-base → nextjs}/eslint.config.mjs +0 -0
  101. /package/templates/{bases/nextjs-base → nextjs}/next.config.ts +0 -0
  102. /package/templates/{bases/nextjs-base → nextjs}/package.json +0 -0
  103. /package/templates/{bases/nextjs-base → nextjs}/postcss.config.mjs +0 -0
  104. /package/templates/{bases/nextjs-base → nextjs}/public/file.svg +0 -0
  105. /package/templates/{bases/nextjs-base → nextjs}/public/globe.svg +0 -0
  106. /package/templates/{bases/nextjs-base → nextjs}/public/next.svg +0 -0
  107. /package/templates/{bases/nextjs-base → nextjs}/public/vercel.svg +0 -0
  108. /package/templates/{bases/nextjs-base → nextjs}/public/window.svg +0 -0
  109. /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,10 +0,0 @@
1
- import { defineConfig } from 'drizzle-kit';
2
-
3
- export default defineConfig({
4
- schema: './lib/schema.ts',
5
- out: './drizzle',
6
- dialect: 'postgresql',
7
- dbCredentials: {
8
- url: process.env.DATABASE_URL!,
9
- },
10
- });
@@ -1,7 +0,0 @@
1
- import { drizzle } from 'drizzle-orm/postgres-js';
2
- import postgres from 'postgres';
3
-
4
- const connectionString = process.env.DATABASE_URL!;
5
-
6
- export const client = postgres(connectionString, { prepare: false });
7
- export const db = drizzle(client);
@@ -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,2 +0,0 @@
1
- PORT=3000
2
- NODE_ENV=development
@@ -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
- }