Repository navigation
EN Architecture
English · Türkçe · Languages / Diller
Scope: JSON API Forge 0.5.1 · Source review: 17 September 2026 · Language: English
Forge has two management levels. The application API handles end-user and service traffic; the Editor control plane manages source documents, team members and the workspace. They use separate credentials and network policies.
flowchart TD
A["Application client"] --> B["ASGI and protection"]
B --> C["Project selection and authorization"]
C --> D["CRUD, RPC or hook"]
D --> E["Project SQL, MongoDB and cache"]
F["Desktop Editor"] --> G["Management identity and scopes"]
G --> H["Document validation and atomic save"]
H --> I["JSON reload"]
I --> C
- Discover explicit project roots under
app/. - Merge the manifest and numbered JSON fragments; resolve
$env:references. - Run strict Pydantic and semantic validation. Unknown fields are errors.
- Expand enabled feature packs into ordinary resource definitions.
- Create each project's SQL, MongoDB, cache, rate-limit, event and media services through
ProjectRuntime. - Register the configured HTTP surfaces and generate OpenAPI.
- Manage connections and resources through lifespan startup/shutdown.
| Area | Main files | Responsibility |
|---|---|---|
| Models and loading |
framework/config.py, schema.py
|
Types, merge, environment resolution, discovery |
| Application |
factory.py, runtime.py, reload.py
|
ASGI, lifecycle and reload |
| Project API | routers/project.py |
CRUD/RPC/data/custom routes |
| Data |
db.py, crud.py, operations.py, mongo.py
|
Access and transaction rules |
| Identity |
security.py, protection.py
|
Principals, permissions and request protection |
| Management |
editor_api.py, editor_identity.py, editor_database.py
|
Team and document operations |
| CLI |
cli.py, doctor.py
|
Creation, inspection and migration |
Projects have separate slugs, API prefixes, roles and service configuration. They can still share a Python process, CPU/memory, global settings and the internal identity database. An invalid JSON update can be rejected without stopping unrelated applications, but this is not an operating-system sandbox. Untrusted hooks, native crashes and resource exhaustion require separate processes or containers.
framework.factory.create_app() creates a configuration snapshot. Normal development and source entry points use framework.reload:create_live_app to watch JSON changes. See hot reload.
Host/IP/HTTPS and size policies, pre-auth limits, authentication, permissions, tenant/ownership rules, input schemas, database work and response bounds work together. CORS, an obscure URL or a disabled Editor button does not provide authorization. Cached data must retain the server-established caller context.
This page describes the behavior at the pinned commits below. Recheck these contracts when upgrading.
main/framework/factory.pymain/framework/runtime.pymain/framework/reload.pymain/docs/01-Architecture.md