How jo-nike/clipforge works
ClipForge is a Plex-backed web application for monitoring playback sessions, previewing frames, creating and editing video clips, and managing stored media. The main flow runs from the browser through FastAPI routes into Plex lookup and clip processing, then persists clip records and serves protected files. Authentication, health/metrics, and bulk management are supporting branches. Relationships are limited to README workflows and the supplied source excerpts or index; unsampled implementations are not assumed to have specific call paths.
Main entry points: clip_service.py Clip processing · plex_service.py Plex integration · main.py Application server · auth.py Authentication routes
Components 23
Web interface
- Clip interface
frontend/static/js/app.js - Login interface
frontend/static/js/auth.js
API and access
- Application server
backend/main.py - Authentication routes
backend/api/v1/auth.py - Clip routes
backend/api/v1/clips.py - Session routes
backend/api/v1/sessions.py - Storage routes
backend/api/v1/storage.py - Request dependencies
backend/api/dependencies.py - Authentication service
backend/services/auth_service.py
Media workflow
- Plex integration
backend/services/plex_service.py - Clip processing
backend/services/clip_service.py - Domain schemas
backend/domain/schemas.py
Persistence and storage
- Secure file access
backend/services/secure_storage_service.py - Database
backend/infrastructure/database.py - Data repositories
backend/infrastructure/repositories.py
Platform services
- Security utilities
backend/core/security.py - Resilience controls
backend/core/resilience.py - Health service
backend/services/health_service.py - Metrics endpoint
backend/api/metrics_endpoint.py - Audit logging
backend/core/audit.py
Other components
- User
- Plex server
- FFmpeg
Connections 35
- User → Clip interface: uses
README.md - User → Login interface: signs in
README.md - Clip interface → Application server: requests
README.md - Login interface → Application server: authenticates
README.md - Application server → Authentication routes: registers routes
backend/main.py - Application server → Clip routes: registers routes
backend/main.py - Application server → Session routes: registers routes
backend/main.py - Application server → Storage routes: registers routes
backend/main.py - Authentication routes → Authentication service: authenticates with
backend/api/v1/auth.py - Authentication routes → Plex integration: validates Plex
backend/api/v1/auth.py - Authentication routes → Data repositories: accesses users
backend/api/v1/auth.py - Clip routes → Clip processing: requests processing
backend/api/v1/clips.py - Clip routes → Plex integration: gets media details
backend/api/v1/clips.py - Clip routes → Data repositories: manages clip records
backend/api/v1/clips.py - Session routes → Plex integration: fetches sessions
backend/api/v1/sessions.py - Session routes → Clip processing: requests snapshots
backend/api/v1/sessions.py - Storage routes → Secure file access: serves protected files
backend/api/v1/storage.py - Storage routes → Data repositories: reads media records
backend/api/v1/storage.py - Request dependencies → Clip processing: provides service
backend/api/dependencies.py - Request dependencies → Plex integration: provides service
backend/api/dependencies.py - Request dependencies → Secure file access: provides service
backend/api/dependencies.py - Plex integration → Plex server: queries sessions
backend/services/plex_service.py - Clip processing → FFmpeg: processes video
backend/services/clip_service.py - Clip processing → Data repositories: persists clips
backend/services/clip_service.py - Clip processing → Plex integration: uses media service
backend/services/clip_service.py - Data repositories → Database: reads and writes
backend/infrastructure/repositories.py - Secure file access → Database: queries media records
backend/services/secure_storage_service.py - Authentication service → Plex integration: validates credentials
backend/services/auth_service.py - Security utilities → Domain schemas: validates input
backend/domain/schemas.py - Health service → Database: checks database
backend/services/health_service.py - Metrics endpoint → Request dependencies: gets metrics
backend/api/metrics_endpoint.py - Metrics endpoint → Health service: reads summaries
backend/api/dependencies.py - Authentication routes → Audit logging: records events
backend/api/v1/auth.py - Clip routes → Audit logging: records events
backend/api/v1/clips.py - Clip processing → Resilience controls: uses safeguards
backend/services/clip_service.py