Open Mercato
Open Mercato - the AI-Engineering Foundation Framework.
AI code assistants generate code. They don't decide where it goes, how it should be layered, or whether it stays consistent across 30 or 50 engineers in the team.
Open Mercato is the open-source foundation framework that solves it:
- Architecture-aware AI harness - agents know where in the project to place code, not just how to write it, they are provided with autonomous skills for everything from adding data table, Design-System coherent forms to implementing whole features with unit and integration tests,
- Spec-first development - specs ship with the repo, AI output becomes reproducible
- Including AI harness and skills for human cooperation - code review, ticketing flow and debugging
- Ready-made CRM/ERP domain modules - start at 80% done
- Open-source, no lock-in - full code ownership, no per-seat pricing trap
- Teachable - the whole team enters AI-assisted dev, not just 1–2 seniors
End with „almost ready apps”. Ship it pro, ship it fast. We’ve got you!
Built for CTOs who have already deployed Cursor/Copilot and noticed it isn't enough. Built for developers who want to build professional business apps and backends without constantly checking their back.
Start with 80% done.
Buy vs. build? Now, you can have best of both. Use Open Mercato enterprise-ready business features like CRM, Sales, OMS, Encryption, and build the remaining 20% that really makes the difference for your business.
Quick Links
⚡ Getting Started · 🎬 Building your First Open Mercato App · 📚 Documentation
Core Use Cases
- 🛒 Commerce – launch CPQ flows, B2B ordering portals, or full commerce backends with reusable modules.
- 🌐 Headless/API platform/Custom Backend – expose rich, well-typed APIs for mobile and web apps using the same extensible data model.
- 💼 CRM – model customers, opportunities, and bespoke workflows with infinitely flexible data definitions.
- 🏭 ERP – manage orders, production, and service delivery while tailoring modules to match your operational reality.
- 🤝 Self-service system – spin up customer or partner portals with configurable forms, guided flows, and granular permissions.
- 🔄 Workflows – orchestrate custom data lifecycles and document workflows per tenant or team.
- 🧵 Production – coordinate production management with modular entities, automation hooks, and reporting.
Highlights
- 🧩 Modular architecture – drop in your own modules, pages, APIs, and entities with auto-discovery and overlay overrides.
- 🧬 Custom entities & dynamic forms – declare fields, validators, and UI widgets per module and manage them live from the admin.
- 🏢 Multi-tenant by default – SaaS-ready tenancy with strict organization/tenant scoping for every entity and API.
- 🏛️ Multi-hierarchical organizations – built-in organization trees with role- and user-level visibility controls.
- 🛡️ Feature-based RBAC – combine per-role and per-user feature flags with organization scoping to gate any page or API.
- ⚡ Data indexing & caching – hybrid JSONB indexing and smart caching for blazing-fast queries across base and custom fields.
- 🔔 Event subscribers & workflows – publish domain events and process them via persistent subscribers (local or Redis).
- ✅ Growing test coverage – expanding unit and integration tests ensure modules stay reliable as you extend them.
- 🧠 AI-supportive foundation – structured for assistive workflows, automation, and conversational interfaces.
- ⚙️ Modern stack – Next.js App Router, TypeScript, zod, Awilix DI, MikroORM, and bcryptjs out of the box.
Live demo
Screenshots
Browse the full screenshot gallery.
Architecture Overview
- 🧩 Modules: Each feature lives under
src/modules/with auto‑discovered frontend/backend pages, APIs, CLI, i18n, and DB entities. - 🗃️ Database: MikroORM with per‑module entities and migrations; no global schema. Migrations are generated and applied per module.
- 🧰 Dependency Injection: Awilix container constructed per request. Modules can register and override services/components via
di.ts. - 🏢 Multi‑tenant: Core
directorymodule definestenantsandorganizations. Most entities carrytenant_id+organization_id. - 🔐 Security: RBAC roles, zod validation, bcryptjs hashing, JWT sessions, role‑based access in routes and APIs.
Read more on the Open Mercato Architecture
Getting Started
⚡ Quick start
You need: Node.js 24 · Git · PostgreSQL + Redis (easiest via Docker Desktop)
🔧 Monorepo — core development / full demo
# macOS / Linux
brew install node@24 # or: nvm install 24 && nvm use 24
corepack enable && corepack prepare [email protected] --activate
git clone https://github.com/open-mercato/open-mercato.git
cd open-mercato && git checkout develop
docker compose up -d # starts PostgreSQL, Redis, Meilisearch
cp apps/mercato/.env.example apps/mercato/.env
# set DATABASE_URL / JWT_SECRET / REDIS_URL in apps/mercato/.env
yarn dev:greenfield # installs, builds, seeds, starts the app
# Windows (PowerShell as Administrator — or use Git Bash / cmd)
# 1. Install Node.js 24 MSI from https://nodejs.org/en/download, then open a new terminal
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
corepack enable; corepack prepare [email protected] --activate
git clone https://github.com/open-mercato/open-mercato.git
cd open-mercato; git checkout develop
docker compose up -d # or use native PostgreSQL + pgAdmin: https://www.postgresql.org/download/windows/
Copy-Item apps\mercato\.env.example apps\mercato\.env
# set DATABASE_URL / JWT_SECRET / REDIS_URL in apps\mercato\.env
yarn dev:greenfield
Open http://localhost:3000/backend — credentials printed in the terminal.
📦 Standalone app — build on Open Mercato without touching the core
# macOS / Linux
brew install node@24 # or: nvm install 24 && nvm use 24
corepack enable && corepack prepare [email protected] --activate
npx create-mercato-app my-app
cd my-app
docker compose up -d # starts PostgreSQL, Redis, Meilisearch
# set DATABASE_URL / JWT_SECRET / REDIS_URL in .env
yarn setup # installs, seeds, starts the app
## Windows (PowerShell as Administrator — or use Git Bash / cmd)
## 1. Install Node.js 24 MSI from https://nodejs.org/en/download, then open a new terminal
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
corepack enable; corepack prepare [email protected] --activate
npx create-mercato-app my-app
cd my-app
docker compose up -d # or use native PostgreSQL + pgAdmin: https://www.postgre




