feat: scaffold root workspace files (Turborepo + pnpm)

This commit is contained in:
2026-04-06 14:04:41 +02:00
parent d0d335d829
commit 6cff55d6d3
6 changed files with 94 additions and 0 deletions

9
.env.example Normal file
View File

@@ -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

36
.gitignore vendored Normal file
View File

@@ -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/

2
.npmrc Normal file
View File

@@ -0,0 +1,2 @@
auto-install-peers=true
enable-pre-post-scripts=true

22
package.json Normal file
View File

@@ -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"
}
}

3
pnpm-workspace.yaml Normal file
View File

@@ -0,0 +1,3 @@
packages:
- "apps/*"
- "packages/*"

22
turbo.json Normal file
View File

@@ -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"]
}
}
}