myths-and-legends-api
FastAPI service for mythological characters & folklore data — born from preserving El Salvador's oral tradition as queryable data.
- ▸Folklore as queryable data — La Siguanaba, El Cipitío, El Cadejo as REST entities
- ▸JWT auth with bcrypt, Alembic migrations, OpenAPI docs at /docs and /redoc
- ▸FastAPI 0.135 + Pydantic v2 + SQLAlchemy 2.x + PostgreSQL 15, fully Dockerized
- ▸Convenience CLI (`./myths up/shell`) + automated GitHub Actions release workflow
A REST API for mythological characters and folklore data
A FastAPI backend for managing mythological characters, countries of origin, and folklore data — JWT auth, image upload, full CRUD, OpenAPI docs, PostgreSQL with Alembic migrations. Born from the idea of preserving El Salvador's folklore as structured, queryable data.
Why I built it
Salvadoran folklore — La Siguanaba, El Cipitío, El Cadejo — lives in oral tradition and scattered Wikipedia stubs. Nobody has it as structured data you can query, link, and extend. I wanted to build the boring-but-necessary piece: a clean REST API that any frontend, mobile app, or AI agent can consume. Production-ready from day one — JWT, migrations, CI, Docker, the works.
What it does
- Characters CRUD — list, create, get, update, delete, search by name (paginated).
- Countries CRUD — link characters to their country of origin.
- JWT authentication with bcrypt-hashed passwords.
- File upload for character images with size and type validation.
- OpenAPI docs via Swagger UI (
/docs) and ReDoc (/redoc). - PostgreSQL + SQLAlchemy 2.x with Alembic migrations.
- Convenience CLI —
./myths up,./myths shell,./myths alembic ...,./myths test. - Docker Compose dev environment with hot reload.
- Automated releases via GitHub Actions — version extracted from
release/vX.Y.Zbranch, notes parsed fromCHANGELOG.md, prerelease auto-marked for0.x.y.
Stack
FastAPI 0.135, Python 3.10+, Pydantic 2.x, SQLAlchemy 2.x, PostgreSQL 15, Alembic, python-jose (JWT), bcrypt, Docker Compose.
Status
Active. MIT licensed.