git clone && cd redhook./setup.shbackend/.envngrok http 8081./start.shhttp://localhost:8080git clone https://github.com/your-repo/redhook.git
cd redhook
chmod +x setup.sh start.sh
./setup.sh
backend/.env from templatedocker run --name redhook-db \
-e POSTGRES_PASSWORD=redhook \
-e POSTGRES_DB=redhook \
-p 5432:5432 -d postgres:15
sudo apt install postgresql
sudo systemctl start postgresql
API Keys pageAmazonSESFullAccess policycurl -sSL https://ngrok-agent.s3.amazonaws.com/ngrok.asc \
| sudo tee /etc/apt/trusted.gpg.d/ngrok.asc >/dev/null \
&& echo "deb https://ngrok-agent.s3.amazonaws.com bookworm main" \
| sudo tee /etc/apt/sources.list.d/ngrok.list \
&& sudo apt update \
&& sudo apt install ngrok
ngrok http 8081
Output:
./start.sh
curl http://localhost:8080/health
TOKEN=$(curl -s -X POST http://localhost:8080/api/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"admin@redhook.local","password":"changeme123"}' | jq -r '.token')
echo $TOKEN
curl -X POST http://localhost:8080/api/users \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{"email":"target@company.com","name":"Target User","department":"IT","password":"test123"}'
curl -X POST http://localhost:8080/api/campaigns \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{"name":"Test Campaign","template_id":1,"landing_page_id":1}'
curl -X POST http://localhost:8080/api/send \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{"campaign_id":1,"recipients":[1]}'
curl http://localhost:8080/api/campaigns/1/stats -H "Authorization: Bearer $TOKEN"
| Variable | Required | Description |
|---|---|---|
| DB_HOST | Yes | Database host |
| DB_USER | Yes | Database user |
| DB_PASSWORD | Yes | Database password |
| Email Provider (Choose One) | ||
| RESEND_ENABLED | No | Enable Resend (true/false) |
| RESEND_API_KEY | If Resend | Resend API key |
| RESEND_FROM_EMAIL | If Resend | Sender email (use verified domain) |
| AWS_ENABLED | No | Enable AWS SES (true/false) |
| AWS_REGION | If AWS | AWS region |
| AWS_ACCESS_KEY_ID | If AWS | AWS access key |
| AWS_SECRET_ACCESS_KEY | If AWS | AWS secret key |
| AWS_SES_FROM_EMAIL | If AWS | SES sender email |
| Other | ||
| PHISHING_URL | Yes | Public phishing URL (ngrok) |
| JWT_SECRET | Yes | JWT secret key |
tail -f /tmp/redhook.log