A secure, developer-first email delivery platform built for the Kenyan market. UJUMBE provides powerful APIs with template support, custom verified sender domains, real-time logs, analytics, and M-Pesa billing integration.
β¨ Core Features
π Technical Stack
Clone the repository
git clone https://github.com/Ismael-Njihia/UJUMBE.git
cd UJUMBE
Configure environment variables
cp backend/.env.example backend/.env
# Edit backend/.env with your AWS credentials
Start the services
make run
This will start:
Access the services
Backend Development
cd backend
go mod download
go run cmd/server/main.go
Worker Development
cd backend
go run cmd/worker/main.go
Frontend Development
cd frontend
npm install
npm run dev
βββββββββββββββ ββββββββββββββββ βββββββββββ
β Svelte ββββββΆβ Go API ββββββΆβ Kafka β
β Dashboard β β Server β β Queue β
βββββββββββββββ ββββββββββββββββ βββββββββββ
β β
βΌ βΌ
ββββββββββββββββ ββββββββββββ
β PostgreSQL β β Worker β
β Database β β Service β
ββββββββββββββββ ββββββββββββ
β
βΌ
ββββββββββββ
β AWS SES β
ββββββββββββ
curl -X POST http://localhost:8080/api/v1/auth/register \
-H "Content-Type: application/json" \
-d '{"email":"[email protected]","password":"securepass123"}'
curl -X POST http://localhost:8080/api/v1/emails/send \
-H "Content-Type: application/json" \
-H "X-API-Key: your-api-key" \
-d '{
"from": "[email protected]",
"to": "[email protected]",
"subject": "Hello from UJUMBE",
"html_body": "<h1>Hello!</h1><p>This is a test email.</p>"
}'
curl -X POST http://localhost:8080/api/v1/templates \
-H "Content-Type: application/json" \
-H "X-API-Key: your-api-key" \
-d '{
"name": "Welcome Email",
"subject": "Welcome {{name}}!",
"html_body": "<h1>Welcome {{name}}!</h1>"
}'
For complete API documentation, see docs/API.md.
The system uses PostgreSQL with the following main tables:
users
- User accounts and API keysuser_quotas
- Email quotas (free and paid)verified_domains
- Custom sender domainsemail_templates
- Reusable email templatesemails
- Email tracking and statusemail_logs
- Real-time delivery logstransactions
- M-Pesa payment recordsSee database/migrations/001_init_schema.sql for the complete schema.
make help # Show all available commands
make build # Build Docker images
make run # Start all services
make stop # Stop all services
make logs # View logs from all services
make clean # Remove containers and volumes
make test # Run tests
make dev # Run backend in dev mode
make worker-dev # Run worker in dev mode
Key environment variables in backend/.env
:
# Database
DB_HOST=localhost
DB_PORT=5432
DB_NAME=ujumbe
# AWS SES
AWS_REGION=us-east-1
AWS_ACCESS_KEY_ID=your_key
AWS_SECRET_ACCESS_KEY=your_secret
# Kafka
KAFKA_BROKERS=localhost:9092
KAFKA_TOPIC=email_jobs
# Application
FREE_EMAIL_QUOTA=100
EMAIL_PRICE_PER_UNIT=1.0
UJUMBE integrates with Safaricom's M-Pesa for seamless billing:
We welcome contributions! Please follow these steps:
git checkout -b feature/amazing-feature
)git commit -m 'Add amazing feature'
)git push origin feature/amazing-feature
)Run the test suite:
cd backend
go test ./...
For production deployment:
ENVIRONMENT=production
in .env
MIT License - see LICENSE file for details
Built with β€οΈ for the Kenyan developer community
UJUMBE - Powerful email delivery for Kenya π°πͺ