feat: Initial Hub implementation

Complete LetsBe Hub service for license management and telemetry:

- Client and Instance CRUD APIs
- License key generation and validation (lb_inst_ format)
- Hub API key generation (hk_ format) for telemetry auth
- Instance activation endpoint
- Telemetry collection with privacy-first redactor
- Key rotation and suspend/reactivate functionality
- Alembic migrations for PostgreSQL
- Docker Compose deployment ready
- Comprehensive test suite

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-22 14:09:32 +01:00
commit adc02e176b
39 changed files with 2968 additions and 0 deletions

13
.env.example Normal file
View File

@@ -0,0 +1,13 @@
# LetsBe Hub Configuration
# Database
DATABASE_URL=postgresql+asyncpg://hub:hub@db:5432/hub
# Admin API Key (CHANGE IN PRODUCTION!)
ADMIN_API_KEY=change-me-in-production
# Debug mode
DEBUG=false
# Telemetry retention (days)
TELEMETRY_RETENTION_DAYS=90