Prerequisites
Before you begin, ensure you have the following installed:Node.js 20+
Download from nodejs.org
pnpm 8+
Install:
npm install -g pnpmDocker Desktop
Download from docker.com
Git
Download from git-scm.com
Step 1: Clone and 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:Minimal Configuration (Required)
Edit.env with at least these values:
Complete Environment Variables Guide
See the full guide for how to get API keys, generate secrets, and configure all options.
LLM Configuration (Optional but Recommended)
For AI-powered task parsing to work, add one of:- Anthropic (Claude)
- OpenAI (GPT)
bash ANTHROPIC_API_KEY=sk-ant-your-api-key LLM_MODEL_ANTHROPIC=claude-3-haiku-20240307
Get an API key at console.anthropic.comWithout 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:postgres and redis with status “Up”.
Step 4: Run Database Migrations
Initialize the database schema:Optional: Seed sample data
Optional: Seed sample data
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:| Service | URL | Description |
|---|---|---|
| API | http://localhost:3000 | NestJS backend |
| API Docs | http://localhost:3000/docs | Swagger documentation |
| Web | http://localhost:3005 | Next.js admin dashboard |
| Slack Bot | http://localhost:3002 | Slack 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
- Go to api.slack.com/apps
- Click Create New App → From scratch
- Name it
Hitler Devand select your dev workspace
2. Enable Socket Mode
- Go to Settings → Socket Mode → Enable
- Generate an App-Level Token with
connections:writescope - Copy the token (
xapp-1-...)
3. Add Bot Token Scopes
Go to OAuth & Permissions → Bot Token Scopes and add:| Scope | Purpose |
|---|---|
app_mentions:read | View messages that directly mention the bot |
channels:history | View messages in public channels the bot is in |
chat:write | Send messages as the bot |
commands | Add slash commands (e.g. /hitler) |
groups:history | View messages in private channels the bot is in |
im:history | View messages in DMs with the bot |
im:read | View basic info about DMs the bot is in |
im:write | Start direct messages with people |
mpim:history | View messages in group DMs the bot is in |
team:read | View workspace name, email domain, and icon |
users:read | View people in the workspace |
4. Subscribe to Events
Go to Event Subscriptions → Subscribe to bot events and add:| Event Name | Description | Required Scope |
|---|---|---|
app_home_opened | User opened the bot’s App Home tab | — |
app_mention | Someone mentions the bot in a channel | app_mentions:read |
message.channels | A message was posted in a public channel the bot is in | channels:history |
message.groups | A message was posted in a private channel the bot is in | groups:history |
message.im | A message was posted in a DM with the bot | im:history |
message.mpim | A message was posted in a group DM the bot is in | mpim:history |
5. Set OAuth Redirect URL
Go to OAuth & Permissions → Redirect URLs and add:6. Install to Workspace and Add Credentials
- Click Install to Workspace and authorize
- Copy credentials to your
.env:
pnpm dev) and DM the bot in Slack!
Running Specific Services
Instead of running everything, you can start individual services:Common Commands
| Command | Description |
|---|---|
pnpm dev | Start all services in dev mode |
pnpm build | Build all packages |
pnpm test | Run all tests |
pnpm test:watch | Run tests in watch mode |
pnpm type-check | TypeScript type checking |
pnpm lint | Run type checking across all packages |
pnpm format | Format code with Prettier |
pnpm db:generate | Generate migration from schema changes |
pnpm db:migrate | Run database migrations |
pnpm db:studio | Open Drizzle Studio (DB browser) |
Project Structure
Slack Slash Commands
After installing the Slack app, register these slash commands under Slash Commands in your app settings.Direct Commands (No LLM)
| Command | Short Description | Usage Hint |
|---|---|---|
/tasks | List your current tasks | [open|today|overdue] |
/done | Mark a task as completed | <task number or title> |
/blocked | Report a blocker on a task | #<id> <reason> |
/unblocked | Resolve a blocker on a task | #<id> [note] |
/status | Show your task completion summary | |
/mood | Log your mood or view trends | [1-5] [note] | history | stats |
/journal | Create or list journal entries | [text to journal] |
/help | Show available commands and help | [topic] |
/log-intervention | Log work you picked up for someone | <user> <description> |
/clear-dms | Clear all bot messages from your DMs |
Admin/Manager Commands (No LLM)
| Command | Short Description | Usage Hint |
|---|---|---|
/red-card | Manually issue an escalation card | <user> <reason> |
LLM-Powered Commands
| Command | Short Description | Usage Hint |
|---|---|---|
/hitler | Talk 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
Database connection refused
Database connection refused
Ensure Docker containers are running:If needed, restart:
Port already in use
Port already in use
Another process is using port 3000, 3005, or 3002. Find and kill it:
pnpm install fails
pnpm install fails
Clear the cache and reinstall:
bash rm -rf node_modules rm -rf .pnpm-store pnpm install Migrations fail
Migrations fail
Ensure the database is running and
DATABASE_URL is correct: bash docker-compose logs postgres psql $DATABASE_URL -c "SELECT 1" Slack bot not receiving events
Slack bot not receiving events
- Verify Socket Mode is enabled in your Slack app settings
- Check that
SLACK_APP_TOKENis set in your.env(starts withxapp-) - Verify Event Subscriptions has
message.imandapp_mentionsubscribed - Check
SLACK_SIGNING_SECRETmatches your app
Next Steps
API Reference
Explore the API endpoints
Architecture
Understand the system design
Testing Guide
Write and run tests
Contributing
Contribution guidelines