Development
Set up Radar for local development
Prerequisites
- Node.js 22+
- pnpm 9+ (
corepack enable && corepack prepare pnpm@9 --activate) - Docker (for Redis)
- Anthropic or OpenAI API key
Getting started
Clone and install:
git clone https://github.com/shipsecure-labs/radar.git
cd radar
pnpm installStart Redis:
docker compose -f docker-compose.dev.yml up -dConfigure environment:
cp .env.example .envEdit .env with your API keys and at least one git provider (GitHub or GitLab).
Start the dev server:
pnpm devThis starts both the gateway (port 3000) and the worker with hot-reload.
Scripts
| Script | Description |
|---|---|
pnpm dev | Start gateway + worker with hot-reload |
pnpm build | Build all packages |
pnpm lint | Lint all packages |
pnpm typecheck | Type check all packages |
pnpm test | Run tests |
pnpm format | Format with Prettier |
Exposing your local server
During development, GitHub/GitLab needs to reach your local gateway. Use a tunnel:
# ngrok
ngrok http 3000
# Cloudflare Tunnel
cloudflared tunnel --url http://localhost:3000Use the tunnel URL as your webhook URL:
- GitHub:
https://xxxx.ngrok.io/github/webhook - GitLab:
https://xxxx.ngrok.io/gitlab/webhook