Initial commit: DigiServer v2 with Blueprint Architecture

Features implemented:
- Application factory pattern with environment-based config
- 7 modular blueprints (main, auth, admin, players, groups, content, api)
- Flask-Caching with Redis support for production
- Flask-Login authentication with bcrypt password hashing
- API endpoints with rate limiting and Bearer token auth
- Comprehensive error handling and logging
- CLI commands (init-db, create-admin, seed-db)

Blueprint Structure:
- main: Dashboard with caching, health check endpoint
- auth: Login, register, logout, password change
- admin: User management, system settings, theme, logo upload
- players: Full CRUD, fullscreen view, bulk operations, playlist management
- groups: Group management, player assignments, content management
- content: Upload with progress tracking, file management, preview/download
- api: RESTful endpoints with authentication, rate limiting, player feedback

Performance Optimizations:
- Dashboard caching (60s timeout)
- Playlist caching (5min timeout)
- Redis caching for production
- Memoized functions for expensive operations
- Cache clearing on data changes

Security Features:
- Bcrypt password hashing
- Flask-Login session management
- admin_required decorator for authorization
- Player authentication via auth codes
- API Bearer token authentication
- Rate limiting on API endpoints (60 req/min default)
- Input validation and sanitization

Documentation:
- README.md: Full project documentation with quick start
- PROGRESS.md: Detailed progress tracking and roadmap
- BLUEPRINT_GUIDE.md: Quick reference for blueprint architecture

Pending work:
- Models migration from v1 with database indexes
- Utils migration from v1 with type hints
- Templates migration with updated route references
- Docker multi-stage build configuration
- Unit tests for all blueprints

Ready for models and utils migration from digiserver v1
This commit is contained in:
ske087
2025-11-12 10:00:30 +02:00
commit 244b44f5e0
17 changed files with 3420 additions and 0 deletions

50
requirements.txt Normal file
View File

@@ -0,0 +1,50 @@
# Core Flask
Flask==3.1.0
Werkzeug==3.1.3
Jinja2==3.1.5
itsdangerous==2.2.0
click==8.1.8
# Flask Extensions
Flask-SQLAlchemy==3.1.1
Flask-Migrate==4.1.0
Flask-Bcrypt==1.0.1
Flask-Login==0.6.3
Flask-Caching==2.1.0
# Database
SQLAlchemy==2.0.37
alembic==1.14.1
# Redis (for caching in production)
redis==5.0.1
# Date parsing
python-dateutil==2.9.0
# File Processing
pdf2image==1.17.0
Pillow==10.0.1
ffmpeg-python==0.2.0
python-magic==0.4.27
# Security
bcrypt==4.2.1
Flask-Talisman==1.1.0
Flask-Cors==4.0.0
# Production Server
gunicorn==20.1.0
gevent==23.9.1
# Monitoring
psutil==6.1.0
# Utilities
python-dotenv==1.0.1
# Development
black==24.4.2
flake8==7.0.0
pytest==8.2.0
pytest-cov==5.0.0