Prerequisites
Install Node.js >= 18
The server and dashboard both require Node.js 18 or later. Use
node --version to confirm.Install Python 3.10+
Python is required for
surgical_context.py (JIT skill hydration) and the Crawl4AI document collector.Install PostgreSQL 16
The primary database. Install the
pgvector and AGE extensions. A Docker Compose file is provided at cms/docker-compose.yml.Install Redis
Required by BullMQ for the job queue. The same Docker Compose file starts Redis alongside PostgreSQL and Directus.
Required services
All services are managed by PM2 in production. For local development, you can start them individually or use the PM2 ecosystem file.| Service | Port | Start command |
|---|---|---|
| AnythingLLM server | 3001 | cd server && node index.js |
| Directus CMS | 8055 | docker compose -f cms/docker-compose.yml up |
| Dashboard | 3100 | cd dashboard && npm run dev |
| Media Worker | — | cd media-worker && node index.js |
| Ollama | 11434 | ollama serve (systemd on Linux) |
The Stagehand browser automation server (port 3002) and PinchTab are only required if you are working on onboarding or platform scraping features.
Environment variables
Createserver/.env by copying server/.env.example. The following variables are required:
| Variable | Description |
|---|---|
CREDENTIALS_ENC_KEY_B64 | Base64-encoded 256-bit AES key for platform credential encryption. Generate with: openssl rand -base64 32 |
DIRECTUS_ADMIN_TOKEN | Directus admin token. Used only by register.js and rbacSync.js (pre-auth flows). |
MCP_SERVICE_TOKEN | Scoped Directus service token used by all other server-to-Directus calls. |
DEFAULT_NEW_USER_TIER | Tier assigned to new registrations. Default: pro. Valid values: starter, creator, pro, studio. |
RBAC_SYNC_WEBHOOK_SECRET | Shared secret for the Directus → rbacSync webhook. Also used by credentials.js for server-to-server auth. |
| Variable | Description |
|---|---|
ANTHROPIC_API_KEY | Enables the PowerAdmin Claude bypass for admin users in genieChat.js. Not required for regular creator flows. |
ANYTHINGLLM_API_KEY | API key for the AnythingLLM workspace API (auto-generated at setup). |
LLM_URL | Override for the AnythingLLM internal URL. Default: http://127.0.0.1:3001. |
Code standards
Linting and formatting
The project uses ESLint + Prettier. Run checks before pushing:Documentation
All exported functions and modules require JSDoc comments:Directus access rules
This constraint exists to enforce centralized auth, consistent error handling, and auditability.Commit conventions
All commits follow the Conventional Commits format:| Type | When to use |
|---|---|
feat | New feature or capability |
fix | Bug fix |
docs | Documentation changes |
chore | Dependency updates, config changes, tooling |
refactor | Code restructure with no behavior change |
test | Adding or updating tests |
perf | Performance improvement |
mcp, auth, dashboard, directus, bullmq, stagehand, ollama, pinchtab, nginx, onboarding
Examples:
Branch strategy
| Branch | Purpose |
|---|---|
main | Production — deployed on the server |
develop | Integration — all feature branches merge here first |
feature/{ticket}-{description} | New features (e.g., feature/G-2-skill-rewrites) |
fix/{ticket}-{description} | Bug fixes (e.g., fix/BUG-004-jwt-refresh) |
hotfix/{description} | Emergency production fixes that bypass develop |
develop. Merges to main are done by the maintainer after integration testing.
Where help is needed
These are the open work items where external contributions are most valuable:G-2: Skill Rewrites
28 remaining backend skill thin-rewrites into the canonical 3-layer format (context → tools → output schema).
FP-Growth Mining
Cross-user pattern mining in
memory/consolidation/cross_user/. Requires knowledge of FP-Growth algorithms.H-series: Platform Publishing
Automated post publishing to OnlyFans, Fansly, and Instagram via PinchTab browser automation.
J-series: E2E Tests
End-to-end test suite covering the full agent pipeline, onboarding flow, and media worker.