create-stackkit-app 0.1.5 → 0.3.0

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 (42) hide show
  1. package/README.md +46 -31
  2. package/dist/index.js +4 -12
  3. package/dist/index.js.map +1 -1
  4. package/dist/lib/create-project.d.ts +2 -0
  5. package/dist/lib/create-project.d.ts.map +1 -0
  6. package/dist/lib/create-project.js +380 -0
  7. package/dist/lib/create-project.js.map +1 -0
  8. package/dist/lib/template-composer.d.ts +17 -0
  9. package/dist/lib/template-composer.d.ts.map +1 -0
  10. package/dist/lib/template-composer.js +199 -0
  11. package/dist/lib/template-composer.js.map +1 -0
  12. package/package.json +17 -5
  13. package/templates/auth/better-auth-express/config.json +18 -0
  14. package/templates/auth/better-auth-express/src/lib/auth.ts +12 -0
  15. package/templates/auth/better-auth-express/src/routes/auth.ts +10 -0
  16. package/templates/auth/better-auth-nextjs/app/api/auth/[...all]/route.ts +4 -0
  17. package/templates/auth/better-auth-nextjs/config.json +18 -0
  18. package/templates/auth/better-auth-nextjs/lib/auth.ts +14 -0
  19. package/templates/auth/nextauth/app/api/auth/[...nextauth]/route.ts +3 -0
  20. package/templates/auth/nextauth/config.json +18 -0
  21. package/templates/auth/nextauth/lib/auth.ts +31 -0
  22. package/templates/bases/express-base/.env.example +2 -0
  23. package/templates/bases/express-base/package.json +23 -0
  24. package/templates/bases/express-base/src/index.ts +27 -0
  25. package/templates/bases/express-base/template.json +7 -0
  26. package/templates/bases/express-base/tsconfig.json +17 -0
  27. package/templates/bases/nextjs-base/.eslintrc.json +3 -0
  28. package/templates/bases/nextjs-base/app/globals.css +3 -0
  29. package/templates/bases/nextjs-base/app/layout.tsx +19 -0
  30. package/templates/bases/nextjs-base/app/page.tsx +8 -0
  31. package/templates/bases/nextjs-base/next.config.ts +5 -0
  32. package/templates/bases/nextjs-base/package.json +24 -0
  33. package/templates/bases/nextjs-base/template.json +7 -0
  34. package/templates/bases/nextjs-base/tsconfig.json +27 -0
  35. package/templates/databases/prisma-mongodb/config.json +21 -0
  36. package/templates/databases/prisma-mongodb/lib/db.ts +13 -0
  37. package/templates/databases/prisma-mongodb/prisma/schema.prisma +16 -0
  38. package/templates/databases/prisma-postgresql/config.json +22 -0
  39. package/templates/databases/prisma-postgresql/lib/db.ts +13 -0
  40. package/templates/databases/prisma-postgresql/prisma/schema.prisma +16 -0
  41. package/src/index.ts +0 -21
  42. package/tsconfig.json +0 -9
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "prisma-postgresql",
3
+ "displayName": "Prisma + PostgreSQL",
4
+ "database": "prisma-postgresql",
5
+ "compatibleWith": ["nextjs", "express"],
6
+ "dependencies": {
7
+ "@prisma/client": "^6.2.0"
8
+ },
9
+ "devDependencies": {
10
+ "prisma": "^6.2.0"
11
+ },
12
+ "scripts": {
13
+ "db:generate": "prisma generate",
14
+ "db:push": "prisma db push",
15
+ "db:migrate": "prisma migrate dev",
16
+ "db:studio": "prisma studio"
17
+ },
18
+ "env": {
19
+ "DATABASE_URL": "postgresql://user:password@localhost:5432/mydb"
20
+ },
21
+ "files": ["prisma/schema.prisma", "lib/db.ts"]
22
+ }
@@ -0,0 +1,13 @@
1
+ import { PrismaClient } from '@prisma/client';
2
+
3
+ const globalForPrisma = globalThis as unknown as {
4
+ prisma: PrismaClient | undefined;
5
+ };
6
+
7
+ export const prisma =
8
+ globalForPrisma.prisma ??
9
+ new PrismaClient({
10
+ log: process.env.NODE_ENV === 'development' ? ['query', 'error', 'warn'] : ['error'],
11
+ });
12
+
13
+ if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma = prisma;
@@ -0,0 +1,16 @@
1
+ generator client {
2
+ provider = "prisma-client-js"
3
+ }
4
+
5
+ datasource db {
6
+ provider = "postgresql"
7
+ url = env("DATABASE_URL")
8
+ }
9
+
10
+ model User {
11
+ id String @id @default(cuid())
12
+ email String @unique
13
+ name String?
14
+ createdAt DateTime @default(now())
15
+ updatedAt DateTime @updatedAt
16
+ }
package/src/index.ts DELETED
@@ -1,21 +0,0 @@
1
- #!/usr/bin/env node
2
- import execa from 'execa';
3
-
4
- /**
5
- * Thin wrapper that calls `stackkit init` with arguments
6
- * This allows users to run `npx create-stackkit@latest my-app`
7
- */
8
- async function main() {
9
- const args = process.argv.slice(2);
10
-
11
- try {
12
- // Call stackkit init with forwarded arguments
13
- await execa('npx', ['stackkit-cli@latest', 'init', ...args], {
14
- stdio: 'inherit',
15
- });
16
- } catch (error) {
17
- process.exit(1);
18
- }
19
- }
20
-
21
- main();
package/tsconfig.json DELETED
@@ -1,9 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "./dist",
5
- "rootDir": "./src"
6
- },
7
- "include": ["src/**/*"],
8
- "exclude": ["node_modules", "dist"]
9
- }