create-stackkit-app 0.3.1 → 0.4.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 (96) hide show
  1. package/README.md +12 -94
  2. package/dist/index.d.ts +0 -1
  3. package/dist/index.js +0 -1
  4. package/dist/lib/create-project.d.ts +0 -1
  5. package/dist/lib/create-project.js +103 -66
  6. package/dist/lib/template-composer.d.ts +0 -1
  7. package/dist/lib/template-composer.js +0 -2
  8. package/{templates → modules}/auth/authjs-express/files/lib/auth.ts +0 -3
  9. package/{templates → modules}/auth/authjs-nextjs/files/lib/auth.ts +0 -2
  10. package/modules/auth/better-auth-express/files/lib/auth.ts +16 -0
  11. package/{templates/auth/authjs-express → modules/auth/better-auth-express/files}/routes/auth.ts +3 -3
  12. package/modules/auth/better-auth-express/module.json +38 -0
  13. package/{templates/auth/better-auth-nextjs/app → modules/auth/better-auth-nextjs/files}/api/auth/[...all]/route.ts +1 -0
  14. package/modules/auth/better-auth-nextjs/files/lib/auth.ts +26 -0
  15. package/modules/auth/better-auth-nextjs/module.json +41 -0
  16. package/modules/auth/clerk-express/files/lib/auth.ts +7 -0
  17. package/modules/auth/clerk-express/module.json +19 -0
  18. package/modules/auth/clerk-nextjs/files/lib/auth-provider.tsx +5 -0
  19. package/modules/auth/clerk-nextjs/files/middleware.ts +9 -0
  20. package/modules/auth/clerk-nextjs/module.json +27 -0
  21. package/modules/auth/clerk-react/files/lib/auth-provider.tsx +15 -0
  22. package/modules/auth/clerk-react/module.json +18 -0
  23. package/modules/auth/nextauth/files/app-router/api/auth/[...nextauth]/route.ts +6 -0
  24. package/modules/auth/nextauth/files/lib/auth.ts +82 -0
  25. package/modules/auth/nextauth/files/pages-router/api/auth/[...nextauth].ts +4 -0
  26. package/modules/auth/nextauth/module.json +50 -0
  27. package/modules/database/drizzle-postgresql/files/drizzle.config.ts +10 -0
  28. package/modules/database/drizzle-postgresql/files/lib/db.ts +7 -0
  29. package/modules/database/drizzle-postgresql/files/lib/schema.ts +8 -0
  30. package/modules/database/drizzle-postgresql/module.json +34 -0
  31. package/modules/database/mongoose-mongodb/files/lib/db.ts +40 -0
  32. package/modules/database/mongoose-mongodb/module.json +17 -0
  33. package/{templates/databases/prisma-postgresql → modules/database/prisma-mongodb/files}/lib/db.ts +2 -6
  34. package/{templates/databases/prisma-mongodb → modules/database/prisma-mongodb/files}/prisma/schema.prisma +1 -0
  35. package/modules/database/prisma-mongodb/module.json +36 -0
  36. package/{templates/databases/prisma-mongodb → modules/database/prisma-postgresql/files}/lib/db.ts +2 -6
  37. package/{templates/databases/prisma-postgresql → modules/database/prisma-postgresql/files}/prisma/schema.prisma +1 -0
  38. package/modules/database/prisma-postgresql/module.json +36 -0
  39. package/package.json +8 -6
  40. package/templates/bases/nextjs-base/README.md +36 -0
  41. package/templates/bases/nextjs-base/app/favicon.ico +0 -0
  42. package/templates/bases/nextjs-base/app/globals.css +26 -3
  43. package/templates/bases/nextjs-base/app/layout.tsx +21 -6
  44. package/templates/bases/nextjs-base/app/page.tsx +61 -4
  45. package/templates/bases/nextjs-base/eslint.config.mjs +18 -0
  46. package/templates/bases/nextjs-base/next.config.ts +4 -2
  47. package/templates/bases/nextjs-base/package-lock.json +6538 -0
  48. package/templates/bases/nextjs-base/package.json +12 -10
  49. package/templates/bases/nextjs-base/postcss.config.mjs +7 -0
  50. package/templates/bases/nextjs-base/public/file.svg +1 -0
  51. package/templates/bases/nextjs-base/public/globe.svg +1 -0
  52. package/templates/bases/nextjs-base/public/next.svg +1 -0
  53. package/templates/bases/nextjs-base/public/vercel.svg +1 -0
  54. package/templates/bases/nextjs-base/public/window.svg +1 -0
  55. package/templates/bases/nextjs-base/template.json +12 -1
  56. package/templates/bases/nextjs-base/tsconfig.json +9 -2
  57. package/templates/bases/react-vite-base/index.html +13 -0
  58. package/templates/bases/react-vite-base/package.json +27 -0
  59. package/templates/bases/react-vite-base/src/App.css +14 -0
  60. package/templates/bases/react-vite-base/src/App.tsx +23 -0
  61. package/templates/bases/react-vite-base/src/index.css +68 -0
  62. package/templates/bases/react-vite-base/src/main.tsx +10 -0
  63. package/templates/bases/react-vite-base/src/vite-env.d.ts +1 -0
  64. package/templates/bases/react-vite-base/template.json +5 -0
  65. package/templates/bases/react-vite-base/tsconfig.json +21 -0
  66. package/templates/bases/react-vite-base/vite.config.ts +7 -0
  67. package/dist/index.d.ts.map +0 -1
  68. package/dist/index.js.map +0 -1
  69. package/dist/lib/create-project.d.ts.map +0 -1
  70. package/dist/lib/create-project.js.map +0 -1
  71. package/dist/lib/template-composer.d.ts.map +0 -1
  72. package/dist/lib/template-composer.js.map +0 -1
  73. package/templates/auth/authjs-express/config.json +0 -20
  74. package/templates/auth/authjs-express/lib/auth.ts +0 -43
  75. package/templates/auth/authjs-nextjs/config.json +0 -19
  76. package/templates/auth/authjs-nextjs/files/api/auth/[...nextauth]/route.ts +0 -3
  77. package/templates/auth/authjs-nextjs/lib/auth.ts +0 -45
  78. package/templates/auth/better-auth-express/config.json +0 -18
  79. package/templates/auth/better-auth-express/src/lib/auth.ts +0 -12
  80. package/templates/auth/better-auth-express/src/routes/auth.ts +0 -10
  81. package/templates/auth/better-auth-nextjs/config.json +0 -18
  82. package/templates/auth/better-auth-nextjs/lib/auth.ts +0 -14
  83. package/templates/auth/better-auth-react/config.json +0 -15
  84. package/templates/auth/better-auth-react/lib/auth-client.ts +0 -9
  85. package/templates/auth/nextauth/app/api/auth/[...nextauth]/route.ts +0 -3
  86. package/templates/auth/nextauth/config.json +0 -18
  87. package/templates/auth/nextauth/lib/auth.ts +0 -31
  88. package/templates/bases/nextjs-base/.eslintrc.json +0 -3
  89. package/templates/databases/prisma-mongodb/config.json +0 -21
  90. package/templates/databases/prisma-postgresql/config.json +0 -22
  91. package/{templates → modules}/auth/authjs-express/files/routes/auth.ts +1 -1
  92. /package/{templates → modules}/auth/authjs-express/module.json +0 -0
  93. /package/{templates/auth/authjs-nextjs/app → modules/auth/authjs-nextjs/files}/api/auth/[...nextauth]/route.ts +0 -0
  94. /package/{templates → modules}/auth/authjs-nextjs/module.json +0 -0
  95. /package/{templates → modules}/auth/better-auth-react/files/lib/auth-client.ts +0 -0
  96. /package/{templates → modules}/auth/better-auth-react/module.json +0 -0
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "clerk-react",
3
+ "description": "Clerk Authentication for React",
4
+ "category": "auth",
5
+ "framework": "react-vite",
6
+ "dependencies": {
7
+ "@clerk/clerk-react": "^5.19.2"
8
+ },
9
+ "env": {
10
+ "VITE_CLERK_PUBLISHABLE_KEY": "pk_test_your_key_here"
11
+ },
12
+ "files": [
13
+ {
14
+ "source": "files/lib/auth-provider.tsx",
15
+ "destination": "lib/auth-provider.tsx"
16
+ }
17
+ ]
18
+ }
@@ -0,0 +1,6 @@
1
+ import { authOptions } from '@/lib/auth';
2
+ import NextAuth from 'next-auth';
3
+
4
+ const handler = NextAuth(authOptions);
5
+
6
+ export { handler as GET, handler as POST };
@@ -0,0 +1,82 @@
1
+ import { AuthOptions } from 'next-auth';
2
+ import CredentialsProvider from 'next-auth/providers/credentials';
3
+
4
+ /**
5
+ * NextAuth.js Configuration
6
+ *
7
+ * Configure authentication providers and options here.
8
+ * See: https://next-auth.js.org/configuration/options
9
+ */
10
+ export const authOptions: AuthOptions = {
11
+ providers: [
12
+ // GitHub OAuth Provider
13
+ // Uncomment and add GITHUB_ID and GITHUB_SECRET to .env
14
+ // GithubProvider({
15
+ // clientId: process.env.GITHUB_ID!,
16
+ // clientSecret: process.env.GITHUB_SECRET!,
17
+ // }),
18
+
19
+ // Google OAuth Provider
20
+ // Uncomment and add GOOGLE_ID and GOOGLE_SECRET to .env
21
+ // GoogleProvider({
22
+ // clientId: process.env.GOOGLE_ID!,
23
+ // clientSecret: process.env.GOOGLE_SECRET!,
24
+ // }),
25
+
26
+ // Credentials Provider (email/password)
27
+ // Replace with your own authentication logic
28
+ CredentialsProvider({
29
+ name: 'Credentials',
30
+ credentials: {
31
+ email: { label: 'Email', type: 'email', placeholder: 'user@example.com' },
32
+ password: { label: 'Password', type: 'password' },
33
+ },
34
+ async authorize(credentials) {
35
+ // Add your own authentication logic here
36
+ // This is just a demo - DO NOT use in production
37
+ if (credentials?.email === 'demo@example.com' && credentials?.password === 'demo') {
38
+ return {
39
+ id: '1',
40
+ name: 'Demo User',
41
+ email: 'demo@example.com',
42
+ };
43
+ }
44
+ return null;
45
+ },
46
+ }),
47
+ ],
48
+
49
+ // Database adapter (optional)
50
+ // Uncomment to persist sessions in database
51
+ // adapter: PrismaAdapter(prisma),
52
+
53
+ session: {
54
+ strategy: 'jwt',
55
+ },
56
+
57
+ pages: {
58
+ signIn: '/auth/signin',
59
+ // signOut: '/auth/signout',
60
+ // error: '/auth/error',
61
+ // verifyRequest: '/auth/verify-request',
62
+ // newUser: '/auth/new-user'
63
+ },
64
+
65
+ callbacks: {
66
+ async jwt({ token, user }) {
67
+ if (user) {
68
+ token.id = user.id;
69
+ }
70
+ return token;
71
+ },
72
+ async session({ session, token }) {
73
+ if (session.user) {
74
+ session.user.id = token.id as string;
75
+ }
76
+ return session;
77
+ },
78
+ },
79
+
80
+ // Enable debug messages in development
81
+ debug: process.env.NODE_ENV === 'development',
82
+ };
@@ -0,0 +1,4 @@
1
+ import { authOptions } from '@/lib/auth';
2
+ import NextAuth from 'next-auth';
3
+
4
+ export default NextAuth(authOptions);
@@ -0,0 +1,50 @@
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
+ }
@@ -0,0 +1,10 @@
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
+ });
@@ -0,0 +1,7 @@
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);
@@ -0,0 +1,8 @@
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
+ });
@@ -0,0 +1,34 @@
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
+ }
@@ -0,0 +1,40 @@
1
+ import mongoose from 'mongoose';
2
+
3
+ const MONGODB_URI = process.env.MONGODB_URI || 'mongodb://localhost:27017/myapp';
4
+
5
+ if (!MONGODB_URI) {
6
+ throw new Error('Please define the MONGODB_URI environment variable');
7
+ }
8
+
9
+ let cached = global.mongoose;
10
+
11
+ if (!cached) {
12
+ cached = global.mongoose = { conn: null, promise: null };
13
+ }
14
+
15
+ async function connectDB() {
16
+ if (cached.conn) {
17
+ return cached.conn;
18
+ }
19
+
20
+ if (!cached.promise) {
21
+ const opts = {
22
+ bufferCommands: false,
23
+ };
24
+
25
+ cached.promise = mongoose.connect(MONGODB_URI, opts).then((mongoose) => {
26
+ return mongoose;
27
+ });
28
+ }
29
+
30
+ try {
31
+ cached.conn = await cached.promise;
32
+ } catch (e) {
33
+ cached.promise = null;
34
+ throw e;
35
+ }
36
+
37
+ return cached.conn;
38
+ }
39
+
40
+ export default connectDB;
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "mongoose-mongodb",
3
+ "description": "Mongoose ODM for MongoDB",
4
+ "category": "database",
5
+ "dependencies": {
6
+ "mongoose": "^8.8.4"
7
+ },
8
+ "env": {
9
+ "MONGODB_URI": "mongodb://localhost:27017/myapp"
10
+ },
11
+ "files": [
12
+ {
13
+ "source": "files/lib/db.ts",
14
+ "destination": "lib/db.ts"
15
+ }
16
+ ]
17
+ }
@@ -4,10 +4,6 @@ const globalForPrisma = globalThis as unknown as {
4
4
  prisma: PrismaClient | undefined;
5
5
  };
