From 9b793b9b93d6847adf7bb36fc9836422fe293abd Mon Sep 17 00:00:00 2001 From: tech Date: Wed, 4 Mar 2026 01:47:15 +0800 Subject: [PATCH] feat: initialize Next.js project with Tailwind CSS and SWR - Initialize Next.js 16.1.6 with TypeScript and App Router - Configure Tailwind CSS for styling - Install SWR for API state management - Set up environment variables for authentication and resource path - Update .gitignore to track .env.local Co-Authored-By: Claude Sonnet 4.5 --- .env.local | 3 +++ .gitignore | 3 ++- package-lock.json | 34 +++++++++++++++++++++++++++++++++- package.json | 3 ++- 4 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 .env.local diff --git a/.env.local b/.env.local new file mode 100644 index 0000000..941e699 --- /dev/null +++ b/.env.local @@ -0,0 +1,3 @@ +AUTH_USERNAME=admin +AUTH_PASSWORD=changeme +RESOURCE_PATH=/Users/tech/workspace/n3-world/handy-tools/ftdl diff --git a/.gitignore b/.gitignore index 5ef6a52..e7c1d2e 100644 --- a/.gitignore +++ b/.gitignore @@ -31,7 +31,8 @@ yarn-error.log* .pnpm-debug.log* # env files (can opt-in for committing if needed) -.env* +.env*.local +!.env.local # vercel .vercel diff --git a/package-lock.json b/package-lock.json index 5a387e4..e8f3c75 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,8 @@ "dependencies": { "next": "16.1.6", "react": "19.2.3", - "react-dom": "19.2.3" + "react-dom": "19.2.3", + "swr": "^2.4.1" }, "devDependencies": { "@tailwindcss/postcss": "^4", @@ -1050,6 +1051,15 @@ "dev": true, "license": "MIT" }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/detect-libc": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", @@ -1615,6 +1625,19 @@ } } }, + "node_modules/swr": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/swr/-/swr-2.4.1.tgz", + "integrity": "sha512-2CC6CiKQtEwaEeNiqWTAw9PGykW8SR5zZX8MZk6TeAvEAnVS7Visz8WzphqgtQ8v2xz/4Q5K+j+SeMaKXeeQIA==", + "license": "MIT", + "dependencies": { + "dequal": "^2.0.3", + "use-sync-external-store": "^1.6.0" + }, + "peerDependencies": { + "react": "^16.11.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, "node_modules/tailwindcss": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.2.1.tgz", @@ -1662,6 +1685,15 @@ "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", "dev": true, "license": "MIT" + }, + "node_modules/use-sync-external-store": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.6.0.tgz", + "integrity": "sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w==", + "license": "MIT", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } } } } diff --git a/package.json b/package.json index 442f513..42121da 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,8 @@ "dependencies": { "next": "16.1.6", "react": "19.2.3", - "react-dom": "19.2.3" + "react-dom": "19.2.3", + "swr": "^2.4.1" }, "devDependencies": { "@tailwindcss/postcss": "^4",