feat: D&D SRD 5.2 API — FastAPI app with flat JSON caching

- Data fetched from Open5e API: 3,215 items (339 spells, 330 creatures,
  24 classes, 2,319 magic items, 203 equipment)
- FastAPI app with API key auth (X-API-Key header or ?api_key= param)
- Sliding window rate limiting (60 req/min, 10K req/day)
- Dice rolling endpoint (e.g., /api/dice/roll?spec=2d20+5)
- Full-text search across all resource types
- Pagination, filtering (name, level, school, class, etc.)
- Admin CLI for API key management
- nginx + systemd service ready for deployment
This commit is contained in:
Cupcake 2026-06-03 18:13:00 +00:00
parent f62803bc7e
commit ad52db8122
15 changed files with 58688 additions and 0 deletions

9
data/api_keys.json Normal file
View file

@ -0,0 +1,9 @@
{
"keys": {
"dnd_e5bd28c8dd29d1c87d0581527c773237": {
"name": "jez-personal",
"created": "2026-06-03T18:08:55+00:00",
"rate_limit": 60
}
}
}