Skip to main content

Prerequisites

Before you begin, ensure you have the following installed:

Node.js 20+

Download from nodejs.org

pnpm 8+

Install: npm install -g pnpm

Docker Desktop

Download from docker.com

Git

Download from git-scm.com

Step 1: Clone and Install

git clone https://github.com/dev-inagiffy/mako.git
cd hitler
pnpm install
pnpm will install dependencies for all packages in the monorepo. This may take a few minutes the first time.

Step 2: Environment Configuration

Copy the example environment file:
cp .env.example .env

Minimal Configuration (Required)

Edit .env with at least these values:
# Database - Docker provides these defaults
DATABASE_URL=postgres://hitler:hitler@localhost:5432/hitler
REDIS_URL=redis://localhost:6379

# Security - Change this to a random string (min 32 characters)
JWT_SECRET=your-super-secret-key-change-me-please
Never commit your .env file or share your secrets. The .gitignore already excludes .env files.

Complete Environment Variables Guide

See the full guide for how to get API keys, generate secrets, and configure all options.
For AI-powered task parsing to work, add one of:
bash ANTHROPIC_API_KEY=sk-ant-your-api-key LLM_MODEL_ANTHROPIC=claude-3-haiku-20240307 Get an API key at console.anthropic.com
Without an LLM key, the API will use mock responses. This is fine for UI development but task parsing won’t work realistically.

Step 3: Start Database Services

Start PostgreSQL and Redis using Docker:
make db-up
Or using docker-compose directly:
docker-compose up -d postgres redis
Verify they’re running:
docker-compose ps
You should see both postgres and redis with status “Up”.

Step 4: Run Database Migrations

Initialize the database schema:
pnpm db:migrate
bash pnpm db:seed This creates a sample organization, users, and tasks for testing.

Step 5: Start Development Servers

Start all services in development mode:
pnpm dev
This starts:
ServiceURLDescription
APIhttp://localhost:3000NestJS backend
API Docshttp://localhost:3000/docsSwagger documentation
Webhttp://localhost:3005Next.js admin dashboard
Slack Bothttp://localhost:3002Slack adapter
Open http://localhost:3000/health to verify the API is running. You should see {"status":"ok"}.

Slack Integration Setup (Local Dev)

The Hitler Slack bot uses Socket Mode (WebSocket), so you don’t need ngrok or a public URL for local development. We recommend a separate “Hitler Dev” Slack app — see Slack Setup for the full two-app guide.

1. Create a Slack App

  1. Go to api.slack.com/apps
  2. Click Create New AppFrom scratch
  3. Name it Hitler Dev and select your dev workspace

2. Enable Socket Mode

  1. Go to Settings → Socket Mode → Enable
  2. Generate an App-Level Token with connections:write scope
  3. Copy the token (xapp-1-...)

3. Add Bot Token Scopes

Go to OAuth & Permissions → Bot Token Scopes and add:
ScopePurpose
app_mentions:readView messages that directly mention the bot
channels:historyView messages in public channels the bot is in
chat:writeSend messages as the bot
commandsAdd slash commands (e.g. /hitler)
groups:historyView messages in private channels the bot is in
im:historyView messages in DMs with the bot
im:readView basic info about DMs the bot is in
im:writeStart direct messages with people
mpim:historyView messages in group DMs the bot is in
team:readView workspace name, email domain, and icon
users:readView people in the workspace

4. Subscribe to Events

Go to Event Subscriptions → Subscribe to bot events and add:
Event NameDescriptionRequired Scope
app_home_openedUser opened the bot’s App Home tab
app_mentionSomeone mentions the bot in a channelapp_mentions:read
message.channelsA message was posted in a public channel the bot is inchannels:history
message.groupsA message was posted in a private channel the bot is ingroups:history
message.imA message was posted in a DM with the botim:history
message.mpimA message was posted in a group DM the bot is inmpim:history

5. Set OAuth Redirect URL

Go to OAuth & Permissions → Redirect URLs and add:
http://localhost:3000/api/auth/slack/callback

