Full-stack Rule Engine platform with workspace/repository management, Git-like VCS, and JDM (JSON Decision Model) editing. Built with TypeScript, Express, Postgres, Redis, and React.
- apps/api – Express backend (auth, workspaces, repos, VCS, MR, issues, wiki,
/executefor rule execution) - apps/web – React frontend (Vite)
- packages/jdm-editor – JDM editor (fork of maurya98/jdm-editor)
- packages/lezer-zen, packages/lezer-zen-template, packages/zen-engine-wasm – JDM editor dependencies
- Node 18+
- PostgreSQL
- Redis (optional; falls back to in-memory session store)
-
Install dependencies
npm install
-
Environment
- Create
apps/api/.env(optional) with:DATABASE_URL– Postgres connection string (default:postgresql://localhost:5432/engineone)REDIS_URL– Redis URL (default:redis://localhost:6379)SESSION_SECRET– session secret
- Create
-
Database
- Create a Postgres database named
engineone(or setDATABASE_URL). - On first run, the API runs migrations automatically.
- Create a Postgres database named
-
Run
- Backend:
npm run dev:api(orcd apps/api && npm run dev) – listens on port 4000. - Frontend:
npm run dev:web(orcd apps/web && npm run dev) – Vite dev server on port 3000 with proxy to API.
- Backend:
- Auth: Email register/login, session (Redis or memory), optional SAML (stub).
- Workspaces: Created by super-admin only; workspace admins manage repos.
- Repos: File tree and blobs; default branch
mainwith initial commit. - VCS: Branches, commits, tags, compare/diff, hard reset, protected branches.
- Merge requests: Create, merge (fast-forward), watchers.
- Issues: Branch-scoped; open/resolved/closed.
- Wiki: Repo-scoped pages (slug, title, body).
- Execute API:
POST /executewith{ repoId, context, branch? }andX-Api-Key(or bodyapiKey). Runs index.json in the given branch via zen-engine. API keys are stored inapi_keys(key_hash, repo_id or workspace_id).
Insert a row into api_keys with a hashed key and repo_id or workspace_id:
key_hash:SHA256(api_key)- Send the raw API key in the
X-Api-Keyheader or in the request body asapiKeywhen callingPOST /execute.
MIT (see respective packages for JDM editor and zen-engine licenses).