create-stackkit-app 0.3.1 → 0.4.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.
Files changed (103) hide show
  1. package/README.md +10 -97
  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 -69
  6. package/dist/lib/template-composer.d.ts +0 -1
  7. package/dist/lib/template-composer.js +0 -2
  8. package/modules/auth/better-auth-express/files/lib/auth.ts +16 -0
  9. package/{templates/auth/authjs-express → modules/auth/better-auth-express}/files/routes/auth.ts +3 -3
  10. package/{templates/auth/authjs-express → modules/auth/better-auth-express}/module.json +9 -10
  11. package/{templates/auth/better-auth-nextjs/app → modules/auth/better-auth-nextjs/files}/api/auth/[...all]/route.ts +1 -0
  12. package/modules/auth/better-auth-nextjs/files/lib/auth.ts +26 -0
  13. package/modules/auth/better-auth-nextjs/module.json +41 -0
  14. package/modules/auth/clerk-express/files/lib/auth.ts +7 -0
  15. package/modules/auth/clerk-express/module.json +19 -0
  16. package/modules/auth/clerk-nextjs/files/lib/auth-provider.tsx +5 -0
  17. package/modules/auth/clerk-nextjs/files/middleware.ts +9 -0
  18. package/modules/auth/clerk-nextjs/module.json +27 -0
  19. package/modules/auth/clerk-react/files/lib/auth-provider.tsx +15 -0
  20. package/modules/auth/clerk-react/module.json +18 -0
  21. package/modules/database/drizzle-postgresql/files/drizzle.config.ts +10 -0
  22. package/modules/database/drizzle-postgresql/files/lib/db.ts +7 -0
  23. package/modules/database/drizzle-postgresql/files/lib/schema.ts +8 -0
  24. package/modules/database/drizzle-postgresql/module.json +34 -0
  25. package/modules/database/mongoose-mongodb/files/lib/db.ts +40 -0
  26. package/modules/database/mongoose-mongodb/module.json +17 -0
  27. package/{templates/databases/prisma-postgresql → modules/database/prisma-mongodb/files}/lib/db.ts +2 -6
  28. package/{templates/databases/prisma-mongodb → modules/database/prisma-mongodb/files}/prisma/schema.prisma +1 -0
  29. package/modules/database/prisma-mongodb/module.json +36 -0
  30. package/{templates/databases/prisma-mongodb → modules/database/prisma-postgresql/files}/lib/db.ts +2 -6
  31. package/{templates/databases/prisma-postgresql → modules/database/prisma-postgresql/files}/prisma/schema.prisma +1 -0
  32. package/modules/database/prisma-postgresql/module.json +36 -0
  33. package/package.json +8 -6
  34. package/templates/bases/express-base/package.json +3 -3
  35. package/templates/bases/express-base/src/app.ts +34 -0
  36. package/templates/bases/express-base/src/config/env.ts +14 -0
  37. package/templates/bases/express-base/src/middlewares/error.middleware.ts +12 -0
  38. package/templates/bases/express-base/src/server.ts +8 -0
  39. package/templates/bases/express-base/template.json +1 -1
  40. package/templates/bases/express-base/tsconfig.json +5 -8
  41. package/templates/bases/nextjs-base/README.md +36 -0
  42. package/templates/bases/nextjs-base/app/favicon.ico +0 -0
  43. package/templates/bases/nextjs-base/app/globals.css +26 -3
  44. package/templates/bases/nextjs-base/app/layout.tsx +21 -6
  45. package/templates/bases/nextjs-base/app/page.tsx +61 -4
  46. package/templates/bases/nextjs-base/eslint.config.mjs +18 -0
  47. package/templates/bases/nextjs-base/next.config.ts +4 -2
  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 +13 -2
  56. package/templates/bases/nextjs-base/tsconfig.json +9 -2
  57. package/templates/bases/react-vite-base/README.md +73 -0
  58. package/templates/bases/react-vite-base/eslint.config.js +23 -0
  59. package/templates/bases/react-vite-base/index.html +13 -0
  60. package/templates/bases/react-vite-base/package.json +30 -0
  61. package/templates/bases/react-vite-base/public/vite.svg +1 -0
  62. package/templates/bases/react-vite-base/src/App.css +42 -0
  63. package/templates/bases/react-vite-base/src/App.tsx +35 -0
  64. package/templates/bases/react-vite-base/src/assets/react.svg +1 -0
  65. package/templates/bases/react-vite-base/src/index.css +68 -0
  66. package/templates/bases/react-vite-base/src/main.tsx +10 -0
  67. package/templates/bases/react-vite-base/template.json +19 -0
  68. package/templates/bases/react-vite-base/tsconfig.app.json +28 -0
  69. package/templates/bases/react-vite-base/tsconfig.json +7 -0
  70. package/templates/bases/react-vite-base/tsconfig.node.json +26 -0
  71. package/templates/bases/react-vite-base/vite.config.ts +7 -0
  72. package/dist/index.d.ts.map +0 -1
  73. package/dist/index.js.map +0 -1
  74. package/dist/lib/create-project.d.ts.map +0 -1
  75. package/dist/lib/create-project.js.map +0 -1
  76. package/dist/lib/template-composer.d.ts.map +0 -1
  77. package/dist/lib/template-composer.js.map +0 -1
  78. package/templates/auth/authjs-express/config.json +0 -20
  79. package/templates/auth/authjs-express/files/lib/auth.ts +0 -43
  80. package/templates/auth/authjs-express/lib/auth.ts +0 -43
  81. package/templates/auth/authjs-express/routes/auth.ts +0 -12
  82. package/templates/auth/authjs-nextjs/app/api/auth/[...nextauth]/route.ts +0 -3
  83. package/templates/auth/authjs-nextjs/config.json +0 -19
  84. package/templates/auth/authjs-nextjs/files/api/auth/[...nextauth]/route.ts +0 -3
  85. package/templates/auth/authjs-nextjs/files/lib/auth.ts +0 -45
  86. package/templates/auth/authjs-nextjs/lib/auth.ts +0 -45
  87. package/templates/auth/authjs-nextjs/module.json +0 -38
  88. package/templates/auth/better-auth-express/config.json +0 -18
  89. package/templates/auth/better-auth-express/src/lib/auth.ts +0 -12
  90. package/templates/auth/better-auth-express/src/routes/auth.ts +0 -10
  91. package/templates/auth/better-auth-nextjs/config.json +0 -18
  92. package/templates/auth/better-auth-nextjs/lib/auth.ts +0 -14
  93. package/templates/auth/better-auth-react/config.json +0 -15
  94. package/templates/auth/better-auth-react/lib/auth-client.ts +0 -9
  95. package/templates/auth/nextauth/app/api/auth/[...nextauth]/route.ts +0 -3
  96. package/templates/auth/nextauth/config.json +0 -18
  97. package/templates/auth/nextauth/lib/auth.ts +0 -31
  98. package/templates/bases/express-base/src/index.ts +0 -27
  99. package/templates/bases/nextjs-base/.eslintrc.json +0 -3
  100. package/templates/databases/prisma-mongodb/config.json +0 -21
  101. package/templates/databases/prisma-postgresql/config.json +0 -22
  102. /package/{templates → modules}/auth/better-auth-react/files/lib/auth-client.ts +0 -0
  103. /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,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.1",
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",
@@ -35,7 +37,7 @@
35
37
  "nextjs",
