From 70d2b1b52dafc688863b3fd801c20bff9bab5f84 Mon Sep 17 00:00:00 2001 From: achmad Date: Fri, 29 May 2026 16:30:26 +0700 Subject: [PATCH] feat: scaffold Next.js 14 project Co-Authored-By: Claude Opus 4.8 (1M context) --- backend/next.config.js | 5 +++++ backend/package.json | 26 ++++++++++++++++++++++++++ backend/postcss.config.js | 6 ++++++ backend/src/app/globals.css | 3 +++ backend/src/app/layout.tsx | 12 ++++++++++++ backend/src/app/page.tsx | 4 ++++ backend/tailwind.config.ts | 7 +++++++ backend/tsconfig.json | 21 +++++++++++++++++++++ 8 files changed, 84 insertions(+) create mode 100644 backend/next.config.js create mode 100644 backend/package.json create mode 100644 backend/postcss.config.js create mode 100644 backend/src/app/globals.css create mode 100644 backend/src/app/layout.tsx create mode 100644 backend/src/app/page.tsx create mode 100644 backend/tailwind.config.ts create mode 100644 backend/tsconfig.json diff --git a/backend/next.config.js b/backend/next.config.js new file mode 100644 index 0000000..be6b0ee --- /dev/null +++ b/backend/next.config.js @@ -0,0 +1,5 @@ +/** @type {import('next').NextConfig} */ +const nextConfig = { + output: 'standalone', +}; +module.exports = nextConfig; diff --git a/backend/package.json b/backend/package.json new file mode 100644 index 0000000..2c7fa24 --- /dev/null +++ b/backend/package.json @@ -0,0 +1,26 @@ +{ + "name": "zombie-invasion-backend", + "version": "1.0.0", + "private": true, + "scripts": { + "dev": "next dev -p 3000", + "build": "next build", + "start": "next start -p 3000" + }, + "dependencies": { + "next": "^14.2.0", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "better-sqlite3": "^12.0.0", + "typescript": "^5.4.0", + "@types/node": "^20.0.0", + "@types/react": "^18.2.0", + "@types/react-dom": "^18.2.0", + "@types/better-sqlite3": "^7.6.0" + }, + "devDependencies": { + "tailwindcss": "^3.4.0", + "postcss": "^8.4.0", + "autoprefixer": "^10.4.0" + } +} diff --git a/backend/postcss.config.js b/backend/postcss.config.js new file mode 100644 index 0000000..12a703d --- /dev/null +++ b/backend/postcss.config.js @@ -0,0 +1,6 @@ +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +}; diff --git a/backend/src/app/globals.css b/backend/src/app/globals.css new file mode 100644 index 0000000..b5c61c9 --- /dev/null +++ b/backend/src/app/globals.css @@ -0,0 +1,3 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; diff --git a/backend/src/app/layout.tsx b/backend/src/app/layout.tsx new file mode 100644 index 0000000..8dfd39c --- /dev/null +++ b/backend/src/app/layout.tsx @@ -0,0 +1,12 @@ +import type { Metadata } from 'next'; +import './globals.css'; +export const metadata: Metadata = { + title: 'Zombie Invasion Backend', +}; +export default function RootLayout({ children }: { children: React.ReactNode }) { + return ( + + {children} + + ); +} diff --git a/backend/src/app/page.tsx b/backend/src/app/page.tsx new file mode 100644 index 0000000..c98aabe --- /dev/null +++ b/backend/src/app/page.tsx @@ -0,0 +1,4 @@ +import { redirect } from 'next/navigation'; +export default function Home() { + redirect('/admin'); +} diff --git a/backend/tailwind.config.ts b/backend/tailwind.config.ts new file mode 100644 index 0000000..0d028e7 --- /dev/null +++ b/backend/tailwind.config.ts @@ -0,0 +1,7 @@ +import type { Config } from 'tailwindcss'; +const config: Config = { + content: ['./src/**/*.{ts,tsx}'], + theme: { extend: {} }, + plugins: [], +}; +export default config; diff --git a/backend/tsconfig.json b/backend/tsconfig.json new file mode 100644 index 0000000..fba2bf3 --- /dev/null +++ b/backend/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "target": "ES2017", + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "bundler", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "incremental": true, + "plugins": [{ "name": "next" }], + "paths": { "@/*": ["./src/*"] } + }, + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "exclude": ["node_modules"] +}