aio-bun-fullstack-setuplisted
Install: claude install-skill aiocean/claude-plugins
# Bun Fullstack Setup
## Environment
- bun: !`bun --version 2>/dev/null || echo "NOT INSTALLED"`
## Scaffold Mode (when setting up a new project)
Use this mode to bootstrap a Bun fullstack project, filling in only what is missing.
### Step 1: DETECT
Check what already exists in the project root:
```bash
ls -la package.json bun.lock* Dockerfile docker-compose.yml docker-entrypoint.sh ecosystem.config.cjs .env.example 2>/dev/null
ls -la pkgs/server/index.ts pkgs/server/config.ts pkgs/webapp/vite.config.ts pkgs/shared/ 2>/dev/null
```
### Step 2: PLAN
Compare against the full project structure and list what needs to be created:
| File | Purpose | Exists? |
|------|---------|---------|
| `pkgs/server/config.ts` | Env validation, fail-fast startup | ? |
| `pkgs/server/index.ts` | Bun server entry (API + static serving) | ? |
| `pkgs/webapp/vite.config.ts` | Vite config with API proxy | ? |
| `ecosystem.config.cjs` | PM2 dev runner (webapp + server) | ? |
| `Dockerfile` | Multi-stage production build | ? |
| `docker-entrypoint.sh` | Container entry script | ? |
| `docker-compose.yml` | Container orchestration | ? |
| `.env.example` | Environment variable documentation | ? |
Present the plan to the user before generating.
### Step 3: GENERATE
Create each missing file using the templates in the Reference section below. Adapt ports, paths, and env vars to match the user's project name and requirements.
### Step 4: VERIFY
Run a quick validation:
```bash
cd pkgs/server && bun r