How peiyan0/chromashift works
ChromaShift is a color-vision accessibility platform for personalized media remapping, calibration, and WCAG auditing. Users enter through the web app, calibrate a vision profile, then upload media for browser-side video processing or backend media handling; audits and research are separate product flows. The graph combines documented rendering branches with evidenced frontend and API wiring. Some backend media, compliance, and rendering implementations were not sampled, so their internal call relationships are omitted or marked unverified.
Main entry points: api.py API router · App.tsx App routes · DragDropUpload.tsx Media upload · main.py FastAPI app
Components 26
Web experience
- App routes
frontend/src/App.tsx - Media hub
frontend/src/components/DashboardHistory.tsx
Vision personalization
- Vision calibration
frontend/src/components/CalibrationWizard.tsx - Vision assessment
frontend/src/components/VisionTest.tsx - Profile client
frontend/src/services/profile.ts
Media rendering
- Media upload
frontend/src/components/DragDropUpload.tsx - Local video
frontend/src/components/ClientSideVideoProcessor.tsx - Semantic masks
frontend/src/services/ai_preview.ts - SLIC fallback
frontend/src/services/fallback_slic.ts - Media client
frontend/src/services/media.ts - Inference service
backend/app/services/inference.py - Audit analyzer
backend/app/services/compliance_analyzer.py
Backend API
- API client
frontend/src/services/api.ts - FastAPI app
backend/app/main.py - API router
backend/app/api/v1/api.py - Media endpoints
backend/app/api/v1/endpoints/media.py - Inference endpoint
backend/app/api/v1/endpoints/inference.py - Compliance audits
backend/app/api/v1/endpoints/compliance.py - Authentication
backend/app/api/v1/endpoints/auth.py - Auth dependencies
backend/app/api/deps.py - Research studies
backend/app/api/v1/endpoints/research.py
Persistence and services
- Domain records
backend/app/db/models.py - Database sessions
backend/app/db/session.py - Object storage
backend/app/services/storage.py - Retention cleanup
backend/app/services/cleanup.py
Other components
- User
Connections 35
- User → App routes: uses
- App routes → Media hub: routes to
frontend/src/App.tsx - App routes → Media upload: routes to
frontend/src/App.tsx - App routes → Vision calibration: routes to
frontend/src/App.tsx - App routes → Vision assessment: routes to
frontend/src/App.tsx - Media upload → Media client: calls
frontend/src/components/DragDropUpload.tsx - Media upload → Profile client: calls
frontend/src/components/DragDropUpload.tsx - Media upload → Local video: renders
frontend/src/components/DragDropUpload.tsx - Local video → Semantic masks: calls
frontend/src/components/ClientSideVideoProcessor.tsx - Semantic masks → SLIC fallback: falls back
frontend/src/services/ai_preview.ts - Vision assessment → Vision calibration: uses
frontend/src/components/VisionTest.tsx - Vision assessment → Profile client: calls
frontend/src/components/VisionTest.tsx - Vision calibration → Profile client: updates profile
- Media client → API client: calls
frontend/src/services/media.ts - Profile client → API client: calls
frontend/src/services/profile.ts - API client → FastAPI app: HTTP requests
frontend/src/services/api.ts - FastAPI app → API router: mounts
backend/app/main.py - API router → Media endpoints: registers
backend/app/api/v1/api.py - API router → Inference endpoint: registers
backend/app/api/v1/api.py - API router → Compliance audits: registers
backend/app/api/v1/api.py - API router → Authentication: registers
backend/app/api/v1/api.py - API router → Research studies: registers
backend/app/api/v1/api.py - Inference endpoint → Inference service: calls
backend/app/api/v1/endpoints/inference.py - Compliance audits → Audit analyzer: analyzes with
- Authentication → Object storage: uses
backend/app/api/v1/endpoints/auth.py - Authentication → Database sessions: queries
backend/app/api/v1/endpoints/auth.py - Authentication → Domain records: reads and writes
backend/app/api/v1/endpoints/auth.py - FastAPI app → Retention cleanup: schedules
backend/app/main.py - Retention cleanup → Object storage: deletes objects
backend/app/services/cleanup.py - Retention cleanup → Domain records: cleans records
backend/app/services/cleanup.py - FastAPI app → Database sessions: opens sessions
backend/app/main.py - Auth dependencies → Database sessions: gets session
backend/app/api/deps.py - Auth dependencies → Domain records: resolves user
backend/app/api/deps.py - User → Compliance audits: requests WCAG audit
- User → Research studies: participates