D&D Character Sheet API

Most API work happens on the client side. You learn the contract, handle the responses, manage auth tokens, deal with failures gracefully, but the server is someone else's system, and the code that drives it stays invisible. This project exists because that asymmetry is hard to demonstrate publicly. Building the server from scratch, informed entirely by experience on the consuming end, is the most direct way to show that knowledge of the client side runs deeper than just knowing how to call an endpoint. The API generates complete, mechanically accurate D&D 5e character sheets on demand, derived from the Systems Reference Document. That choice of content is deliberate. Generating a valid character sheet is not a trivial data problem, spell slots scale by class and level on their own curves, class features unlock at specific thresholds, ability score modifiers propagate into derived stats. Which means the data flowing through the pipeline is structured and rule-compliant rather than arbitrary placeholder content. The character sheet generation logic is built into the API as its content layer, serving that role for this showcase before returning to its permanent home in a separate encounter balancing project.

Current Focus

The API is actively being built. The current workstream covers the core generation logic, request validation, and the auth layer that governs access to the endpoints.

Current State

Core architecture decisions are made and implementation is underway. A prototype client script is being used in parallel to validate the request and response contract before the full concurrent client is built against it.

What's Planned

The full implementation includes a token-based authentication layer with TTL management and no external paths for user provisioning, the only way into the system is through the API itself. Request validation returns meaningful errors wrapped in a JSend response envelope for consistent, predictable structure across success, failure, and error states. Character generation covers class features, spell slot progression, ability score modifiers, and level-based stat derivation across SRD-legal combinations. Deployment targets Gunicorn behind nginx on personal self-hosted infrastructure.

How It's Built

Python with Flask handling the API layer and Gunicorn as the production WSGI server, sitting behind nginx. Authentication is token-based with TTL enforcement. Responses follow the JSend specification. Character data is generated against SRD ruleset logic rather than pulled from a static dataset. This is the first of three related repositories. The concurrent client that hammers it and the downstream pipeline that ingests the results are separate projects, each with their own page.