mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-05-04 10:44:52 +00:00
6835084939c9ddcb7c00141936f3cffd385a9baf
- overlay.fps: SDL software renderer → GPU texture quad, top-right corner, yellow EMA-smoothed FPS counter; LOADOP_LOAD preserves scene beneath it - debug.screenshot: one-shot step that writes status txt + BMP then pushes SDL_EVENT_QUIT for automated visual feedback loop - Adaptive vsync: graphics.gpu.init "auto" present_mode queries actual monitor refresh rate via SDL_GetCurrentDisplayMode; ≥120 Hz → VSYNC, <120 Hz → MAILBOX Fixes vsync cap on 165/170 Hz monitors reporting as 240 Hz in settings - Fixed present_mode wiring: q3_game.json gpu_init_viewport node now passes present_mode as a direct parameter (workflow variables are not seeded into context by the executor, so the variable section was dead data) - Stair climbing: probeReach 0.45→0.70 for earlier detection, jam detection nudges player up after 100 ms of horizontal blockage, step_height tuned to 0.6 - Physics dt: real wall-clock delta clamped to [1/600, 1/30] so 240 Hz displays don't run physics 4× faster than intended - GUI smart search paths: _candidate_build_dirs() scans all generator dirs × build types × flat and Conan-nested layouts, sorted by CMakeCache.txt mtime; _find_binary() picks freshest sdl3_app.exe; packages loaded relative to __file__ so gui works from any working directory Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
MetaBuilder
Philosophy: 95% JSON config, 5% TypeScript/C++ infrastructure Scale: 27,826+ files across 34 directories Status: Production-ready — Phase 2 complete
What's Running
Pastebin — Code Snippet Manager
Full-stack app: Next.js frontend + Flask auth backend + C++ DBAL API
http://localhost/pastebin # UI
http://localhost/pastebin-api # Flask auth (register, login, Python runner)
http://localhost:8080 # DBAL C++ REST API (entities)
Test accounts (seeded on first startup):
| User | Password | Namespaces | Snippets |
|---|---|---|---|
demo |
demo1234 |
Default, Python Recipes, SQL Patterns, Utilities | 11 |
alice |
alice1234 |
Default, React Components, CSS Tricks, JS Utilities | 9 |
bob |
bob12345 |
Default, Go Patterns, Bash Scripts, API Design | 8 |
Quick Start
# Deploy full stack
cd deployment
docker compose -f compose.yml up -d
# Build & deploy a specific app
python3 deployment.py build apps --force dbal pastebin
# Rebuild base images (rare)
python3 deployment.py build base
Architecture
Browser
└── Next.js (React + Redux + IndexedDB)
└── Flask (auth, Python runner, JWT)
└── DBAL C++ daemon (REST API, 14 DB backends)
└── PostgreSQL (prod) / SQLite (dev)
DBAL event flow (user registration → automatic seeding):
POST /User → pastebin.User.created → WfEngine (detached thread)
└── on_user_created.json workflow
├── dbal.uuid × 7
├── dbal.timestamp
├── dbal.entity.create → Namespace "Default"
├── dbal.entity.create → Namespace "Examples"
└── dbal.entity.create × 5 → seed snippets
Key Directories
metabuilder/
├── dbal/
│ ├── production/ # C++ daemon (Drogon HTTP, 14 DB backends, JWT auth)
│ │ ├── src/workflow/ # Event-driven workflow engine (7 step types)
│ │ ├── src/auth/ # JWT validation + JSON ACL config
│ │ └── build-config/ # Dockerfile, CMakeLists, conanfile
│ └── shared/
│ ├── api/schema/ # JSON entity schemas (source of truth)
│ │ ├── entities/ # 39 entity definitions
│ │ ├── events/ # event_config.json → workflow mappings
│ │ └── workflows/ # on_user_created.json etc.
│ └── seeds/database/ # Declarative JSON seed data
├── frontends/pastebin/
│ ├── src/ # Next.js app (React + Redux + FakeMUI)
│ └── backend/ # Flask auth + Python runner
├── workflow/ # DAG workflow engine (TS, Python, C++ plugins)
├── gameengine/ # SDL3/bgfx 2D/3D engine (27/27 tests)
├── fakemui/ # Material Design clone (167 components)
├── packages/ # 62 feature packages
├── deployment/ # Docker compose stack + build scripts
└── CLAUDE.md # AI assistant guide (read first)
DBAL Backends (14)
| Adapter | Backend |
|---|---|
memory |
In-process (testing) |
sqlite |
SQLite3 |
postgres |
PostgreSQL |
mysql / mariadb |
MySQL / MariaDB |
cockroachdb |
CockroachDB |
mongodb |
MongoDB |
redis |
Redis (cache layer) |
elasticsearch |
Elasticsearch (search layer) |
cassandra |
Cassandra |
surrealdb |
SurrealDB |
supabase |
Supabase REST |
prisma |
Prisma ORM bridge |
Switch adapter at runtime: DATABASE_URL=sqlite://:memory: DBAL_ADAPTER=sqlite
Development
# Frontend (pastebin)
cd frontends/pastebin && npm run dev
# DBAL logs
docker logs -f metabuilder-dbal
# Admin seed endpoint (force re-seed)
curl -X POST http://localhost:8080/admin/seed \
-H "Authorization: Bearer $DBAL_ADMIN_TOKEN" \
-d '{"force": true}'
# Search docs / reports
cd txt && python3 reports.py search "topic"
cd docs && python3 docs.py search "topic"
Schema-First Development
Entity schemas live in dbal/shared/api/schema/entities/ as JSON.
They are the single source of truth — consumed by:
- C++ DBAL daemon (table creation, CRUD validation)
gen_types.py(TypeScript + C++ type generation)- Seed loader (entity-aware bulk insert)
- Workflow engine (entity creation steps)
# Regenerate types after schema changes
python3 dbal/shared/tools/codegen/gen_types.py
Last Updated: 2026-03-04
Description
Languages
TypeScript
30.4%
JavaScript
19.2%
Jupyter Notebook
12.6%
C++
9.9%
SCSS
8.8%
Other
18.7%