Real-time web analytics platform with privacy-first approach. Built with Go and Next.js.
Krakens is a lightweight, self-hosted analytics solution that provides real-time insights into website traffic without compromising user privacy.
Key Features:
- Real-time visitor tracking and analytics
- Privacy-focused (IP anonymization, GDPR compliant)
- Lightweight tracking script (<5KB)
- Multi-domain support
- API-first architecture
- Self-hosted and open source
┌─────────────┐
│ Browser │
└──────┬──────┘
│ Tracking SDK
▼
┌─────────────┐ ┌──────────────┐
│ Backend │────▶│ MongoDB │
│ (Go/Gin) │ │ Redis │
│ │ │ NATS │
└──────┬──────┘ └──────────────┘
│
▼
┌─────────────┐
│ Frontend │
│ (Next.js) │
└─────────────┘
Backend: Go 1.22, Gin, MongoDB, Redis, NATS
Frontend: Next.js 14, TypeScript, Tailwind CSS, Recharts
Infrastructure: Docker, Kubernetes
- Go 1.22+
- Node.js 18+
- MongoDB, Redis, NATS
# Clone repository
git clone https://github.com/nesohq/krakens.git
cd krakens
# Start backend
cd backend
docker-compose up -d # Start dependencies
cp .env.example .env
make dev
# Start frontend (new terminal)
cd frontend
cp .env.example .env.local
npm install && npm run devAccess the dashboard at http://localhost:3000
Images are automatically built and published to GitHub Container Registry:
# Pull images
docker pull ghcr.io/nesohq/krakens/backend:latest
docker pull ghcr.io/nesohq/krakens/frontend:latestDeploy using your own manifests. Required environment variables:
Backend:
- MONGODB_URI=mongodb://mongodb:27017
- REDIS_URL=redis://redis:6379
- NATS_URL=nats://nats:4222
- JWT_SECRET=<secret>Frontend:
- NEXT_PUBLIC_API_URL=https://api.yourdomain.com- Register an account at
/register - Add domain in the Domains section
- Generate API key for your domain
- Install tracking script on your website:
<script src="https://your-domain.com/krakens.js"></script>
<script>
Krakens.init('YOUR_API_KEY');
</script>- View analytics in real-time on the dashboard
POST /api/auth/register
POST /api/auth/loginPOST /api/track
Header: X-API-Key: <key>GET /api/stats/realtime?domain_id=<id>
GET /api/stats/overview?domain_id=<id>
Header: Authorization: Bearer <token>krakens/
├── backend/ # Go backend service
├── frontend/ # Next.js frontend
└── .github/workflows/ # CI/CD pipelines
We welcome contributions! To contribute:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Please ensure:
- Code follows existing style
- Tests pass
- Documentation is updated
- Commits are clear and descriptive
MIT License - see LICENSE file for details.
- Issues: GitHub Issues
- Documentation: See README files in backend/frontend directories
- Email: [email protected]
Built with ❤️ for privacy-conscious analytics