I have fully developed an initial functional version of the API.
You can access the documentation here.
Description
Veeerbs is an application designed for reviewing irregular verbs and, eventually, vocabulary. In its current state, the API allows for the storage of a series of “cards” using JSON; each card consists of multiple “card_parts,” and each “card_part” comprises several “synonyms,” with each object possessing its own metadata (such as type or language). This enables dynamic, lightweight, and optimized storage of diverse data—covering both irregular verbs and vocabulary words—where each item can have multiple translations.
The API also supports the creation of lists composed of multiple “queries” used to select the cards to be included.
Authenticated users can then add these lists to their accounts to begin learning.
Once cards are added to their accounts, users can start practicing using the /user/cards/next-due and /user/cards/review endpoints.
Technologies
- FSRS (Free Spaced Repetition System): a scientifically proven algorithm that enables extremely rapid learning by scheduling reviews just before the information is forgotten.
- Python with FastAPI for the application core, and SwaggerUI for documentation.
- Pydantic for data serialization (both input and output), along with the
pydantic-settingsextension to cleanly parse environment variables and/or local.envfiles. - SQLAlchemy as the ORM for interacting with the PostgreSQL database via
psycopg2. - Structlog for versatile, structured logging—optimized for local readability and automatic JSON parsing in production environments. - Python-jose for JWT generation—used for both authentication and the questions asked—to avoid the need to store the questions themselves and to easily prevent replay attacks.
- A centralized authentication system using Ory Kratos for the initial authentication layer.
- Alembic for clean database migration management.
- Builds produce Docker images that run on my Raspberry Pi Kubernetes infrastructure.
Notes
I took a long time to develop this API because I wanted to build it as cleanly as possible. Consequently, every object, request, response, and field is typed and documented. Logs are comprehensive and structured, and database migrations are handled correctly.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.