feat: turbostarter boilerplate
Production-ready Next.js boilerplate with: - Runtime env validation (fail-fast on missing vars) - Feature-gated config (S3, Stripe, email, OAuth) - Docker + Coolify deployment pipeline - PostgreSQL + pgvector, MinIO S3, Better Auth - TypeScript strict mode (no ignoreBuildErrors) - i18n (en/es), AI modules, billing, monitoring Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
47
.github/workflows/ai-review.yml
vendored
Normal file
47
.github/workflows/ai-review.yml
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
name: CI / AI Review
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, reopened, ready_for_review, synchronize]
|
||||
issue_comment:
|
||||
jobs:
|
||||
gpt-review:
|
||||
if: ${{ github.event.sender.type != 'Bot' }}
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
contents: write
|
||||
steps:
|
||||
- name: 🔍 Review
|
||||
id: ai-review
|
||||
uses: qodo-ai/pr-agent@main
|
||||
env:
|
||||
OPENAI_KEY: ${{ secrets.OPENAI_KEY }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
github_action_config.auto_describe: "false"
|
||||
|
||||
claude-review:
|
||||
if: ${{ github.event.sender.type != 'Bot' }}
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
issues: write
|
||||
id-token: write
|
||||
actions: read # Required for Claude to read CI results on PRs
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Run Claude Code
|
||||
id: claude
|
||||
uses: anthropics/claude-code-action@beta
|
||||
with:
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_KEY }}
|
||||
additional_permissions: |
|
||||
actions: read
|
||||
72
.github/workflows/cognitive-context.yaml
vendored
Normal file
72
.github/workflows/cognitive-context.yaml
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
name: Cognitive Context
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main, master]
|
||||
paths:
|
||||
- "packages/cognitive-context/**"
|
||||
- ".cognitive/**"
|
||||
- ".cursor/**"
|
||||
- "CLAUDE.md"
|
||||
pull_request:
|
||||
paths:
|
||||
- "packages/cognitive-context/**"
|
||||
- ".cognitive/**"
|
||||
- ".cursor/**"
|
||||
- "CLAUDE.md"
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
FORCE_COLOR: "1"
|
||||
NODE_VERSION: 22.x
|
||||
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
||||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
name: 🧠 Validate Context
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: ✅ Checkout code
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: 🔨 Setup
|
||||
uses: ./tooling/github/setup
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
|
||||
- name: 🏗️ Build cognitive-context
|
||||
run: pnpm --filter @repo/cognitive-context build
|
||||
|
||||
- name: 🔍 Validate cognitive context
|
||||
run: pnpm --filter @repo/cognitive-context exec cognitive validate
|
||||
continue-on-error: false
|
||||
|
||||
sync-check:
|
||||
name: 🔄 Sync Check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: ✅ Checkout code
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: 🔨 Setup
|
||||
uses: ./tooling/github/setup
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
|
||||
- name: 🏗️ Build cognitive-context
|
||||
run: pnpm --filter @repo/cognitive-context build
|
||||
|
||||
- name: 🔍 Check sync status (dry-run)
|
||||
run: |
|
||||
OUTPUT=$(pnpm --filter @repo/cognitive-context exec cognitive sync --dry-run 2>&1) || true
|
||||
echo "$OUTPUT"
|
||||
if echo "$OUTPUT" | grep -q "would be updated\|would be created\|out of sync"; then
|
||||
echo "::error::Cognitive context is out of sync. Run 'cognitive sync' locally and commit changes."
|
||||
exit 1
|
||||
fi
|
||||
echo "✅ All tool configurations are in sync"
|
||||
30
.github/workflows/publish-db.yml
vendored
Normal file
30
.github/workflows/publish-db.yml
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
name: CI / Publish db
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
NODE_VERSION: 22.x
|
||||
|
||||
jobs:
|
||||
db:
|
||||
name: 🚀 Publish database
|
||||
runs-on: ubuntu-latest
|
||||
environment: Production
|
||||
env:
|
||||
DATABASE_URL: ${{ secrets.DATABASE_URL }}
|
||||
|
||||
steps:
|
||||
- name: ✅ Checkout code
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: 🔨 Setup
|
||||
uses: ./tooling/github/setup
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
|
||||
- name: 🔍 Check database
|
||||
run: pnpm --filter @turbostarter/db db:check
|
||||
|
||||
- name: 💨 Migrate!
|
||||
run: pnpm --filter @turbostarter/db db:migrate
|
||||
36
.github/workflows/publish-mobile.yml
vendored
Normal file
36
.github/workflows/publish-mobile.yml
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
name: CI / Publish mobile
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
NODE_VERSION: 22.x
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
name: 🧪 Tests
|
||||
secrets: inherit
|
||||
uses: ./.github/workflows/tests.yml
|
||||
|
||||
publish:
|
||||
name: 🚀 Publish mobile
|
||||
runs-on: ubuntu-latest
|
||||
environment: Production
|
||||
needs: [tests]
|
||||
steps:
|
||||
- name: ✅ Checkout code
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: 🔨 Setup
|
||||
uses: ./tooling/github/setup
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
|
||||
- name: 🏗 Setup EAS
|
||||
uses: expo/expo-github-action@v8
|
||||
with:
|
||||
eas-version: latest
|
||||
token: ${{ secrets.EXPO_TOKEN }}
|
||||
|
||||
- name: 💨 Publish!
|
||||
run: cd apps/mobile && eas build --platform all --profile production --non-interactive --no-wait --auto-submit
|
||||
43
.github/workflows/publish-web.yml
vendored
Normal file
43
.github/workflows/publish-web.yml
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
name: CI / Publish web
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
NODE_VERSION: 22.x
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
name: 🧪 Tests
|
||||
secrets: inherit
|
||||
uses: ./.github/workflows/tests.yml
|
||||
|
||||
publish:
|
||||
name: 🚀 Publish web
|
||||
runs-on: ubuntu-latest
|
||||
environment: Production
|
||||
needs: [tests]
|
||||
env:
|
||||
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
|
||||
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
|
||||
|
||||
steps:
|
||||
- name: ✅ Checkout code
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: 🔨 Setup
|
||||
uses: ./tooling/github/setup
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
|
||||
- name: 🔼 Install Vercel CLI
|
||||
run: pnpm install --global vercel@latest
|
||||
|
||||
- name: 💪 Pull environment information
|
||||
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
|
||||
|
||||
- name: 📦 Build
|
||||
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
|
||||
|
||||
- name: 💨 Publish!
|
||||
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
|
||||
47
.github/workflows/tests.yml
vendored
Normal file
47
.github/workflows/tests.yml
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
name: CI / Tests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: ["*"]
|
||||
push:
|
||||
branches: ["main"]
|
||||
merge_group:
|
||||
workflow_dispatch:
|
||||
workflow_call:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
FORCE_COLOR: "1"
|
||||
NODE_VERSION: 22.x
|
||||
# You can leverage Remote Caching with Turbo to speed up your builds
|
||||
# @link https://turbo.build/repo/docs/guides/ci-vendors/github-actions
|
||||
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
||||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: 🧪 Test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: ✅ Checkout code
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: 🔨 Setup
|
||||
uses: ./tooling/github/setup
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
|
||||
- name: 🖌️ Format
|
||||
run: pnpm run format
|
||||
|
||||
- name: 🛻 Lint
|
||||
run: pnpm run lint && pnpm run lint:ws
|
||||
|
||||
- name: 📝 Typecheck
|
||||
run: pnpm run typecheck
|
||||
|
||||
- name: 🧪 Test
|
||||
run: pnpm run test
|
||||
Reference in New Issue
Block a user