6
6
 
7
- export const prisma =
8
- globalForPrisma.prisma ??
9
- new PrismaClient({
10
- log: process.env.NODE_ENV === 'development' ? ['query', 'error', 'warn'] : ['error'],
11
- });
7
+ export const db = globalForPrisma.prisma ?? new PrismaClient();
12
8
 
13
- if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma = prisma;
9
+ if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma = db;
@@ -7,6 +7,7 @@ datasource db {
7
7
  url = env("DATABASE_URL")
8
8
  }
9
9
 
10
+ // Example model - customize as needed
10
11
  model User {
11
12
  id String @id @default(auto()) @map("_id") @db.ObjectId
12
13
  email String @unique
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "database",
3
+ "displayName": "Prisma + MongoDB",
4
+ "description": "Add Prisma ORM with MongoDB database",
5
+ "category": "database",
6
+ "supportedFrameworks": ["nextjs", "express"],
7
+ "dependencies": {
8
+ "@prisma/client": "^6.1.0"
9
+ },
10
+ "devDependencies": {
11
+ "prisma": "^6.1.0"
12
+ },
13
+ "envVars": [
14
+ {
15
+ "key": "DATABASE_URL",
16
+ "value": "mongodb://localhost:27017/mydb",
17
+ "description": "MongoDB connection URL",
18
+ "required": true
19
+ }
20
+ ],
21
+ "patches": [
22
+ {
23
+ "type": "create-file",
24
+ "description": "Create Prisma schema for MongoDB",
25
+ "source": "prisma/schema.prisma",
26
+ "destination": "prisma/schema.prisma"
27
+ },
28
+ {
29
+ "type": "create-file",
30
+ "description": "Create Prisma client singleton",
31
+ "source": "lib/db.ts",
32
+ "destination": "{{lib}}/db.ts"
33
+ }
34
+ ],
35
+ "postInstall": ["npx prisma generate"]
36
+ }
@@ -4,10 +4,6 @@ const globalForPrisma = globalThis as unknown as {
4
4
  prisma: PrismaClient | undefined;
5
5
  };
