Openmake LLM
MCP server: Openmake LLM
Installation
npx openmake-llmAsk AI about Openmake LLM
Powered by Claude ยท Grounded in docs
I know everything about Openmake LLM. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
OpenMake LLM
Self-hosted AI Assistant Platform with Multi-Model Orchestration
OpenMake LLM is a high-performance, self-hosted AI assistant platform designed for multi-model orchestration and advanced agentic workflows. It provides a lightweight, framework-free frontend paired with a robust TypeScript backend, supporting local and cloud LLM deployments with intelligent routing and semantic caching.
Key Features
- 7 Brand Model Profiles โ
Default,Pro,Fast,Think,Code,Vision,Auto, each mapped to different LLM engines via environment configuration - Intelligent Auto-Routing โ LLM classifier + 2-layer semantic cache for optimized query handling via
openmake_llm_auto - 100+ Specialized Agents โ 18 industry categories with keyword routing, topic analysis, discussion engine, and skill management
- Deep Research Engine โ Multi-step autonomous research with topic decomposition, web scraping, content synthesis, and report generation
- MCP (Model Context Protocol) โ 9 built-in tools (web search, scraping, vision, filesystem, deep research, sequential thinking, firecrawl, etc.) with tier-based access, user sandbox, and external MCP client support
- A2A (Agent-to-Agent) Multi-Model โ Parallel multi-model orchestration across different API keys and providers
- Real-time Streaming โ Low-latency WebSocket-based chat with streaming responses
- RAG (Retrieval-Augmented Generation) โ Upload your documents and get AI answers grounded in your own data
- OpenAI-Compatible API โ Drop-in replacement endpoint for OpenAI API consumers
- Ollama Cluster Management โ Multi-node cluster with load balancing and API key pool rotation (up to 5 keys)
- External LLM Providers (BYO Key, 9 providers) โ Each user can register their own API keys directly from the unified model selector in the chat input area (no separate page needed). Keys are AES-256-GCM encrypted at rest, billed to the user's own provider account, and managed via inline โฎ context menu (validate / usage / delete).
- Anthropic Claude (native SDK): Opus 4.5 / Sonnet 4.6 / Haiku 4.5
- OpenAI-compatible (8 providers): OpenRouter (300+ routed models), Google Gemini, Groq (LPU), Together AI, Mistral La Plateforme, Cohere, remote Ollama, custom endpoints
- 34 models with detailed pricing (USD micros) + capability inference (vision/thinking/tool calling/embedding) auto-detected per model ID
- 90-day usage retention with per-call cost tracking
View All 18 Agent Categories (100+ Agents)
| Category | Agents |
|---|---|
| ๐ฅ๏ธ Technology | Software Engineer, Data Scientist, Cybersecurity Expert, Cloud Architect, DevOps, AI/ML, Blockchain, Mobile, Frontend, Backend, QA |
| ๐ฐ Finance | Financial Analyst, Investment Banker, Risk Manager, Accountant, Tax Advisor, Actuary, Quant, Crypto Analyst, Portfolio Manager |
| ๐ฅ Healthcare | Physician, Pharmacist, Nurse, Medical Researcher, Psychologist, Nutritionist, Biomedical Engineer |
| โ๏ธ Legal | Corporate Lawyer, Criminal Lawyer, Patent Attorney, Labor Lawyer, Compliance Officer |
| ๐ข Business | Strategist, Marketing, Product, Project, HR, Operations, Supply Chain, Brand, Startup Advisor |
| ๐จ Creative | UI/UX Designer, Graphic Designer, Content Writer, Video Producer, Game Designer, Copywriter, Creative Director |
| โ๏ธ Engineering | Mechanical, Electrical, Civil, Chemical, Industrial, Robotics, Automotive |
| ๐ฌ Science | Research Scientist, Physicist, Chemist, Biologist, Environmental, Materials, Data Analyst |
| ๐ Education | Educator, Curriculum Designer, EdTech Specialist, Academic Advisor |
| ๐บ Media | Journalist, PR Specialist, Social Media Manager, Communications Strategist |
| ๐ค Social Welfare | Sociologist, Social Policy Researcher, Demographer, Labor Economist |
| ๐๏ธ Government | Policy Analyst, Urban Planner, Public Administrator, Diplomat |
| ๐ Real Estate | Real Estate Analyst, Property Manager, Architecture Consultant |
| โก Energy | Energy Analyst, Sustainability Consultant, Renewable Energy Engineer |
| ๐ Logistics | Logistics Manager, Transportation Analyst, Warehouse Manager |
| ๐จ Hospitality | Hospitality Manager, Event Planner, Tourism Consultant |
| ๐พ Agriculture | Agricultural Scientist, Food Scientist, Agribusiness Consultant |
| ๐ Special | Ethicist, Futurist, Systems Thinker, Behavioral Economist, Crisis Manager, Negotiation Expert, Fact Checker |
Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Frontend (Vanilla JS SPA) โ
โ ES Modules ยท No Framework ยท Vite Dev โ
โโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ REST + WebSocket
โโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Backend (Express 5 + TypeScript) โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โ
โ โ Routes โ โ Auth โ โ MCP โ โ WebSocket โ โ
โ โ (25+) โ โ JWT/ โ โ Tools โ โ Streaming โ โ
โ โ โ โ OAuth โ โ Router โ โ โ โ
โ โโโโโโฌโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Chat Pipeline โ โ
โ โ Query โ Classifier โ Semantic Cache โ Model Selector โ โ
โ โ โ Domain Router โ Context Engineering โ Stream โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โ
โ โ 100+ โ โ Deep โ โ RAG & โ โ Monitoring โ โ
โ โ Agents โ โ Research โ โ Memory โ โ & Analytics โ โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโ
โผ โผ โผ
โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ
โPostgreSQLโ โ Ollama โ โ Ollama โ
โ โ โ (Local) โ โ (Cloud) โ
โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ
Tech Stack:
- Backend: Express 5, TypeScript (strict mode), CommonJS output, ES2022
- Frontend: Vanilla JS SPA with ES Modules โ no framework, no JS build step
- Database: PostgreSQL via
pgโ raw parameterized SQL, auto-schema on launch, no ORM - Process Manager: PM2
- CI/CD: GitHub Actions โ 4 gates (Bun Test โ TS Build โ File Size Guard โ ESLint)
- Observability: OpenTelemetry
Quick Start
Overview โ Clone to first chat in 6 steps:
- Install prerequisites (Node.js, PostgreSQL, Ollama)
- Clone the repository and run
npm install- Copy
.env.exampleto.envand set 5 required variables- Pull the local embedding model (
ollama pull nomic-embed-text)- Start the server (
npm run dev)- Open
http://localhost:52416and log in
Prerequisites
Required
| Dependency | Minimum | Tested With | Notes |
|---|---|---|---|
| Git | v2.0+ | โ | Required for cloning the repository |
| Node.js | v20.0+ | v25.8.0 | Runtime |
| npm | v10.0+ | v11.11.0 | Required for npm workspaces |
| PostgreSQL | v14.0+ | v16.13 | Must be running with a configured DATABASE_URL |
| Ollama | v0.1.30+ | v0.18.3 | Orchestrates local embeddings and cloud LLM engines |
Optional
- PM2 โ Production process manager
npm install -g pm2 - Playwright โ Required only for E2E tests
npx playwright install
Setup Guides
1. Install Node.js (v20+) โ macOS
Option A โ Homebrew:
brew install node
node -v # Verify v20.0+
npm -v # Verify v10.0+
Option B โ nvm (recommended for managing multiple versions):
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
source ~/.zshrc
nvm install 20
node -v
2. Install & Configure PostgreSQL โ macOS
# Install
brew install postgresql@16
# Start service (auto-start on boot)
brew services start postgresql@16
# Verify status
brew services list
Create database and user:
# Connect to PostgreSQL
psql postgres
# Run the following SQL (change the password to your own)
CREATE USER openmake WITH PASSWORD 'your_password';
CREATE DATABASE openmake_llm OWNER openmake;
GRANT ALL PRIVILEGES ON DATABASE openmake_llm TO openmake;
\q
Troubleshooting: If you get
role "yourname" does not exist, try connecting withpsql -U postgres postgresinstead.
Note: The username, password, and database name above must match the
DATABASE_URLin your.envfile.DATABASE_URL=postgresql://openmake:your_password@localhost:5432/openmake_llm
3. Install & Start Ollama โ macOS
Download and install from the Ollama official website.
# Verify installation
ollama --version
# Start Ollama service (or just launch the Ollama app)
ollama serve
Note: Launching the Ollama app automatically starts the service in the background. Default port is
11434, accessible athttp://localhost:11434.
4. Install on Linux (Ubuntu/Debian)
# Node.js (NodeSource)
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs
# PostgreSQL
sudo apt-get install -y postgresql postgresql-contrib
sudo systemctl start postgresql
sudo systemctl enable postgresql
# Create PostgreSQL user and database
sudo -u postgres psql -c "CREATE USER openmake WITH PASSWORD 'your_password';"
sudo -u postgres psql -c "CREATE DATABASE openmake_llm OWNER openmake;"
# Ollama
curl -fsSL https://ollama.com/install.sh | sh
ollama serve &
5. Install on Windows
Option A โ WSL2 (Recommended):
WSL2 (Windows Subsystem for Linux) provides the smoothest experience. Install it, then follow the Linux guide above.
# In PowerShell (Run as Administrator)
wsl --install -d Ubuntu
# Restart your PC, then open "Ubuntu" from Start menu
# Follow the Linux (Ubuntu/Debian) guide above
Option B โ Native Windows:
- Node.js: Download the LTS installer from nodejs.org โ run it โ verify with
node -vin PowerShell. - PostgreSQL: Download from postgresql.org/download/windows โ run the installer (remember the password you set for the
postgresuser) โ use pgAdmin orpsqlfrom the Start menu. - Ollama: Download from ollama.com/download โ run the installer โ verify with
ollama --versionin PowerShell. - Git: Download from git-scm.com if not already installed.
Generating secret keys on Windows (since openssl may not be available):
# PowerShell
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
Tested Environment
| Component | Specification |
|---|---|
| OS | macOS 26.3 (Tahoe) |
| Processor | Apple M4 |
| Memory | 16GB RAM |
| Node.js | v25.8.0 |
| PostgreSQL | v16.13 (Homebrew) |
| Ollama | v0.18.3 |
| Playwright | v1.58.0 |
Installation
# Clone
git clone https://github.com/openmake/openmake_llm.git
cd openmake_llm
# Install dependencies
npm install
# Configure environment
cp .env.example .env
Configure .env
Open the .env file and set the following 5 required variables:
# 1. DATABASE_URL โ PostgreSQL connection string (use credentials from setup above)
DATABASE_URL=postgresql://openmake:your_password@localhost:5432/openmake_llm
# 2. JWT_SECRET โ Auth token signing key (generate with: openssl rand -hex 32)
JWT_SECRET=paste_generated_64_char_hex_string_here
# 3. API_KEY_PEPPER โ API key hashing salt (generate with: openssl rand -hex 32)
API_KEY_PEPPER=paste_generated_64_char_hex_string_here
# 4. ADMIN_PASSWORD โ Initial admin account password
# Must be 8+ chars with uppercase, lowercase, digit, and special character
ADMIN_PASSWORD=YourSecurePassword123!
# 5. OLLAMA_API_KEY_1 โ Ollama Cloud API key (required for cloud models)
# Get your key from https://ollama.com/settings
OLLAMA_API_KEY_1=your_ollama_api_key_here
Tip: Generate secret keys from your terminal (produces a random 64-character hex string):
# macOS / Linux openssl rand -hex 32 # Windows (PowerShell) โ if openssl is not available node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"Run the command twice โ once for
JWT_SECRETand once forAPI_KEY_PEPPER.
Ollama Cloud vs Local โ which should I use?
Cloud Models ( :cloudsuffix)Local Models How it works Requests are sent to Ollama Cloud servers Models run on your own machine's CPU/GPU API key required? Yes โ at least one OLLAMA_API_KEY_*No Hardware needed Minimal (any machine) GPU with 8GB+ VRAM recommended (varies by model) Cost Free tier available โ see ollama.com/pricing for limits Free (uses your electricity) Setup Set OLLAMA_API_KEY_1in.envollama pull <model>then updateOLLAMA_DEFAULT_MODELin.envDefault configuration uses Cloud models. All default models use the
:cloudsuffix (e.g.,gemini-3-flash-preview:cloud). To switch to local models, changeOLLAMA_DEFAULT_MODELto a local model (e.g.,llama3.2:latest) and runollama pull llama3.2first.
Start the Server
# Pull the local embedding model
ollama pull nomic-embed-text
# Start development server
npm run dev
The database schema is automatically created on first launch. When the server starts successfully, you should see output similar to:
[Server] OpenMake LLM server listening on port 52416
[Database] Connected to PostgreSQL
[Database] Schema initialized
First Login
Open http://localhost:52416 in your browser. You can:
- Admin login โ Use the email from
DEFAULT_ADMIN_EMAILin your.env(default:admin@example.com) with theADMIN_PASSWORDyou set above. - Register โ Create a new account from the registration tab.
- Guest mode โ Click "Continue as Guest" for limited access without an account.
What to Do After Login
- Start a chat โ Type a message in the chat input. The default model is the configured Ollama model.
- Switch models โ Click the ๐ model selector at the right of the input area (next to the send button). Dropdown shows your local Ollama model + any external LLM providers you've registered (Anthropic / OpenRouter / Gemini / Groq / etc.). Pure Manual mode โ your selection is never overridden by auto-routing.
- Register external LLM keys โ From the same dropdown, click "+ ์ LLM ํค ๋ฑ๋ก" โ choose a provider โ enter your API key. Registered models appear immediately in the dropdown.
- Try an expert agent โ Open the Agent panel to select a specialist (e.g., Software Engineer, Financial Analyst) for domain-specific conversations.
- Explore the Skill Library โ Browse available tools and capabilities in the Skill Library tab.
- Admin settings โ If logged in as admin, visit the Admin panel to manage users, models, and system configuration.
Production
# Build (required โ compiles TypeScript to JavaScript)
npm run build
# Start with PM2
pm2 start ecosystem.config.js
# Or start directly
npm start
Note: You must run
npm run buildbeforenpm startorpm2 start. The build step compiles TypeScript source intobackend/api/dist/. Update thecwdpath inecosystem.config.jsto match your project directory before using PM2.
Configuration
All settings are managed via .env. See .env.example for the full reference.
Essential Variables
| Variable | Description | Default |
|---|---|---|
PORT | Server port | 52416 |
DATABASE_URL | PostgreSQL connection string | Required |
OLLAMA_BASE_URL | Ollama server URL | http://localhost:11434 |
JWT_SECRET | Auth token secret (openssl rand -hex 32) | Required |
API_KEY_PEPPER | API key hashing salt (openssl rand -hex 32) | Required (production) |
ADMIN_PASSWORD | Initial admin account password | Required |
DEFAULT_ADMIN_EMAIL | Admin login email | admin@example.com |
OLLAMA_API_KEY_1..5 | Ollama Cloud API key pool (get key) | Required for cloud models |
TOKEN_ENCRYPTION_KEY | AES-256-GCM key for OAuth tokens + external LLM API keys (openssl rand -hex 32) | Required for production (BYO key ์ํธํ SSoT) |
EXTERNAL_MODELS_CACHE_TTL_MS | External provider /v1/models ์๋ต cache TTL (ms) | 3600000 (1h) |
EXTERNAL_USAGE_RETENTION_DAYS | external_provider_usage ๋ณด์กด ๊ธฐ๊ฐ (db-retention cron) | 90 |
EXTERNAL_PROVIDER_REQUEST_TIMEOUT_MS | ์ธ๋ถ provider ํธ์ถ ํ์์์ | 120000 |
Supported Models & Engine Mapping
Each brand profile routes queries to a specialized cloud model via Ollama:
| Brand Profile | Engine Variable | Cloud Model | Use Case |
|---|---|---|---|
| Default | OMK_ENGINE_LLM | gpt-oss:120b-cloud | Standard conversational tasks |
| Pro | OMK_ENGINE_PRO | qwen3.5:397b-cloud | High-complexity, large context |
| Fast | OMK_ENGINE_FAST | gemini-3-flash-preview:cloud | Low-latency responses |
| Think | OMK_ENGINE_THINK | gpt-oss:120b-cloud | Deep reasoning, problem solving |
| Code | OMK_ENGINE_CODE | glm-5:cloud | Programming, debugging, logic |
| Vision | OMK_ENGINE_VISION | qwen3.5:397b-cloud | Image analysis, multi-modal |
| Auto | โ | Intelligent Router | LLM classifier selects the optimal model per query |
Additional Supported Cloud Models
The following models are available for A2A multi-model orchestration. The first five can be assigned via OLLAMA_MODEL_1..5 in .env:
| Model | Default Slot | Description |
|---|---|---|
gemini-3-flash-preview:cloud | OLLAMA_MODEL_1 | Google Gemini 3 Flash โ fast general-purpose |
gpt-oss:120b-cloud | OLLAMA_MODEL_2 | GPT-OSS 120B โ strong reasoning |
kimi-k2.5:cloud | OLLAMA_MODEL_3 | Moonshot Kimi K2.5 โ creative and analysis |
qwen3-coder-next:cloud | OLLAMA_MODEL_4 | Qwen3 Coder Next โ code-specialized |
qwen3-vl:235b-cloud | OLLAMA_MODEL_5 | Qwen3 VL 235B โ vision-language |
deepseek-v3.2:cloud | โ | DeepSeek V3.2 โ strong reasoning and coding |
minimax-m2.7:cloud | โ | MiniMax M2.7 โ balanced general-purpose |
nemotron-3-super:cloud | โ | NVIDIA Nemotron 3 Super โ instruction following |
Local Embedding Model
nomic-embed-text:latest(274 MB) โ Used for vector embeddings in semantic search and RAG. Runs locally to keep embedding fast and private.ollama pull nomic-embed-text
Optional Integrations
- Google OAuth 2.0 โ
GOOGLE_CLIENT_ID,GOOGLE_CLIENT_SECRET - Google Custom Search โ
GOOGLE_API_KEY,GOOGLE_CSE_ID - Language Policy โ
DEFAULT_RESPONSE_LANGUAGE(20+ languages supported)
External LLM Providers (BYO Key Workflow)
Each user can register their own API keys directly from the chat input area โ no separate page or admin role required. Operators only need to set TOKEN_ENCRYPTION_KEY once.
Workflow:
- Login โ main chat page
- Click the model selector trigger (๐) at the right of the input area
- Open the dropdown โ "+ ์ LLM ํค ๋ฑ๋ก" section lists all unregistered providers
- Click any provider (e.g., "+ Anthropic Claude") โ key registration modal
- Enter API key โ registered key's models automatically populate the dropdown
- โฎ context menu next to any registered model โ validate / view usage / delete
Supported providers (catalog):
| Provider | SDK | Default Base URL | Models |
|---|---|---|---|
| Anthropic | native @anthropic-ai/sdk | api.anthropic.com | Claude Opus 4.5 / Sonnet 4.6 / Haiku 4.5 |
| OpenRouter | openai SDK | openrouter.ai/api/v1 | GPT-5, Claude, Gemini, Llama, DeepSeek (300+ routed) |
| Google Gemini | openai SDK | generativelanguage.googleapis.com/v1beta/openai | Gemini 2.5 Pro / Flash / 2.0 Flash Exp |
| Groq | openai SDK | api.groq.com/openai/v1 | Llama 3.3 70B (LPU ์ถ๋ก ) |
| Together AI | openai SDK | api.together.xyz/v1 | Llama / Qwen / DeepSeek (์คํ์์ค ํธ์คํ ) |
| Mistral | openai SDK | api.mistral.ai/v1 | Large / Medium / Small / Codestral |
| Cohere | openai SDK | api.cohere.com/compatibility/v1 | Command R+ / Command R |
| Ollama (remote) | openai SDK | (์ฌ์ฉ์ ์ ๋ ฅ) | ์๊ฒฉ Ollama ์๋ฒ OpenAI ํธํ mode |
| ์ง์ ์ ๋ ฅ | openai SDK | (์ฌ์ฉ์ ์ ๋ ฅ) | ๊ธฐํ OpenAI ํธํ endpoint (vLLM, LM Studio ๋ฑ) |
Pricing & Capability:
- 34 models with built-in USD pricing (1M token ๋จ์, BIGINT micros ๋์ ์ ํ๋)
- Capability auto-inference per model ID โ vision (gpt-4o, claude-3+, gemini-, pixtral ๋ฑ), thinking (claude-opus-4, deepseek-r1, o1/o3), embedding (text-embedding-*)
- Cohere
command-r-*๋ native tools ๋ฏธ์ง์ โ ์๋ ๋นํ์ฑ /v1/models๋น ์๋ต ์ provider๋ณ fallback ๋ชจ๋ธ ๋ณด๊ฐ (Gemini 3 / OpenRouter 6 / Groq 2 / Together 2 / Mistral 3 / Cohere 2)
Usage tracking:
- ๋ชจ๋ ์ธ๋ถ ํธ์ถ๋ณ ํ ํฐ/๋น์ฉ/์ง์ฐ ์๋ ๊ธฐ๋ก (
external_provider_usageํ ์ด๋ธ) - โฎ โ ๐ ์ฌ์ฉ๋ ๋ชจ๋ฌ: ์ง์ 50๊ฑด raw ํ + ์ต๊ทผ 30์ผ provider๋ณ ๋๊ณ ๋ฐ์ค (ํธ์ถ์ / ํ ํฐ / ๋น์ฉ USD)
GET /api/external-keys/usage/summary?days=NREST endpoint (max 90์ผ)- 90์ผ ์๋ ๋ณด์กด (db-retention cron, ํ๊ฒฝ๋ณ์
EXTERNAL_USAGE_RETENTION_DAYS)
Phase 2 (planned): OpenAI ChatGPT Plus/Pro OAuth (๊ตฌ๋ ๊ณ์ sign-in). ๋จ, OpenAI/Anthropic ๋ชจ๋ ํ์ค third-party OAuth client ๋ฑ๋ก ๋ฏธ๊ณต๊ฐ โ ์คํ ๊ฐ๋ฅ์ฑ์ provider ์ ์ฑ ๋ณ๊ฒฝ ์์กด. Anthropic Claude Pro/Max OAuth๋ ToS ๋ช ์ ๊ธ์ง๋ก ์๊ตฌ ์ ์ธ.
Project Structure
backend/api/src/
โโโ routes/ # 25+ Express route modules (REST API)
โโโ services/ # Core: ChatService, DeepResearch, RAG, Memory, Embedding
โโโ chat/ # Pipeline: classifier, model-selector, domain-router, cache
โโโ agents/ # 100+ industry agents, keyword router, discussion engine
โโโ mcp/ # Tool router, tiers, external client, user sandbox
โโโ auth/ # JWT, OAuth, API keys, RBAC, scope middleware
โโโ data/ # PostgreSQL repositories, migrations
โโโ sockets/ # WebSocket streaming handler
โโโ config/ # Environment, constants, limits, model defaults
โโโ monitoring/ # Analytics, token tracking
โโโ ollama/ # Ollama client wrapper
โโโ cluster/ # Multi-node cluster management
frontend/web/public/
โโโ js/modules/ # Core modules (chat, auth, state, websocket, sanitize)
โ โโโ pages/ # 23 page modules (admin, analytics, research, documents...)
โ โโโ components/ # Reusable components (model-selector, add-key-modal,
โ # usage-modal, model-action-menu)
โโโ css/ # Design tokens, components, model-selector styles
Development
npm run dev # API + Frontend (concurrent)
npm run dev:api # Backend only
npm run dev:frontend # Frontend only (Vite)
npm run build # Full production build
npm run lint # ESLint
Testing
npm test # Jest unit tests
npm run test:e2e # Playwright E2E (Chromium)
npm run test:e2e:ui # Playwright interactive UI mode
API
OpenMake LLM provides an OpenAI-compatible endpoint (/api/v1/chat/completions), allowing it to serve as a drop-in replacement for applications using the OpenAI API.
Interactive API documentation is available at http://localhost:52416/api/docs when running in development mode.
Selected Domain Endpoints
| Endpoint | Method | Auth | Purpose |
|---|---|---|---|
/api/v1/chat/completions | POST | API key (X-API-Key) | OpenAI-compatible chat (drop-in for OpenAI consumers) |
/api/models | GET | optional | Available models (Ollama + ์ธ์ฆ ์ ์ฌ์ฉ์ ๋ฑ๋ก ์ธ๋ถ LLM ํฉ์ฐ) |
/api/external-keys | GET | JWT | Provider ์นดํ๋ก๊ทธ + ์ฌ์ฉ์ ๋ฑ๋ก ํค ๋ฉํ |
/api/external-keys/:providerId | POST/DELETE | JWT | ํค ๋ฑ๋กยท๊ฐฑ์ ยท์ญ์ (AES-256-GCM ์ํธํ) |
/api/external-keys/:providerId/validate | POST | JWT | ํค ์ฆ์ ๊ฒ์ฆ (latency ํฌํจ) |
/api/external-keys/usage/recent | GET | JWT | ์ง์ 50๊ฑด raw ์ฌ์ฉ๋ |
/api/external-keys/usage/summary?days=N | GET | JWT | N์ผ(max 90) provider๋ณ ๋๊ณ (call/tokens/cost) |
/api/api-keys | GET/POST/DELETE | JWT | OpenMake ์์ฒด API ํค ๊ด๋ฆฌ (์๋ํํฐ ํด๋ผ์ด์ธํธ์ฉ) |
/api/usage | GET | JWT | OpenMake ์์ฒด ์ฌ์ฉ๋ ํต๊ณ |
/external-keys.html URL ์ ํ๊ธฐ๋จ โ /?openModelSelector=1 ๋ก 301 redirect.
Skill Library
Security
- Authentication: JWT (JSON Web Token) access/refresh tokens in HttpOnly cookies
- OAuth: Google OAuth 2.0 social login
- API Keys: HMAC-SHA-256 hashed, scope-based access control
- Authorization: RBAC (Role-Based Access Control) โ admin, user, and guest roles
- Rate Limiting: Per-route rate limiting to prevent abuse
- XSS Defense: Content sanitization via
sanitize.js - CORS: Configurable origin whitelist
Contributing
Contributions are welcome! Please ensure:
- Strict TypeScript โ no
anytypes in the backend - Vanilla JS only โ no frontend frameworks
- Parameterized SQL โ no raw string concatenation in queries
- Tests โ unit tests for new services, E2E for user-facing features
- File size โ source files must stay under 600 lines (CI enforced)
Troubleshooting
Common Issues
| Error | Cause | Solution |
|---|---|---|
ECONNREFUSED ...5432 | PostgreSQL not running | brew services start postgresql@16 (macOS) or sudo systemctl start postgresql (Linux) |
ECONNREFUSED ...11434 | Ollama not running | Launch the Ollama app or run ollama serve |
JWT_SECRET must be at least 32 characters | Missing .env configuration | Run openssl rand -hex 32 and set it in .env |
| Login fails: "Invalid credentials" | Wrong email or password | Check DEFAULT_ADMIN_EMAIL and ADMIN_PASSWORD in .env |
| Chat returns no response | Missing Ollama Cloud API key | Set OLLAMA_API_KEY_1 in .env (get key from ollama.com/settings) |
password authentication failed | PostgreSQL credentials mismatch | Ensure DATABASE_URL in .env matches the user/password you created in PostgreSQL |
API_KEY_PEPPER is required in production | Missing pepper key | Run openssl rand -hex 32 and set API_KEY_PEPPER in .env |
role "username" does not exist | PostgreSQL auth issue | Try psql -U postgres postgres to connect |
EADDRINUSE :::52416 | Port already in use | Stop the other process using the port, or change PORT in .env |
npm install fails with node-gyp | Missing build tools | macOS: xcode-select --install ยท Linux: sudo apt install build-essential ยท Windows: use WSL2 |
ollama pull hangs or fails | Network or disk issue | Check internet connection and available disk space (df -h) |
peer authentication failed (Linux) | PostgreSQL auth method | Edit pg_hba.conf to change peer to md5 for local connections, then restart PostgreSQL |
command not found: brew | Homebrew not installed | Install from brew.sh: /bin/bash -c "$(curl -fsSL ...)" |
| Embedding error on first chat | nomic-embed-text not pulled | Run ollama pull nomic-embed-text before starting the server |
| DB password with special characters | URL encoding needed | Encode special chars in DATABASE_URL (e.g., @ โ %40, # โ %23) |
| External LLM ํค ๋ฑ๋ก ํ ๋ชจ๋ธ ๋ฏธ๋ ธ์ถ | provider /v1/models ๋น ์๋ต + ์บ์ stale | DELETE FROM external_provider_models_cache WHERE provider_id='<id>' ํ PM2 ์ฌ์์. ์๋ fallback ๋ชจ๋ธ๋ก dropdown ์ฑ์์ง |
External ํค ๊ฒ์ฆ ์คํจ | ์๋ชป๋ API ํค ๋๋ base_url SSRF ์ฐจ๋จ | โฎ โ ๐ ๊ฒ์ฆ โ ์๋ฌ ๋ฉ์์ง ํ์ธ. localhost/์ฌ์ค IP๋ SSRF ๊ฐ๋๋ก ์ฐจ๋จ๋จ |
| Modal ๋ฏธ๊ฐ์ (dropdown์ ๋ณด์) | .modal-overlay.active CSS ๋ฏธ๋ก๋ | ํ๋ ๋ฆฌ๋ก๋ (Cmd+Shift+R) ๋๋ ?v= ์บ์ ๋ฒ์คํฐ ๊ฐฑ์ |
TOKEN_ENCRYPTION_KEY ํ๊ฒฝ ๋ณ์๊ฐ ์ค์ ๋์ง ์์์ต๋๋ค ๊ฒฝ๊ณ | ์ธ๋ถ LLM API ํค ํ๋ฌธ ์ ์ฅ ์ํ | openssl rand -hex 32 โ TOKEN_ENCRYPTION_KEY .env์ ์ค์ โ PM2 ์ฌ์์ |
Glossary
Terms used in this document
| Term | Meaning |
|---|---|
| SPA | Single Page Application โ the browser loads one HTML page and updates content dynamically |
| MCP | Model Context Protocol โ a standard that lets AI models use external tools (web search, file access, etc.) |
| A2A | Agent-to-Agent โ multiple AI models working together on a single query |
| RAG | Retrieval-Augmented Generation โ AI answers grounded in your uploaded documents |
| JWT | JSON Web Token โ a secure token format used for login sessions |
| RBAC | Role-Based Access Control โ permissions based on user roles (admin, user, guest) |
| WebSocket | A protocol for real-time, two-way communication between browser and server (used for streaming chat) |
| Semantic Cache | Caches AI responses by meaning, so similar questions get instant answers without re-querying the model |
| Ollama | An open-source tool for running LLMs locally or routing to cloud models |
| Embedding | Converting text into numerical vectors for similarity search and RAG |
License
MIT ยฉ 2026 OpenMake Contributors
