
Build with FastAPI.
Add ZCore where it helps.
A pragmatically engineered architectural framework by Baseryn built on top of FastAPI. Absolute freedom. No rigid constraints. Use only what you need, and override everything else.
Context Shielding (Zchema)
Eliminate role-based duplicate schemas. Sensitive fields are pruned dynamically per-user in real-time.
Atomic Transactions
Group multiple operations into all-or-nothing transactions with deferred event dispatch.
Scoped DI
Singleton, transient, and request-scoped dependencies resolved automatically.
Modular Plugins
Organize domains into isolated plugins with topological startup ordering.
An Empty Repository. Complete CRUD.
No complex setup or rigid base-class nesting. Get production-ready database interactions in two steps.
Pick Only What You Need.
Modular components. Decoupled by design.
Adopt the architectural patterns that simplify your workload, and leave the rest to native FastAPI.
Type-safe constructor dependency injection mapped directly to FastAPI Depends.
Isolate background scopes, auto-inject IoC dependencies, and manage database sessions safely.
Safely group database writes. Buffers domain events to trigger only post-commit.
Loosely couple operations with highly concurrent async event publishing.
Secure file storage armed with Magic Byte checking and Directory Traversal blocking.
Async CRUD, soft-delete restoration (restore/restore_multi), forced deletes, and keyset pagination.
High-performance Cursor (Keyset) and Offset pagination with zero boilerplate.
Domain business logic layer equipped with highly overridable pre/post action hooks.
Dynamic queries with inverted operators (not_like, not_in), logical NOT groups, and field restrictions.
Dynamic field-level pruning. Interacts with raw FastAPI routers and standard schemas.
Generates 8 secure endpoints (including field-projected POST /lookup) with specificity sorting.
Organize domains into isolated plugins with topological startup/shutdown ordering.
BaseRepository.create behaves? Just override it. Need specialized data transformations inside a service? Override pre_create or post_create. You are never boxed into framework assumptions.Adopt Gradually. Scale Comfortably.
Start with plain FastAPI code. Introduce architectural helper layers one-by-one as your codebase expands. Each step is fully backward-compatible.
BaseRepository completely on its own forever. Or, opt to plug in Zchema for security constraints, UnitOfWork for database transactional safety, or BaseRouter to avoid endpoint boilerplates. No single step enforces the adoption of another.When do I need this?
A transparent comparison. If the native route satisfies your architectural requirements, bypass the ZCore component.
| When you want to... | Use this | Or write this natively |
|---|---|---|
| Avoid writing redundant CRUD queries for every model | BaseRepository | SQLAlchemy queries |
| Orchestrate domain logic hooks before/after DB writes | BaseService | Manual route logic |
| Prune schema attributes dynamically based on user roles | Zchema | Multiple Pydantic models |
| Ensure multiple writes succeed atomically or fail completely | UnitOfWork | session.commit() blocks |
| Scaffold all 8 CRUD & lookup endpoints without route boilerplate | BaseRouter | Individual route functions |
| Auto-wire repositories into services elegantly | Inject[T] | Depends() parameters |
| Execute background jobs with clean IoC & DB session isolation | background_task | Manual BackgroundTasks boilerplate |
| Dispatch events cleanly after a transaction commits | EventDispatcher | Manual listener triggers |
| Handle large datasets with high-performance cursor paging | Pagination | Manual offset/limit math |
| Structure domain modules with topological startup order | Plugin System | Spaghetti app.on_event |
Core Architecture Note: Every alternative in the right-hand column is completely valid, production-ready FastAPI code. ZCore simply streamlines the process, giving you the exact same outcomes with less code.
Interactive CLI.
Scaffold & Run in Seconds.
The built-in zc tool orchestrates your entire architecture — from interactive multi-database bootstrapping (SQLite, PostgreSQL, MySQL) with uv/pip virtualenvs, to granular 7-layer domain scaffolding, cryptographically secure secret generation, and cascading development servers with full Uvicorn option passthrough.
Real-Time UI Generation
with ?schema=true
Avoid hardcoding your frontend forms. When appending ?schema=true to any ZCore route, the framework intercepts the request, dynamically inspects the authenticated user's permissions, prunes forbidden attributes, and yields the secure, tailored JSON Schema representation in real-time.
The Projection-Driven Admin Panel
We are conceptualizing a highly modular, lightning-fast administrative dashboard for FastAPI, natively powered by ZCore's projection-driven schema engine and context-shielded contracts.
ZchemaSearchEngineBuilt to be Overridden.
Working defaults when you want speed.
Complete control when your business logic demands a customized path.
Your FastAPI codebase. ZCore where it helps.
Enjoy development freedom. Standardize structures, protect endpoints, and manage atomic transactions only where you want to.
Created by Baseryn.