Prerequisites
Before you begin, ensure you have the following installed:- Bun runtime (latest version)
- Redis for caching and rate limiting
- PostgreSQL database (via Neon or local)
- Node.js (for some tooling compatibility)
Environment Setup
Configure environment variables
Copy the example environment file and fill in your credentials:Required environment variables:
Set up the database
Generate and push the database schema:Optional: Open Drizzle Studio to view your database:
Available NPM Scripts
The project includes several npm scripts for development and maintenance:Development & Running
Database Management
Code Quality
Sandbox
Development Workflow
Watch Mode
Thedev script runs Bun in watch mode, which automatically restarts the server when you save changes:
Testing the Bot Locally
Enable Socket Mode
For local development, set
SLACK_SOCKET_MODE=true in your .env file. This allows the bot to connect to Slack without exposing a public URL.Configure your Slack app
In the Slack API dashboard:
- Enable Socket Mode
- Generate an App-Level Token with
connections:writescope - Add the token to
SLACK_APP_TOKENin your.env
Making Code Changes
- Edit TypeScript files in the
server/directory - Save your changes - the dev server will automatically reload
- Check logs for errors or issues
- Test in Slack to verify your changes work
Pre-commit Hooks
The project uses Lefthook for Git hooks. When you commit:- Code formatting (Biome)
- Linting (Biome)
- Type checking (TypeScript)
- Spell checking
- Commit message validation (Conventional Commits)
Troubleshooting
Redis Connection Issues
If you see Redis connection errors:Database Migration Issues
If migrations fail:Type Errors
Run the type checker to see all TypeScript errors:Socket Mode Not Connecting
Verify:SLACK_SOCKET_MODE=trueis setSLACK_APP_TOKENis a valid App-Level Token- Socket Mode is enabled in your Slack app settings
- The app has the required OAuth scopes
Next Steps
- Learn about Code Style Guidelines
- Explore the Project Structure
- Create your first AI Tool