Skip to content

Instantly share code, notes, and snippets.

@flavioespinoza
Created November 26, 2025 05:39
Show Gist options
  • Select an option

  • Save flavioespinoza/48745ea94000255948bc6366c4ab0c40 to your computer and use it in GitHub Desktop.

Select an option

Save flavioespinoza/48745ea94000255948bc6366c4ab0c40 to your computer and use it in GitHub Desktop.

Next.js Project Template - Reference Configuration

Base Package.json Template

{
	"name": "PROJECT_NAME_PLACEHOLDER",
	"version": "0.1.0",
	"private": true,
	"scripts": {
		"dev": "next dev",
		"build": "next build",
		"start": "next start",
		"lint": "eslint",
		"clean": "prettier --write ."
	},
	"dependencies": {
		"@radix-ui/react-dialog": "^1.1.15",
		"clsx": "^2.1.1",
		"fluid-tailwind": "^1.0.4",
		"jotai": "^2.15.1",
		"lucide-react": "^0.552.0",
		"next": "16.0.1",
		"react": "19.2.0",
		"react-dom": "19.2.0",
		"tailwind-merge": "^3.3.1",
		"zod": "^4.1.12"
	},
	"devDependencies": {
		"@tailwindcss/postcss": "^4",
		"@trivago/prettier-plugin-sort-imports": "^6.0.0",
		"@types/node": "^20",
		"@types/react": "^19",
		"@types/react-dom": "^19",
		"eslint": "^9",
		"eslint-config-next": "16.0.1",
		"prettier": "^3.6.2",
		"prettier-plugin-tailwindcss": "^0.7.1",
		"tailwindcss": "^4",
		"typescript": "^5"
	}
}

Prettier Configuration (.prettierrc)

{
	"arrowParens": "always",
	"useTabs": true,
	"tabWidth": 2,
	"singleQuote": true,
	"trailingComma": "none",
	"semi": false,
	"printWidth": 100,
	"importOrderSeparation": false,
	"importOrderSortSpecifiers": true,
	"importOrderGroupNamespaceSpecifiers": true,
	"importOrderParserPlugins": ["typescript", "jsx", "decorators-legacy"],
	"importOrder": [
		"^react$",
		"^react-dom$",
		"^react",
		"^next",
		"<THIRD_PARTY_MODULES>",
		"^@/(.*)$",
		"^[./]"
	],
	"plugins": ["@trivago/prettier-plugin-sort-imports", "prettier-plugin-tailwindcss"]
}

Instructions for Claude

When user provides this gist URL + new project name:

  1. Read this gist
  2. Replace PROJECT_NAME_PLACEHOLDER with actual project name
  3. Output markdown with bash command blocks for:
    • Create Next.js project
    • Update package.json
    • Install dependencies
    • Add .prettierrc
    • Git init, add, commit
    • GitHub repo creation (gh CLI + manual methods)
    • Verify with npm run dev

IMPORTANT: Output markdown documentation ONLY. Do NOT create any files. User will copy/paste commands and run locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment