Open Mercato is a new‑era, AI‑supportive platform for shipping enterprise‑grade CRMs, ERPs, and commerce backends. It’s modular, extensible, and designed so teams can mix their own modules, entities, and workflows while keeping the guardrails of a production-ready stack.
- 💼 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.
- 🛒 Commerce – launch CPQ flows, B2B ordering portals, or full commerce backends with reusable modules.
- 🤝 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.
- 🛎️ Services – oversee bookings, team availability, and resource scheduling from a centralized workspace.
- 🧵 Production – coordinate production management with modular entities, automation hooks, and reporting.
- 🌐 Headless/API platform – expose rich, well-typed APIs for mobile and web apps using the same extensible data model.
- 🧩 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.
- 🧩 Modules: Each feature lives under
src/modules/<module>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
Follow these steps after the prerequisites are in place:
-
Clone the repository
git clone https://github.com/open-mercato/open-mercato.git cd open-mercato -
Install workspace dependencies
yarn install
-
Bootstrap everything with one command
yarn mercato init
This script prepares module registries, generates/applies migrations, seeds default roles, provisions an admin user, and loads sample CRM data (companies, people, deals, activities, todos) unless you pass
--no-examples. Add--stresstestto preload a high-volume dataset (6,000 contacts by default) complete with additional companies, pipeline deals, activities, and timeline notes — all with custom fields populated. Override the volume with-n <amount>or--count=<amount>, and append--liteto skip the heavier extras when you just need raw contacts. A progress bar keeps you updated while the stress-test data is generated. -
Launch the app
yarn dev
Navigate to
http://localhost:3000/backendand sign in with the credentials printed byyarn mercato init. If you plan to use the self-service onboarding flow or send transactional emails, opt-in by setting the following environment variables in your.envfile before starting the server (the onboarding toggle defaults tofalse):RESEND_API_KEY=your_resend_api_key APP_URL=http://localhost:3000 EMAIL_FROM=[email protected] SELF_SERVICE_ONBOARDING_ENABLED=true ADMIN_EMAIL=[email protected]
💡 Need a clean slate? Run yarn mercato init --reinstall. It wipes module migrations and drops the database, so only use it when you intentionally want to reset everything. Prefer yarn mercato init --no-examples if you simply want to skip demo CRM data while keeping core roles and users. Reach for yarn mercato init --stresstest (optionally with -n 12000) when you want to benchmark full CRM flows with thousands of contacts, companies, deals, activities, and notes — or yarn mercato init --stresstest --lite when you mainly need raw contact volume at high throughput.
Full installation guide (including prerequisites and cloud deployment): docs.openmercato.com/installation/setup
Browse the full documentation at docs.openmercato.com.
- Introduction
- Installation
- User Guide
- Tutorials
- Customization
- Architecture
- Framework
- API Reference
- CLI Reference
- Appendix
Connect with the team and other builders in our Discord community: https://discord.gg/f4qwPtJ3qA.
We welcome contributions of all sizes—from fixes and docs updates to new modules. Start by reading CONTRIBUTING.md for branching conventions (main, develop, feat/<feature>), release flow, and the full PR checklist. Then check the open issues or propose an idea in a discussion, and:
- Fork the repository and create a branch that reflects your change.
- Install dependencies with
yarn installand bootstrap viayarn mercato init(add--no-examplesto skip demo CRM content;--stresstestfor thousands of synthetic contacts, companies, deals, and timeline interactions; or--stresstest --litefor high-volume contacts without the heavier extras). - Develop and validate your changes (
yarn lint,yarn test, or the relevant module scripts). - Open a pull request referencing any related issues and outlining the testing you performed.
Refer to AGENTS.md for deeper guidance on architecture and conventions when extending modules.
Open Mercato is proudly supported by Catch The Tornado.
Open Mercato let the module developers to expose the custom CLI commands for variouse maintenance tasks. Read more on the CLI documentation
- MIT — see
LICENSEfor details.













