Installation
Check the tools for the setup path you chose. Running the app on your host requires a local Node.js toolchain, while an all-container setup needs Docker and Git.
Tip · Standalone app
If you want to build on Open Mercato without cloning the monorepo, use create-mercato-app to scaffold a standalone project. It has its own lighter prerequisites; see the standalone app guide for details.
Tip · Docker-only setup
If you plan to use the Docker development setup, you only need Docker Desktop and Git. Node.js, Yarn, and the other tools below are not required – everything runs inside containers. On Windows, treat this as an optional container-only workflow, not the default day-to-day monorepo path.
Tip · Windows native setup
For the recommended Windows monorepo workflow, run the Windows-native prerequisite commands manually in PowerShell from the repository root or another elevated terminal as needed.
nvm/fnm to switch versions if needed.corepack enable
corepack prepare yarn@stable --activate
.env.brew install graphicsmagick ghostscript popplersudo apt-get install graphicsmagick ghostscript poppler-utilsRecommended PowerShell commands on Windows:
corepack enable
corepack prepare yarn@stable --activate
winget install Microsoft.VisualStudio.2022.BuildTools
winget install Microsoft.VCRedist.2015+.x64
Optional but recommended for better performance on large repos:
Start-Process powershell -Verb RunAs -ArgumentList "-NoProfile -ExecutionPolicy Bypass -Command `"Add-MpPreference -ExclusionPath '$((Get-Location).Path)'`""
The Defender exclusion is optional, but without it local Windows development can be noticeably slower.
If you are using a standalone app, these tools are strongly recommended because the native yarn dev splash can detect and launch them directly once the app is ready.
gh) - required for the standalone splash Create new GitHub repository / Publish to GitHub flow. Install it from cli.github.com and authenticate once with gh auth login.Start coding with AI menu. Install guide: developers.openai.com/codex/cliCopy .env.example to .env and configure at least:
DATABASE_URL=postgres://postgres:<url-encoded-password>@localhost:5432/open-mercato
JWT_SECRET=$(openssl rand -hex 32)
REDIS_URL=redis://localhost:6379
The pgvector extension is automatically installed in all databases, enabling vector search features out of the box.
Migrations install unaccent and pg_trgm, which back accent-insensitive product search – searching hustawka finds huśtawka. The shipped Docker image and the usual managed offerings ship both, and yarn db:migrate enables them on first run.
Enabling an extension needs CREATE on the database, which the application role does not always hold – some managed providers also require the extension to be allowlisted first. If a migration stops with a message naming one of these extensions, connect once as a superuser and run:
CREATE EXTENSION IF NOT EXISTS "unaccent" SCHEMA public;
CREATE EXTENSION IF NOT EXISTS "pg_trgm" SCHEMA public;
then re-run yarn db:migrate. Migrations skip the create when an extension is already present, so no elevated privilege is needed afterwards.
Vector search requires at least one embedding provider. The shipped example env keeps vector auto-indexing off by default; enable it with OM_DISABLE_VECTOR_SEARCH_AUTOINDEXING=false after you choose a provider. Configure the API key(s) for your preferred provider(s):
# OpenAI (default provider)
OPENAI_API_KEY="<openai-api-key>"
# Or use alternative providers:
GOOGLE_GENERATIVE_AI_API_KEY="<google-generative-ai-api-key>" # Google Generative AI
MISTRAL_API_KEY=... # Mistral
COHERE_API_KEY=... # Cohere
AWS_ACCESS_KEY_ID="<aws-access-key-id>" # Amazon Bedrock (requires all three)
AWS_SECRET_ACCESS_KEY=...
AWS_REGION=us-east-1
# Ollama runs locally without API keys
OLLAMA_BASE_URL=http://localhost:11434 # Optional, defaults to localhost
You can configure multiple providers and switch between them in Backend -> Configuration -> Vector Search. After adding a provider key, enable automatic vector indexing with OM_DISABLE_VECTOR_SEARCH_AUTOINDEXING=false if you want real-time embeddings, or leave the default disable flag in place and run manual reindex jobs instead. See the Vector Search API reference for details.
Need a refresher on what each environment toggle controls? Review the System status variables directory for descriptions and defaults before you customize additional flags.
The docs site you are reading lives in apps/docs and has its own dependencies. From the monorepo root, run yarn docs:dev to start the documentation development server.
Previous: Monorepo — Core Development · Next: Deploy on Railway