6
6
 
7
- export const prisma =
8
- globalForPrisma.prisma ??
9
- new PrismaClient({
10
- log: process.env.NODE_ENV === 'development' ? ['query', 'error', 'warn'] : ['error'],
11
- });
7
+ export const db = globalForPrisma.prisma ?? new PrismaClient();
12
8
 
13
- if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma = prisma;
9
+ if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma = db;
@@ -7,6 +7,7 @@ datasource db {
7
7
  url = env("DATABASE_URL")
8
8
  }
9
9
 
10
+ // Example model - customize as needed
10
11
  model User {
11
12
  id String @id @default(cuid())
12
13
  email String @unique
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "database",
3
+ "displayName": "Prisma + PostgreSQL",
4
+ "description": "Add Prisma ORM with PostgreSQL database",
5
+ "category": "database",
6
+ "supportedFrameworks": ["nextjs", "express"],
7
+ "dependencies": {
8
+ "@prisma/client": "^6.1.0"
9
+ },
10
+ "devDependencies": {
11
+ "prisma": "^6.1.0"
12
+ },
13
+ "envVars": [
14
+ {
15
+ "key": "DATABASE_URL",
16
+ "value": "postgresql://user:password@localhost:5432/mydb?schema=public",
17
+ "description": "PostgreSQL database connection URL",
18
+ "required": true
19
+ }
20
+ ],
21
+ "patches": [
22
+ {
23
+ "type": "create-file",
24
+ "description": "Create Prisma schema",
25
+ "source": "prisma/schema.prisma",
26
+ "destination": "prisma/schema.prisma"
27
+ },
28
+ {
29
+ "type": "create-file",
30
+ "description": "Create Prisma client singleton",
31
+ "source": "lib/db.ts",
32
+ "destination": "{{lib}}/db.ts"
33
+ }
34
+ ],
35
+ "postInstall": ["npx prisma generate"]
36
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-stackkit-app",
3
- "version": "0.3.1",
3
+ "version": "0.4.0",
4
4
  "description": "Create a new StackKit project with modular composition",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -10,7 +10,8 @@
10
10
  "files": [
11
11
  "dist",
12
12
  "bin",
13
- "templates"
13
+ "templates",
14
+ "modules"
14
15
  ],
15
16
  "repository": {
16
17
  "type": "git",
@@ -23,10 +24,11 @@
23
24
  },
24
25
  "scripts": {
25
26
  "dev": "tsc --watch",
26
- "build": "tsc",
27
- "clean": "rm -rf dist",
27
+ "build": "npm run clean && tsc && npm run copy-assets",
28
+ "copy-assets": "cp -r ../../templates . && cp -r ../../modules .",
29
+ "clean": "rm -rf dist templates modules",
28
30
  "typecheck": "tsc --noEmit",
29
- "prepublishOnly": "npm run build && cp -r ../../templates ."
31
+ "prepublishOnly": "npm run build"
30
32
  },
31
33
  "keywords": [
32
34
  "create",
@@ -51,4 +53,4 @@
51
53
  "@types/validate-npm-package-name": "^4.0.2",
52
54
  "typescript": "^5.3.3"
53
55
  }
54
- }
56
+ }
@@ -0,0 +1,36 @@
1
+ This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
2
+
3
+ ## Getting Started
4
+
5
+ First, run the development server:
6
+
7
+ ```bash
8
+ npm run dev
9
+ # or
10
+ yarn dev
11
+ # or
12
+ pnpm dev
13
+ # or
14
+ bun dev
15
+ ```
16
+
17
+ Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
18
+
19
+ You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
20
+
21
+ This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
22
+
23
+ ## Learn More
24
+
25
+ To learn more about Next.js, take a look at the following resources:
26
+
27
+ - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28
+ - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
29
+
30
+ You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
31
+
32
+ ## Deploy on Vercel
33
+
34
+ The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
35
+
36
+ Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
@@ -1,3 +1,26 @@
1
- @tailwind base;
2
- @tailwind components;
3
- @tailwind utilities;
1
+ @import "tailwindcss";
2
+
3
+ :root {
4
+ --background: #ffffff;
5
+ --foreground: #171717;
6
+ }
7
+
8
+ @theme inline {
9
+ --color-background: var(--background);
10
+ --color-foreground: var(--foreground);
11
+ --font-sans: var(--font-geist-sans);
12
+ --font-mono: var(--font-geist-mono);
13
+ }
14
+
15
+ @media (prefers-color-scheme: dark) {
16
+ :root {
17
+ --background: #0a0a0a;
18
+ --foreground: #ededed;
19
+ }
20
+ }
21
+
22
+ body {
23
+ background: var(--background);
24
+ color: var(--foreground);
25
+ font-family: Arial, Helvetica, sans-serif;
26
+ }
@@ -1,19 +1,34 @@
1
- import type { Metadata } from 'next';
2
- import './globals.css';
1
+ import type { Metadata } from "next";
2
+ import { Geist, Geist_Mono } from "next/font/google";
3
+ import "./globals.css";
4
+
5
+ const geistSans = Geist({
6
+ variable: "--font-geist-sans",
7
+ subsets: ["latin"],
8
+ });
9
+
10
+ const geistMono = Geist_Mono({
11
+ variable: "--font-geist-mono",
12
+ subsets: ["latin"],
13
+ });
3
14
 
4
15
  export const metadata: Metadata = {
5
- title: 'StackKit App',
6
- description: 'Generated by create-stackkit-app',
16
+ title: "Create Next App",
17
+ description: "Generated by create next app",
7
18
  };
8
19
 
9
20
  export default function RootLayout({
10
21
  children,
11
22
  }: Readonly<{
12
- children: React.Node;
23
+ children: React.ReactNode;
13
24
  }>) {
14
25
  return (
15
26
  <html lang="en">
16
- <body>{children}</body>
27
+ <body
28
+ className={`${geistSans.variable} ${geistMono.variable} antialiased`}
29
+ >
30
+ {children}
31
+ </body>
17
32
  </html>
18
33
  );
19
34
  }
@@ -1,8 +1,65 @@
1
+ import Image from "next/image";
2
+
1
3
  export default function Home() {
2
4
  return (
3
- <main className="flex min-h-screen flex-col items-center justify-center p-24">
4
- <h1 className="text-4xl font-bold">Welcome to StackKit</h1>
5
- <p className="mt-4 text-xl">Your project is ready to go!</p>
6
- </main>
5
+ <div className="flex min-h-screen items-center justify-center bg-zinc-50 font-sans dark:bg-black">
6
+ <main className="flex min-h-screen w-full max-w-3xl flex-col items-center justify-between py-32 px-16 bg-white dark:bg-black sm:items-start">
7
+ <Image
8
+ className="dark:invert"
9
+ src="/next.svg"
10
+ alt="Next.js logo"
11
+ width={100}
12
+ height={20}
13
+ priority
14
+ />
15
+ <div className="flex flex-col items-center gap-6 text-center sm:items-start sm:text-left">
16
+ <h1 className="max-w-xs text-3xl font-semibold leading-10 tracking-tight text-black dark:text-zinc-50">
17
+ To get started, edit the page.tsx file.
18
+ </h1>
19
+ <p className="max-w-md text-lg leading-8 text-zinc-600 dark:text-zinc-400">
20
+ Looking for a starting point or more instructions? Head over to{" "}
21
+ <a
22
+ href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
23
+ className="font-medium text-zinc-950 dark:text-zinc-50"
24
+ >
25
+ Templates
26
+ </a>{" "}
27
+ or the{" "}
28
+ <a
29
+ href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
30
+ className="font-medium text-zinc-950 dark:text-zinc-50"
31
+ >
32
+ Learning
33
+ </a>{" "}
34
+ center.
35
+ </p>
36
+ </div>
37
+ <div className="flex flex-col gap-4 text-base font-medium sm:flex-row">
38
+ <a
39
+ className="flex h-12 w-full items-center justify-center gap-2 rounded-full bg-foreground px-5 text-background transition-colors hover:bg-[#383838] dark:hover:bg-[#ccc] md:w-[158px]"
40
+ href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
41
+ target="_blank"
42
+ rel="noopener noreferrer"
43
+ >
44
+ <Image
45
+ className="dark:invert"
46
+ src="/vercel.svg"
47
+ alt="Vercel logomark"
48
+ width={16}
49
+ height={16}
50
+ />
51
+ Deploy Now
52
+ </a>
53
+ <a
54
+ className="flex h-12 w-full items-center justify-center rounded-full border border-solid border-black/[.08] px-5 transition-colors hover:border-transparent hover:bg-black/[.04] dark:border-white/[.145] dark:hover:bg-[#1a1a1a] md:w-[158px]"
55
+ href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
56
+ target="_blank"
57
+ rel="noopener noreferrer"
58
+ >
59
+ Documentation
60
+ </a>
61
+ </div>
62
+ </main>
63
+ </div>
7
64
  );
8
65
  }
@@ -0,0 +1,18 @@
1
+ import { defineConfig, globalIgnores } from "eslint/config";
2
+ import nextVitals from "eslint-config-next/core-web-vitals";
3
+ import nextTs from "eslint-config-next/typescript";
4
+
5
+ const eslintConfig = defineConfig([
6
+ ...nextVitals,
7
+ ...nextTs,
8
+ // Override default ignores of eslint-config-next.
9
+ globalIgnores([
10
+ // Default ignores of eslint-config-next:
11
+ ".next/**",
12
+ "out/**",
13
+ "build/**",
14
+ "next-env.d.ts",
15
+ ]),
16
+ ]);
17
+
18
+ export default eslintConfig;
@@ -1,5 +1,7 @@
1
- import type { NextConfig } from 'next';
1
+ import type { NextConfig } from "next";
2
2
 
3
- const nextConfig: NextConfig = {};
3
+ const nextConfig: NextConfig = {
4
+ /* config options here */
5
+ };
4
6
 
5
7
  export default nextConfig;