How mehdidotesk73/forge-remaster-v260907 works
Forge provides an API for scaffolding, building, opening, and managing Git-backed Manifest repositories. Its main workflow starts with user-authored declarations, discovers objects and links, registers their schemas in PostgreSQL, and generates an importable SDK plus a JSON registry. Generated Manifest objects then expose field access, edits, deletion, and linked queries. The graph reflects sampled orchestration and documented build behavior; unsampled discovery, open, and environment helpers are shown only where their enclosing paths are supported, without guessed internal wiring.
Main entry points: manifest.py Manifest routes · builder.py Build orchestrator · codegen.py SDK and registry generation · git_adapter.py Git adapter
Components 22
API and orchestration
- Manifest routes
forge/api/routes/manifest.py - FastAPI app
forge/api/main.py - API launcher
forge/api/cli.py
Manifest build
- Repo scaffolding
forge/manifest/manifest_build/spinup.py - Declaration discovery
forge/manifest/manifest_build/discovery.py - Build orchestrator
forge/manifest/manifest_build/builder.py - SDK and registry generation
forge/manifest/manifest_build/codegen.py - Link resolution
forge/manifest/manifest_build/links.py - Repo opening
forge/manifest/manifest_build/open.py - Environment setup
forge/manifest/manifest_build/env_init.py
Manifest runtime
- Manifest definitions
forge/manifest/manifest_core/defs.py - Field types
forge/manifest/manifest_core/types.py - Objects and queries
forge/manifest/manifest_core/base.py - Schema registry
forge/manifest/manifest_core/registry.py
Persistence and Git
- Session adapter
forge/adapters/db_adapter.py - Git adapter
forge/adapters/git_adapter.py - PostgreSQL
- Git remote
Other components
- Developer
- Declaration files
- Generated SDK
- Generated registry JSON
Connections 29
- Developer → API launcher: starts API
- API launcher → FastAPI app: runs server
- FastAPI app → Manifest routes: mounts router
- Developer → Manifest routes: requests operations
- Manifest routes → Repo scaffolding: scaffolds repo
- Manifest routes → Build orchestrator: builds repo
- Manifest routes → Repo opening: opens repo
- Manifest routes → Git adapter: clones, commits, tags
- Manifest routes → PostgreSQL: opens build session
- Repo scaffolding → Git adapter: Git spinup
- Repo scaffolding → Git remote: clone and push
- Developer → Declaration files: writes declarations
- Declaration files → Declaration discovery: read declarations
- Build orchestrator → Declaration discovery: discovers definitions
- Build orchestrator → Schema registry: registers schemas
- Build orchestrator → SDK and registry generation: generates artifacts
- SDK and registry generation → Link resolution: resolves link kinds
- SDK and registry generation → Generated SDK: writes SDK source
- SDK and registry generation → Generated registry JSON: writes registry JSON
- Build orchestrator → PostgreSQL: registers object storage
- Manifest routes → Build orchestrator: Git build
- Build orchestrator → Git adapter: clone, commit, tag
- Git adapter → Git remote: Git operations
- Generated SDK → Objects and queries: exposes object API
- Objects and queries → Session adapter: requires session
- Objects and queries → PostgreSQL: reads and writes rows
- Schema registry → PostgreSQL: stores schemas and tables
- Session adapter → PostgreSQL: manages sessions
- Developer → Generated SDK: uses generated SDK