New to this project? Start here:
Purpose: High-level architecture overview & quick answers
Read this first — 10 minutes
Purpose: Task breakdown & day-by-day progress tracking
Use this to track progress — 5 minutes to skim, refer back daily
Purpose: Complete implementation guide with code examples
Use this while coding — Reference as needed
See ../AGENTS.md for:
src/
├── lib/
│ ├── config/
│ │ └── loader.js ← Load config + fetch OAuth discovery
│ ├── auth/
│ │ └── middleware.js ← Token detection + validation
│ ├── bedrock/
│ │ ├── client.js ← AWS SDK wrapper
│ │ └── models.js ← Model registry + pricing
│ └── spending/
│ └── enforcer.js ← Cost estimation + atomic deduction
├── routes/
│ └── api/v1/
│ ├── chat/completions/
│ │ └── +server.js ← Main endpoint (POST)
│ └── models/
│ └── +server.js ← Model list (GET)
└── hooks.server.js ← Auth middleware integration
✅ Prerequisites:
bedrock:InvokeModel permissioncurl https://data.titleproject.space/.well-known/oauth-authorization-serverWhen complete, this should work:
curl -X POST http://localhost:3000/api/v1/chat/completions \
-H "Authorization: Bearer <JWT_or_Bearer_token>" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-3-haiku-20240307",
"messages": [{"role": "user", "content": "Hello"}]
}'
# Returns OpenAI-format response with usage tokens
All documentation files are in this directory (docs/). Files reference each other with relative links:
./bedrock-proxy-implementation-plan.md./implementation-checklist.md./QUICK-REFERENCE.mdLast Updated: June 27, 2026