Thank you for your interest in contributing to Reka! This guide covers everything you need to get started.
- Development Setup
- Project Structure
- Code Style
- Standing Repo Policy
- Making Changes
- Pull Request Process
- Issue Guidelines
- Good First Issues
- Node.js 20+
- Docker and Docker Compose
- Git
- (Optional) NVIDIA GPU + drivers for Ollama acceleration
git clone https://github.com/YOUR_USERNAME/reka.git
cd rekadocker compose -f docker/docker-compose.yml up -d qdrant redis bge-m3# API server
cd rag-api
npm install
cp .env.example .env # Edit as needed
npm run build
# MCP server
cd ../mcp-server
npm install
npm run build
# Dashboard (optional)
cd ../dashboard
npm install# Terminal 1: API server with hot reload
cd rag-api && npm run dev
# Terminal 2: Dashboard dev server (optional)
cd dashboard && npm run dev# API tests
cd rag-api && npm test
# MCP server tests
cd mcp-server && npm test
# With coverage
cd rag-api && npm run test:coveragereka/
├── rag-api/ # Core API server (Express + TypeScript)
│ ├── src/
│ │ ├── server.ts # Entry point
│ │ ├── config.ts # Configuration
│ │ ├── routes/ # Express route handlers
│ │ ├── services/ # Business logic (singletons)
│ │ │ ├── vector-store.ts
│ │ │ ├── embedding.ts
│ │ │ ├── llm.ts
│ │ │ ├── indexer.ts
│ │ │ ├── memory.ts
│ │ │ ├── graph-store.ts
│ │ │ ├── symbol-index.ts
│ │ │ ├── memory-governance.ts
│ │ │ ├── consolidation-agent.ts
│ │ │ └── ...
│ │ ├── utils/
│ │ │ └── validation.ts # Zod schemas (centralized)
│ │ └── evals/ # Evaluation framework
│ └── package.json
├── mcp-server/ # MCP server (per-project instance)
│ ├── src/
│ │ ├── index.ts # Entry point + tool registration
│ │ ├── tools/ # Tool definitions (createXxxTools())
│ │ └── tool-middleware.ts
│ └── package.json
├── dashboard/ # Vue 3 + Vite web UI
├── docker/ # Docker Compose configurations
│ ├── docker-compose.yml
│ ├── docker-compose.dev.yml
│ └── docker-compose.prod.yml
├── docs/ # Documentation
└── scripts/ # Utility scripts
- Services are singleton classes, exported as module-level instances
- Routes use
asyncHandlerwrapper +validatemiddleware (Zod) - MCP tools follow the pattern:
createXxxTools()returns{tools, handlers} - Validation schemas are centralized in
rag-api/src/utils/validation.ts
- Strict mode enabled
- Use explicit return types on exported functions
- Prefer
interfaceovertypefor object shapes - Use
async/awaitover raw Promises
# Format code
cd rag-api && npm run format
# Lint
cd rag-api && npm run lint
# Auto-fix lint issues
cd rag-api && npm run lint:fix| Thing | Convention | Example |
|---|---|---|
| Files | kebab-case.ts |
memory-governance.ts |
| Classes | PascalCase |
MemoryGovernance |
| Functions | camelCase |
consolidateMemories() |
| Constants | UPPER_SNAKE_CASE |
MAX_BATCH_SIZE |
| Interfaces | PascalCase |
MemoryEntry |
| MCP tools | snake_case |
hybrid_search |
Follow conventional commits:
feat: add spreading activation to recall
fix: handle empty embeddings in batch upsert
docs: update MCP tool reference
refactor: extract parser registry from indexer
test: add memory governance unit tests
chore: update dependencies
Two rules apply to every change in this repo:
- Subtraction rule — capabilities are deleted, never hidden. No hidden tool tiers, no dead code kept "just in case". A deletion PR carries ALL of its sweeps (registrations, annotations, timeouts, skip-lists, tests, doc rows) in the same PR, and its diff is net-negative. Before any release, grep the repo (and the reka-plugin tree) for every removed tool name — zero live references is the gate.
- Proof rule — no public surface (README, landing page, docs, plugin copy, dashboard) may claim a capability or count that has not been verified live. Tool counts state what is actually registered today (see
mcp-server/src/__tests__/tool-registration.test.ts); feature claims require a working, observed code path.
feat/short-description
fix/issue-number-description
docs/what-changed
refactor/what-changed
- Check existing issues and PRs to avoid duplicate work
- For significant changes, open an issue first to discuss the approach
- For small fixes (typos, docs, obvious bugs), go straight to a PR
- Add tests for new features and bug fixes
- Tests use Vitest and live in
__tests__/directories or*.test.tsfiles - Run the full suite before submitting:
npm test - For services that depend on external systems (Qdrant, Redis), use mocks
git checkout -b feat/my-feature
# Make changes, commit
git push -u origin feat/my-feature
# Open PR on GitHub- Tests pass (
npm testin affected packages) - Linting passes (
npm run lint) - TypeScript compiles (
npm run build) - PR description explains what and why
- Breaking changes are documented
Use the same conventional commit format:
feat: add memory expiration policies
fix: prevent duplicate graph edges on re-index
docs: add self-hosting guide for ARM64
- A maintainer will review your PR, usually within 48 hours
- Address review feedback by pushing new commits (don't force-push)
- Once approved, a maintainer will merge
Use the Bug Report template. Include:
- Steps to reproduce
- Expected vs actual behavior
- Reka version, OS, Docker version
- Relevant logs (from
docker compose logsor API output)
Use the Feature Request template. Include:
- Problem statement (what are you trying to do?)
- Proposed solution
- Alternatives you considered
| Label | Meaning |
|---|---|
good first issue |
Scoped, well-documented, good for newcomers |
help wanted |
Maintainers want community help |
bug |
Something is broken |
enhancement |
New feature or improvement |
documentation |
Docs improvements |
performance |
Performance-related |
memory |
Memory system (governance, consolidation, LTM) |
search |
Search and retrieval |
mcp |
MCP server and tools |
indexing |
Code indexing and parsing |
infrastructure |
Docker, CI/CD, deployment |
We maintain a curated list of good first issues. These are:
- Scoped: Clear boundaries, no rabbit holes
- Documented: Description includes context, approach hints, and relevant files
- Tested: Clear criteria for "done"
Look for the good first issue label.
Examples of good first issues:
- Add a new file parser (e.g.,
.vue,.svelte) - Add a new MCP tool that wraps an existing API endpoint
- Improve error messages for common configuration mistakes
- Add unit tests for an untested service method
- Fix a documented bug with clear reproduction steps
- Open a Discussion for questions
- Join Discord for real-time help
- Tag
@maintainersin your issue or PR if you're stuck
Thank you for contributing!