diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..77e172c --- /dev/null +++ b/.env.example @@ -0,0 +1,9 @@ +# Database +DATABASE_URL=postgresql://postgres:postgres@localhost:5432/template + +# Payload CMS +PAYLOAD_SECRET=your-secret-here + +# App URLs +NEXT_PUBLIC_APP_URL=http://localhost:3000 +CMS_URL=http://localhost:3001 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5fa24cc --- /dev/null +++ b/.gitignore @@ -0,0 +1,36 @@ +# Dependencies +node_modules + +# Turbo +.turbo + +# Build outputs +dist +build +.next +out +storybook-static + +# Environment +.env +.env.local +.env.*.local + +# Testing +coverage + +# OS +.DS_Store +Thumbs.db + +# IDE +.vscode +.idea +*.swp + +# Debug +npm-debug.log* +pnpm-debug.log* + +# Superpowers brainstorm sessions +.superpowers/ diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..a47628c --- /dev/null +++ b/.npmrc @@ -0,0 +1,2 @@ +auto-install-peers=true +enable-pre-post-scripts=true diff --git a/package.json b/package.json new file mode 100644 index 0000000..e2272fa --- /dev/null +++ b/package.json @@ -0,0 +1,22 @@ +{ + "name": "template", + "private": true, + "packageManager": "pnpm@9.15.4", + "engines": { + "node": ">=20" + }, + "scripts": { + "build": "turbo run build", + "dev": "turbo run dev", + "lint": "turbo run lint", + "test": "turbo run test", + "typecheck": "turbo run typecheck", + "format": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"", + "format:check": "prettier --check \"**/*.{ts,tsx,js,jsx,json,md}\"" + }, + "devDependencies": { + "prettier": "^3.5.0", + "turbo": "^2.4.0", + "typescript": "^5.8.0" + } +} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml new file mode 100644 index 0000000..3ff5faa --- /dev/null +++ b/pnpm-workspace.yaml @@ -0,0 +1,3 @@ +packages: + - "apps/*" + - "packages/*" diff --git a/turbo.json b/turbo.json new file mode 100644 index 0000000..90826ca --- /dev/null +++ b/turbo.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://turborepo.dev/schema.json", + "tasks": { + "build": { + "dependsOn": ["^build"], + "outputs": ["dist/**", ".next/**", "!.next/cache/**"] + }, + "dev": { + "cache": false, + "persistent": true + }, + "lint": { + "dependsOn": ["^lint"] + }, + "test": { + "dependsOn": ["^build"] + }, + "typecheck": { + "dependsOn": ["^typecheck"] + } + } +}