36
38
  "template"
37
39
  ],
38
- "author": "Your Name",
40
+ "author": "Tariqul Islam",
39
41
  "license": "MIT",
40
42
  "dependencies": {
41
43
  "chalk": "^4.1.2",
@@ -3,9 +3,9 @@
3
3
  "version": "1.0.0",
4
4
  "private": true,
5
5
  "scripts": {
6
- "dev": "tsx watch src/index.ts",
6
+ "dev": "tsx watch src/server.ts",
7
7
  "build": "tsc",
8
- "start": "node dist/index.js",
8
+ "start": "node dist/server.js",
9
9
  "lint": "eslint src"
10
10
  },
11
11
  "dependencies": {
@@ -20,4 +20,4 @@
20
20
  "tsx": "^4.19.2",
21
21
  "typescript": "^5.7.2"
22
22
  }
23
- }
23
+ }
@@ -0,0 +1,34 @@
1
+ import cors from 'cors';
2
+ import express, { Application, NextFunction, Request, Response } from 'express';
3
+ import { env } from './config/env';
4
+ import { errorHandler } from './middlewares/error.middleware';
5
+
6
+ // app initialization
7
+ const app: Application = express();
8
+ app.use(express.json());
9
+
10
+ // cors configuration
11
+ app.use(
12
+ cors({
13
+ origin: [env.app.site_url],
14
+ credentials: true,
15
+ })
16
+ );
17
+
18
+ // Home page route
19
+ app.get('/', (req: Request, res: Response) => {
20
+ res.send('Hello World!');
21
+ });
22
+
23
+ // unhandled routes
24
+ app.use((req: Request, res: Response, next: NextFunction) => {
25
+ const error: any = new Error(`Can't find ${req.originalUrl} on this server!`);
26
+ error.status = 404;
27
+
28
+ next(error);
29
+ });
30
+
31
+ // Global error handler
32
+ app.use(errorHandler);
33
+
34
+ export default app;
@@ -0,0 +1,14 @@
1
+ import dotenv from 'dotenv';
2
+ import path from 'path';
3
+
4
+ dotenv.config({ path: path.join(process.cwd(), '.env') });
5
+
6
+ const env = {
7
+ app: {
8
+ port: Number(process.env.PORT) || 3000,
9
+ url: process.env.APP_URL || 'http://localhost:3000',
10
+ site_url: process.env.SITE_URL || 'http://localhost:5173',
11
+ },
12
+ };
13
+
14
+ export { env };
@@ -0,0 +1,12 @@
1
+ import { NextFunction, Request, Response } from 'express';
2
+
3
+ export const errorHandler = (err: any, req: Request, res: Response, next: NextFunction) => {
4
+ const statusCode = err.status || 500;
5
+ const errorMessage = err?.message || 'Internal server error!';
6
+
7
+ res.status(statusCode).json({
8
+ success: false,
9
+ message: errorMessage,
10
+ errors: errorMessage,
11
+ });
12
+ };
@@ -0,0 +1,8 @@
1
+ import app from './app';
2
+ import { env } from './config/env';
3
+
4
+ const port = env.app.port;
5
+
6
+ app.listen(port, () => {
7
+ console.log(`Server is running on http://localhost:${port}`);
8
+ });
@@ -3,5 +3,5 @@
3
3
  "displayName": "Express.js",
4
4
  "framework": "express",
5
5
  "description": "Express.js REST API with TypeScript",
6
- "files": ["src/", "tsconfig.json", "package.json"]
6
+ "files": ["src/", ".env.example", ".gitignore", "package.json", "tsconfig.json"]
7
7
  }
@@ -1,16 +1,13 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "target": "ES2020",
4
- "module": "commonjs",
5
- "lib": ["ES2020"],
6
- "outDir": "./dist",
7
3
  "rootDir": "./src",
4
+ "outDir": "./dist",
5
+ "module": "ESNext",
6
+ "moduleResolution": "node",
7
+ "target": "ES2023",
8
8
  "strict": true,
9
9
  "esModuleInterop": true,
10
- "skipLibCheck": true,
11
- "forceConsistentCasingInFileNames": true,
12
- "resolveJsonModule": true,
13
- "moduleResolution": "node"
10
+ "ignoreDeprecations": "5.0"
14
11
  },
15
12
  "include": ["src/**/*"],
16
13
  "exclude": ["node_modules", "dist"]
@@ -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;