๐Ÿงฉ Bookie Backend Overview

FastAPI โ€ข SQLAlchemy โ€ข JWT

๐Ÿง What This Backend Does

The Bookie Backend powers the entire BookieKids reading platform โ€” managing users, books, translations, tags, and authentication securely and efficiently. It provides a fast, database-agnostic API that serves both the public reading app and the internal administration interface.

โš™๏ธCore Responsibilities

Authentication & Authorization

Secure JWT-based authentication system with support for multiple user levels (admin, staff, customer). Admins can manage staff users; staff and customers access standard reading functionality.

Book & Story Management

Handles the creation, localization, and publication of stories across multiple languages. Supports book grouping by tags, reading levels, and publication state.

Tag System

Books are linked to tags via a normalized many-to-many relationship for fast filtering and homepage grouping. Admins and staff can manage tags and organize the catalog thematically.

Multilingual Support

Every book can have multiple BookLocalization entries โ€” one per language โ€” with titles, summaries, and links to illustrations and PDFs.

Role-Based Access Control (RBAC)

Database Agnostic

Uses SQLAlchemy Core and ORM with clean migrations via Alembic. The backend runs consistently across SQLite, PostgreSQL, MySQL, or any SQL-compliant engine.

๐ŸงฐTechnical Stack

๐ŸงชTesting Philosophy

Unit tests for every model, endpoint, and migration. Coverage for authentication, access control, and tag/book relationships. Integration tests ensure API consistency and database portability.

๐Ÿ›ก๏ธSecurity & Best Practices

๐Ÿ“šAPI Design Principles

๐Ÿš€Development Goals

Keep the backend lightweight and maintainable. Allow rapid addition of new features like story analytics, reading history, or parental dashboards. Ensure global scalability while maintaining a simple developer experience.

๐Ÿ’กIn Summary

The Bookie Backend is the backbone of the BookieKids reading experience โ€” a secure, extensible, and clean API layer built to make story creation, translation, and reading management effortless for the whole platform.