Files

79 lines
2.3 KiB
Cheetah

---
description: Bootstrap a repository with Vercel-linked resources by running preflight checks, provisioning integrations, verifying env keys, and then executing db/dev startup commands safely.
---
# Vercel Project Bootstrap
Run a deterministic bootstrap flow for new or partially configured repositories.
## Preflight
<!-- Sourced from bootstrap skill: Preflight -->
{{include:skill:bootstrap:Preflight}}
6. Detect package manager and available scripts (`db:push`, `db:seed`, `db:migrate`, `db:generate`, `dev`) from `package.json`.
7. Inspect auth/database signals (`prisma/schema.prisma`, `drizzle.config.*`, `auth.*`, `src/**/auth.*`) to scope bootstrap details.
Stop with clear guidance if CLI auth or linkage fails.
## Plan
Execute in this order:
1. Preflight validation and project linking.
2. Resource provisioning (prefer Vercel-managed Neon integration).
3. Secret/bootstrap env setup (`AUTH_SECRET`, env pull, key verification).
4. Application bootstrap (`db:*` then `dev`) only after env checks pass.
<!-- Sourced from bootstrap skill: Rules -->
{{include:skill:bootstrap:Rules}}
## Commands
### 1. Link + local env template
Copy the first matching template file only if `.env.local` does not exist:
```bash
cp .env.example .env.local
```
If `.env.example` is absent, use `.env.sample` or `.env.template`.
### 2. Provision Postgres
<!-- Sourced from bootstrap skill: Resource Setup: Postgres -->
{{include:skill:bootstrap:Resource Setup: Postgres}}
### 3. Generate and store `AUTH_SECRET`
<!-- Sourced from bootstrap skill: AUTH_SECRET Generation -->
{{include:skill:bootstrap:AUTH_SECRET Generation}}
### 4. Verify required env keys
<!-- Sourced from bootstrap skill: Env Verification -->
{{include:skill:bootstrap:Env Verification}}
Do not continue if any required keys are missing.
### 5. Run app bootstrap commands (after verification)
<!-- Sourced from bootstrap skill: App Setup -->
{{include:skill:bootstrap:App Setup}}
## Verification
<!-- Sourced from bootstrap skill: Bootstrap Verification -->
{{include:skill:bootstrap:Bootstrap Verification}}
## Summary
<!-- Sourced from bootstrap skill: Summary Format -->
{{include:skill:bootstrap:Summary Format}}
## Next Steps
<!-- Sourced from bootstrap skill: Bootstrap Next Steps -->
{{include:skill:bootstrap:Bootstrap Next Steps}}