GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - patchyevolve/forge-backend-ENVIORNMENT: A backend operating environment that orchestrates plugin processes, provides HTTP/gRPC gateway services, and handles infrastructure concerns such as auth, routing, rate limiting, lifecycle management, and observability.

BranchesTags
Open more actions menu

Latest commit

 

History

62 Commits
62 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
cli
cli
 
 
docs
docs
 
 
examples
examples
 
 
forge
forge
 
 
plugins-official
plugins-official
 
 
plugins/echo-rs
plugins/echo-rs
 
 
proto
proto
 
 
redirect
redirect
 
 
systemd
systemd
 
 
.gitignore
.gitignore
 
 
Cargo.lock
Cargo.lock
 
 
Cargo.toml
Cargo.toml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
forge.toml
forge.toml
 
 
forge_plugin_v1.proto
forge_plugin_v1.proto
 
 
install.sh
install.sh
 
 
release-targets.toml
release-targets.toml
 
 
test_committed_backend.sh
test_committed_backend.sh
 
 
test_committed_round_trip.sh
test_committed_round_trip.sh
 
 
test_example_backend.sh
test_example_backend.sh
 
 
test_gateway_features.sh
test_gateway_features.sh
 
 
test_kill_resilience.sh
test_kill_resilience.sh
 
 
test_offline_build.sh
test_offline_build.sh
 
 
test_round_trip.sh
test_round_trip.sh
 
 
test_scaffolding.sh
test_scaffolding.sh
 
 
test_tutorial.sh
test_tutorial.sh
 
 

Repository files navigation

Forge

A backend operating environment.

Forge is not a web framework, not a service mesh, and not an event bus. It is a single binary that orchestrates plugin processes, exposes an HTTP/gRPC gateway, and provides everything your backend needs except business logic.

Internet
   │
   ▼
Reverse Proxy (optional)
   │
   ▼
┌────────────────────────────────────────────┐
│                Forge                       │
│  ┌──────────┐  ┌──────────┐  ┌─────────┐ │
│  │  Gateway  │  │  Plugin  │  │ Service │ │
│  │  Routing  │  │  Manager │  │ Manager │ │
│  │  Auth     │  │  Health  │  │   (DB,  │ │
│  │  Rate Lim │  │  Restart │  │  Redis) │ │
│  │  TLS      │  │  Discvry │  │         │ │
│  │  Metrics  │  │  Draining│  │         │ │
│  └──────────┘  └──────────┘  └─────────┘ │
└────────────────────────────────────────────┘
   │           │            │
   ▼           ▼            ▼
 auth     inventory     PostgreSQL
plugin     plugin

Quick start

# Install forge (pre-built binary)
# curl -fsSL https://raw.githubusercontent.com/patchyevolve/forge-backend-framework/master/install.sh | sh

# Or build from source
git clone https://github.com/patchyevolve/forge-backend-framework
cd forge-core && cargo build --release
./target/release/forge --help

Bootstrap a new project:

forge init my-project
cd my-project
cargo build --release
forge run                   # make sure forge is on your PATH

Your backend is now live at http://localhost:9091. If you have a frontend in frontend/, it's served at http://localhost:9091/static/ (static_dir = "frontend" in forge.toml):

curl http://localhost:9091/healthz
# {"status":"ok"}

curl -X POST http://localhost:9091/login \
  -H "Content-Type: application/json" \
  -d '{"username":"admin","password":"password"}'
# {"payload":{"token":"forge-demo-token-admin","user":"admin"}}

curl http://localhost:9091/alerts \
  -H "Authorization: Bearer forge-demo-token-admin"
# {"payload":{"alerts":[...]}}

Project structure

my-project/
├── frontend/        # Your UI (React, Vue, Svelte, …)
├── forge/           # Backend runtime
│   ├── forge.toml   # Configuration
│   ├── plugins/     # Business logic plugins
│   │   ├── auth/    # Login + token verification
│   │   ├── health/  # Health + version info
│   │   └── example/ # Demo alerts + echo
│   ├── data/        # Persistent storage
│   └── config/      # Instance-specific config
├── Cargo.toml       # Workspace (Rust plugins)
├── docker-compose.yml
├── .gitignore
└── README.md

Adding a capability

Create a plugin, add a route, rebuild:

forge new plugin inventory

Then add to forge/forge.toml:

[[gateway.routes]]
method = "GET"
path = "/products"
capability = "[email protected]"

Rebuild and run:

cargo build --release
forge run

Plugin SDK

Language Package Status
Rust forge crate (forge::sdk module) Stable
Python Example (plugin.py) Reference

A plugin is a self-contained process that implements the Forge plugin protocol (gRPC). It registers capabilities at startup and invokes them on demand.

impl Plugin for MyPlugin {
    fn capabilities(&self) -> Vec<Capability> {
        vec![Capability::new("my.action", "1.0.0")]
    }

    async fn invoke(&self, ctx: InvokeContext) -> InvokeResult {
        // Business logic here
        Ok(b"hello".to_vec())
    }
}

Architecture

Forge provides:

  • HTTP/gRPC gateway — route requests to plugins
  • Declarative routing — configure routes in forge.toml
  • Auth hooks — call a plugin to verify every request
  • Rate limiting — per-IP throttling
  • TLS termination — HTTPS for both HTTP and gRPC
  • Plugin lifecycle — spawn, health-check, restart, drain
  • Crash recovery — auto-restart with exponential backoff
  • Managed subprocesses — forge spawns and supervises plugins
  • Round-robin dispatch — load-balance across plugin instances
  • Prometheus metrics — /metrics endpoint
  • CORS — configurable origins
  • File watching — hot-reload plugin manifests
  • CLI TLS support — forge status --tls and forge plugin restart --tls
  • Static file serving — serve a frontend directory at /static/
  • Redirect crates — forge-backend, forge-plugin-sdk-rust, forge-proto on crates.io

Deployment

# Docker
docker compose up --build

# systemd
sudo cp systemd/forge.service /etc/systemd/system/
sudo systemctl enable forge
sudo systemctl start forge

# Bare metal
forge run

Performance

Operation Latency (p50)
In-process dispatch 4.7 µs
gRPC dispatch 117 µs
Registry lookup 1.5 µs
Plugin startup 1 ms
Restart after crash 55 ms

Benchmarked on AMD Ryzen 7 7735HS, release mode.

Status

v1.0.5 — API stable.

Documentation

Guide File Description
Architecture docs/03-architecture-spec.md How Forge works internally — kernel modules, request lifecycle, state machine
Plugin Development docs/07-plugin-developers-guide.md Writing plugins with the Rust SDK — Plugin trait, capabilities, KernelClient
Usage Guide docs/10-USAGE-GUIDE.md CLI reference, forge.toml config, HTTP API, lifecycle, troubleshooting
Building a System docs/11-BUILDING-A-SYSTEM.md Full tutorial: build a multi-plugin system from scratch with auth and deployment

About

A backend operating environment that orchestrates plugin processes, provides HTTP/gRPC gateway services, and handles infrastructure concerns such as auth, routing, rate limiting, lifecycle management, and observability.

Topics

api-gatewayauthenticationbackend-infrastructurebackend-runtimecliforgegrpcobservabilityplugin-runtimeplugin-systemprocess-orchestrationrate-limitingrustservice-discoveryservice-orchestration

Resources

Readme
License
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.