- Build:
bun run scripts/generate- Generates api.json from TOML files - Validate:
bun run scripts/validate- Validates all TOML files against schemas - Deploy:
sst deploy- Deploy to Cloudflare Workers - Dev:
sst dev- Local development server
- Runtime: Bun with TypeScript ESM modules
- Imports: Use explicit imports, prefer named imports over default
- Types: Use Zod schemas for validation, infer types with
z.infer<> - Naming: camelCase for variables/functions, PascalCase for types/schemas
- Error Handling: Use try-catch blocks, throw Error objects with descriptive messages
- Formatting: 2-space indentation, semicolons, double quotes for strings
- Framework: Hono for HTTP handling, SST for infrastructure
- Data: TOML files in
providers/directory define models and providers - Validation: All TOML files must pass schema validation before deployment
- Output: Generated
dist/api.jsonserves as the API data source
app/schemas.ts- Zod schemas for validationapp/worker.tsx- Cloudflare Worker with JSX renderingproviders/*/- TOML files defining providers and modelsscripts/- Build and validation scripts