6. Install to Workspace and Add Credentials

  1. Click Install to Workspace and authorize
  2. Copy credentials to your .env:
SLACK_APP_TOKEN=xapp-1-your-app-level-token    # From Socket Mode settings
SLACK_SIGNING_SECRET=your-signing-secret        # From Basic Information
SLACK_CLIENT_ID=your-client-id                  # From Basic Information
SLACK_CLIENT_SECRET=your-client-secret          # From Basic Information
Now start the dev servers (pnpm dev) and DM the bot in Slack!

Running Specific Services

Instead of running everything, you can start individual services:
# API only
pnpm --filter @hitler/api dev

# Web dashboard only
pnpm --filter @hitler/web dev

# Slack bot only
pnpm --filter @hitler/bot-slack dev

Common Commands

CommandDescription
pnpm devStart all services in dev mode
pnpm buildBuild all packages
pnpm testRun all tests
pnpm test:watchRun tests in watch mode
pnpm type-checkTypeScript type checking
pnpm lintRun type checking across all packages
pnpm formatFormat code with Prettier
pnpm db:generateGenerate migration from schema changes
pnpm db:migrateRun database migrations
pnpm db:studioOpen Drizzle Studio (DB browser)

Project Structure

/apps
  api/              # NestJS backend (port 3000)
  web/              # Next.js dashboard (port 3005)
  bot-slack/        # Slack adapter (port 3002)

/packages
  db/               # Database schemas and migrations
  sdk/              # Typed API client
  rules/            # Business rules engine
  prompts/          # LLM prompts
  shared/           # Shared types and schemas
  observability/    # Logging and tracing
  secrets/          # Secrets management
  adapters/         # Platform adapters

/tests              # Test utilities and integration tests
/docs               # Documentation (Mintlify)

Slack Slash Commands

After installing the Slack app, register these slash commands under Slash Commands in your app settings.

Direct Commands (No LLM)

CommandShort DescriptionUsage Hint
/tasksList your current tasks[open|today|overdue]
/doneMark a task as completed<task number or title>
/blockedReport a blocker on a task#<id> <reason>
/unblockedResolve a blocker on a task#<id> [note]
/statusShow your task completion summary
/moodLog your mood or view trends[1-5] [note] | history | stats
/journalCreate or list journal entries[text to journal]
/helpShow available commands and help[topic]
/log-interventionLog work you picked up for someone<user> <description>
/clear-dmsClear all bot messages from your DMs

Admin/Manager Commands (No LLM)

CommandShort DescriptionUsage Hint
/red-cardManually issue an escalation card<user> <reason>

LLM-Powered Commands

CommandShort DescriptionUsage Hint
/hitlerTalk to the bot using natural language<anything you want to say>
The /hitler command routes through Claude which has access to 30+ tools including: create/update/complete tasks, set reminders, log mood, check KPI, manage checklists, move pipeline stages, reassign tasks, browse URLs, and more.
Total: 12 slash commands — 10 direct (no LLM), 1 admin-only, 1 LLM-powered. Direct commands respond instantly. The /hitler command uses Claude for natural language understanding.

Troubleshooting

Ensure Docker containers are running:
docker-compose ps
docker-compose logs postgres
If needed, restart:
docker-compose down
docker-compose up -d postgres redis
Another process is using port 3000, 3005, or 3002. Find and kill it:
lsof -i :3000
kill -9 <PID>
Clear the cache and reinstall: bash rm -rf node_modules rm -rf .pnpm-store pnpm install
Ensure the database is running and DATABASE_URL is correct: bash docker-compose logs postgres psql $DATABASE_URL -c "SELECT 1"
  1. Verify Socket Mode is enabled in your Slack app settings
  2. Check that SLACK_APP_TOKEN is set in your .env (starts with xapp-)
  3. Verify Event Subscriptions has message.im and app_mention subscribed
  4. Check SLACK_SIGNING_SECRET matches your app

Next Steps

API Reference

Explore the API endpoints

Architecture

Understand the system design

Testing Guide

Write and run tests

Contributing

Contribution guidelines