# GooseFactory — API Package

**Owner:** API Engineer Agent

REST + WebSocket API server for GooseFactory. Built with Node.js + Hono.

## Responsibilities
- All REST endpoints defined in `CONTRACTS.md` §1
- WebSocket event broadcasting
- JWT auth + RBAC
- Redis event bus consumer/producer
- PostgreSQL data access layer

## Key Files (to create)
```
src/
├── server.ts           # Hono app entry
├── routes/
│   ├── pipelines.ts
│   ├── tasks.ts
│   ├── approvals.ts
│   ├── agents.ts
│   ├── assets.ts
│   ├── notifications.ts
│   ├── audit.ts
│   └── webhooks.ts
├── services/           # Business logic
├── ws/                 # WebSocket server
├── middleware/          # Auth, validation, error handling
├── db/                 # Drizzle/Kysely queries
└── types/              # Shared TypeScript types (from CONTRACTS.md)
```

## Build to: `CONTRACTS.md` §1 (API Contract) and §7 (Cross-Cutting)
