Open-source commerce for B2B and B2C β quote requests and direct purchase on one codebase, customer organisations with roles and credit limits, a permissioned admin panel, a server-rendered storefront, and an API and webhook layer built for ERP, PIM and WMS integrations. A Fastify + MikroORM backend on PostgreSQL, a React admin, a Next.js storefront, and every business capability a module you install, switch off or replace.
Documentation Β· Discord Β· Contributing Β· Security Β· Code of Conduct Β· Licence: MIT
A free Endora Commerce runs a complete B2B storefront and its back office. It includes a catalogue with variants, custom fields and organisation pricing; customer organisations, roles, addresses and credit limits; carts, RFQs, quick order and shopping lists; orders, invoice records, returns, inventory, shipment tracking, and payment by bank transfer, on pickup or against a credit limit. It also includes the page and e-mail builders, search, promotions, SEO, product feeds, import/export, the mega-menu and PWA across multiple tenants, channels and currencies. A new instance installs all of it; anything you do not use can be switched off in the admin.
It ships no online payment gateway and no courier integration. Card, BLIK and wallet payments,
courier labels and parcel-locker selection, accounting and ERP synchronisation, PIM
synchronisation, and Polish KSeF submission are commercial modules. The free tier carries the
vendor-neutral payments, payment_methods, delivery_methods, shipments, credit_limits and
invoice_ledger abstractions, plus the free erp_connector and pim_connector layers, so third
parties can build their own adapters. Sell here and invoice where you already invoice; an operator
who wants Endora itself to issue Polish invoices needs the commercial KSeF module.
The dashboard's sidebar also lists commercial PIM integrations from the Overview list; those are not installed from npm.
You need Node.js β₯ 22.18 and Docker with Compose v2; pnpm is optional
(corepack enable provides it). Then two commands β without pnpm, run the second one the way the
first prints it (npx --yes pnpm@<version> run dev:all):
npx create-endora-commerce@latest my-shop
cd my-shop && pnpm run dev:allThe first asks a few questions before it writes anything: which parts to write, whether to start
the development services in Docker, whether to load demo data, and the e-mail, password and name
of your administrator. Enter accepts the recommendation where there is one β every part, services
started. Demo data has none, because a shop you are evaluating wants it and one you will sell from
does not. It then writes an instance into my-shop/, starts PostgreSQL, Redis, Meilisearch and
Mailpit, installs every module of the open-source set β each capability described above, switched
on; turn any of them off later under Modules in the admin, and switch it back without losing
its data β creates your administrator and prints what to run next. Each step prints the command it
runs, so a failure names the command to finish by hand. Leave out my-shop and it asks for the
directory too.
The storefront is written beside the instance, in my-shop-storefront/, unless you uncheck it: a
copy of the reference storefront in this repository that travels inside the installer, already made
standalone, and yours from then on.
The second is the one development command. It starts the three in one terminal with every line labelled by its layer; Ctrl-C stops them all. Each layer keeps its own command β the end of the first command prints them β and builds and deploys on its own.
| Address | |
|---|---|
| Storefront | http://localhost:3000 |
| API | http://localhost:3001 |
| Admin | http://localhost:3002 β sign in with the administrator's e-mail and the password you chose |
| Mailpit (caught e-mail) | http://localhost:8025 |
A machine that already runs something on one of those ports is the ordinary case. The installer
checks before it writes: a taken port β a development service's, the API's, the admin's or the
storefront's β is replaced by a free one, written into the .env that layer reads and printed, and
a second instance of the same directory name gets a Compose project name of its own rather than
the first one's containers and data.
The same command stands the API, the admin and the storefront up on machines of their own
(--only api, --only admin, --only storefront), under a name each or behind one host with
paths (--public-url https://example.com: the storefront at /, the admin under /admin, the
API under /api). Getting started has
the table and what the machines owe each other.
A later release is one command in the instance β pnpm run upgrade moves every package of the
release, in the instance and its storefront, to one version and runs the migrations.
Upgrading an instance says what it changes and what it
leaves alone.
With no terminal β in CI, or with --non-interactive β it asks nothing and every answer is a
flag. A missing one is a single refusal naming every flag still owed:
npx create-endora-commerce@latest my-shop --non-interactive --no-demo \
--admin-email [email protected] --admin-password "$ADMIN_PASSWORD" \
--admin-first-name Ada --admin-last-name Lovelacecreate-endora-commerce is only a front door: it passes its arguments unchanged to
endora install from @endora-commerce/cli, which you can also call directly
as npx @endora-commerce/cli install my-shop; --help lists every flag. Everything it writes is
an ordinary pnpm workspace you own β the API, the admin and the storefront build and deploy
independently.
The packages are published on the public npm registry, so the instance, the API and the admin need neither a registry setting nor a clone of this repository. To work on Endora Commerce itself, see Developing Endora Commerce below.
Everything past the first run is on the documentation site,
docs.commerce.endora.software β built from
docs/ and from each module package's own docs/ directory:
- Installing β every question and flag of the two commands above, and the components on machines of their own: getting started.
- Modules β what each one does, its settings, permissions and admin screens: module reference.
- Going to production β the first deployment checklist
and
deploy/(topology, secrets, TLS). - Extending it β create your first Module, a 20-minute tutorial in the instance you just installed; then the kernel, the customisation ladder and per-deployment overlay modules.
- The API β a running backend serves its OpenAPI document at
GET /api/v1/_openapi.jsonto administrators holdingplatform.api_description.readand to API keys with that scope; in the admin it is System β API description.
Endora Commerce is sized to run on a single VPS meeting the combined minimum requirements of the technologies it uses. These tables are the authoritative list: a change that adds a runtime dependency or alters baseline resource use updates them in the same pull request.
| Resource | Minimum | Recommended |
|---|---|---|
| CPU | 4 vCPU (x86_64 or ARM64) | 8 vCPU |
| RAM | 8 GB | 16 GB |
| Disk | 20 GB free (SSD strongly preferred) | 40 GB free (NVMe SSD) |
| OS | Linux (Ubuntu 22.04+ / Debian 12+ / Arch / Fedora), macOS 13+, Windows 11 + WSL2 | Linux |
| Docker | Docker Engine 24+ with Docker Compose v2 | β |
| Node.js | 22.x LTS (see .nvmrc) β minimum 22.18 (MikroORM 7 needs 22.17; unflagged type stripping needs 22.18) |
β |
| pnpm | 9.15.0, pinned by packageManager β any pnpm β₯ 9.7, or corepack enable, switches to it on its own |
β |
Approximate resident usage with everything running (pnpm run dev + Docker stack + Vitest in
watch mode): PostgreSQL 16 ~150 MB, Redis 7 ~50 MB, Meilisearch 1.11 ~300 MB (larger with the
catalogue), Mailpit ~20 MB, and ~500β800 MB for each of the three Node.js processes in watch mode.
Target workload: a single supplier with a catalogue of hundreds of thousands of products, and hundreds of quote requests and hundreds of orders per month.
| Resource | Minimum | Recommended | Large catalogue |
|---|---|---|---|
| Fits | up to tens of thousands of products | the target workload above | above 300k SKUs, or sustained traffic above one order per minute |
| CPU | 2 vCPU | 4 vCPU | 8 vCPU |
| RAM | 4 GB | 8 GB | 16 GB, or Meilisearch on its own node |
| Disk | 40 GB SSD | 100 GB NVMe SSD (with daily database backups) | 100 GB+ NVMe SSD (with daily database backups) |
| OS | Linux LTS (Ubuntu 22.04+ / Debian 12+) | β | β |
| Network | Static public IPv4, HTTPS terminator (nginx / Caddy / Cloudflare) | β | β |
| PostgreSQL | 16.x | β | β |
| Redis | 7.x | β | β |
| Meilisearch | 1.11.x | β | β |
| Node.js | 22.x LTS (minimum 22.18) | β | β |
The images are built in CI, so these figures cover the running stack only; building on the VPS
itself needs more memory. Measured on 2026-11-09 with the production backend build and all modules
installed on an empty catalogue: the backend settles at about 520 MB resident (about 600 MB at
start-up), PostgreSQL about 200 MB, Meilisearch about 140 MB and Redis under 20 MB. The backend
does not start with a V8 heap below about 384 MB (--max-old-space-size). Memory then grows with
the catalogue, mostly in Meilisearch and PostgreSQL rather than in the Node.js processes.
Container orchestration (Kubernetes, Docker Swarm, Nomad) is an operational choice, not a requirement; running each service directly on the VPS under systemd, with PostgreSQL, Redis and Meilisearch from distribution packages, is an equally valid target. Queues run on Redis (BullMQ).
This section is for working on Endora Commerce itself, in this repository. It is a pnpm monorepo:
| Path | What it is |
|---|---|
backend/ |
The API server's composition roots, the static-check estate and the backend test suites |
admin/ |
The React admin application (Vite) |
storefront/ |
The reference Next.js storefront, server-rendered |
packages/platform/ |
The kernel: HTTP layer, event bus, command bus, tenancy, module lifecycle |
packages/contracts/ |
Zod schemas β the source of truth for every API shape |
packages/modules/<id>/ |
One package per domain module: entities, services, routes, migrations, translations, admin screens, docs and tests |
packages/cli/ |
The endora command |
docs/ |
The Docusaurus documentation site |
You need Node.js β₯ 22.18 (nvm use reads .nvmrc), Docker with Compose v2, and pnpm. Which pnpm
you have installed matters little: the root package.json pins [email protected] in
packageManager, and pnpm 9.7 or later β or corepack enable β runs that version inside this
checkout by itself (pnpm -v there prints 9.15.0). Without pnpm at all,
npx --yes [email protected] <command> does the same.
git clone https://github.com/endora-commerce/endora-commerce.git
cd endora-commerce
pnpm install
cp backend/.env.example backend/.env
cp storefront/.env.example storefront/.env
cp admin/.env.example admin/.env
pnpm run dev:infra # PostgreSQL, Redis, Meilisearch and Mailpit in Docker
pnpm run setup # build the packages, recreate the development database, install every module
pnpm --filter backend run admin:create -- --email=β¦ --password=β¦ --first-name=β¦ --last-name=β¦pnpm run setup runs pnpm run build:packages first. That build is a precondition rather than
an optimisation β every package resolves through its built ./dist β so re-run
pnpm run build:packages after editing anything under packages/. pnpm run setup drops and
recreates the development database named in backend/.env: run it for a fresh start, not over
data you want to keep. It creates no administrator; admin:create does, and that account signs in
to the admin at http://localhost:3002.
pnpm install leaves git status clean. If it rewrites packageManager in package.json,
adds an allowBuilds: block to pnpm-workspace.yaml or regenerates pnpm-lock.yaml, a pnpm
other than the pinned one ran β almost always because pnpm self-update was run inside the
checkout, which rewrites the pinned version to the new one, or because
manage-package-manager-versions is turned off. Do not commit those changes; restore the three
files and install again, confirming when pnpm offers to recreate node_modules:
git checkout -- package.json pnpm-workspace.yaml pnpm-lock.yaml
pnpm install --frozen-lockfileRun pnpm self-update from outside the checkout.
Each application reads a .env in its own directory, and the .env.example beside it holds
safe defaults for the Docker stack. The variables you are most likely to set:
| Variable | Application | What it does |
|---|---|---|
DATABASE_URL, REDIS_URL, MEILISEARCH_URL, MEILISEARCH_API_KEY |
backend | The three services. |
SMTP_URL, MAIL_FROM |
backend | Outgoing e-mail (smtp://localhost:1025 is Mailpit). Unset in development, e-mail is written to the console. |
SETTINGS_SECRET_ENCRYPTION_KEY |
backend | Base64 32-byte key (openssl rand -base64 32) encrypting secret settings and stored credentials at rest. Writing a secret without it fails; rotating it invalidates stored secrets. |
ASSETS_LIBRARY_HMAC_KEY |
backend | Signs short-lived URLs for private assets on local storage (openssl rand -hex 32). |
DEFAULT_SALES_CHANNEL_CODE, SALES_CHANNEL_HOST_MAP |
backend | Which sales channel is the default, and which request host maps to which channel (shop-a.example=channel-a,β¦). |
PWA_VAPID_SUBJECT |
backend | The mailto: contact sent with Web Push messages. |
BACKEND_BASE_URL, NEXT_PUBLIC_API_BASE_URL |
storefront | Required. The storefront refuses to build or start without them rather than pointing every visitor at localhost. |
NEXT_PUBLIC_BUILD_ID / VITE_BUILD_ID |
storefront / admin | Set per deployment so the service-worker cache is invalidated on a new release. |
VITE_API_BASE_URL |
admin | Where the admin reaches the API. |
A module's own settings β payment and delivery methods, storage adapters, analytics, feeds β
live in the Settings module and are described on that module's documentation page, not in
.env. Production configuration is in the
first deployment checklist.
pnpm run dev # backend, storefront and admin, with hot reload
# backend β http://localhost:3001
# storefront β http://localhost:3000
# admin β http://localhost:3002
# mailpit β http://localhost:8025
pnpm --filter backend run dev # or one application at a time
pnpm --filter storefront run dev
pnpm --filter admin run dev
pnpm --filter docs run dev # the documentation site, http://localhost:3003Warden is an optional alternative to dev:infra that adds
*.endora.test HTTPS hosts; see docs/docs/operations/warden.md,
and do not run both at once.
Tests come first β a failing test before the implementation β and a module's tests sit beside
its code as *.test.ts.
pnpm --filter backend run test:unit:fast # no PostgreSQL, Redis or Meilisearch needed
pnpm --filter backend exec vitest run <path> # one file while you iterate
pnpm --filter backend run test # unit + contract + integration; needs dev:infra
pnpm --filter '!backend' run test # every other workspace member
pnpm -r run typecheck && pnpm -r run lintEach module owns its migrations under packages/modules/<id>/src/migrations/, named
<YYYYMMDDTHHmmss>_<module>_<slug>.ts; execution order comes from the timestamps and the module
dependency graph.
pnpm --filter backend run migration:up # apply every pending migration
pnpm --filter backend run migration:pending # list what is not applied yet
pnpm --filter backend run migration:new -- --module <id> --name <slug>
pnpm --filter backend run module:status # installed and enabled modulesmigration:new prints the two lines that register the new file; an unregistered migration does
not run. docs/docs/architecture/migrations.md has the
rules and the failure modes. Demo data is optional: pnpm --filter backend run cli demo seed
loads a synthetic shop and prints its credentials, and cli demo reset withdraws it β in one
transaction, together with what using the demo created. It refuses, changing nothing, when the
demo organisation holds financial records (paid or refunded payments, invoices and corrections,
accounting-system records, refunds β not orders that were placed and never paid);
cli demo reset --force-delete-financial-records deletes those with the rest.
CONTRIBUTING.md is the place to start: how a change is specified, tested,
checked and signed off, and how the project is governed. The binding principles every change is
reviewed against are in the constitution, and
AGENTS.md maps the repository and routes to the convention for whatever you are
about to do. Questions about a change before you open a pull request are welcome on
Discord.
Join the Endora Commerce Discord server to ask questions, get help with an installation, share what you are building and talk to the people working on the project. Bugs and feature requests belong in GitHub issues, where they can be tracked. Everyone taking part is expected to follow the Code of Conduct.
Report a suspected vulnerability privately, as SECURITY.md describes, and never in a public issue or on Discord.
Endora Commerce is released under the MIT licence. The project's names are covered by the trademark policy.





