How enrique-diazv/watch-later-universal works
Watch Later Universal lets people discover films and series, inspect details and streaming availability, then maintain a personal watch library. The main journey runs from the React search and detail views through the API client to FastAPI’s catalog endpoints and TMDB; authenticated users can save and organize titles in PostgreSQL. Authentication adds verification, password recovery and rotating sessions. The README documents the production email integration. Some endpoint and service implementations were not excerpted, so links involving them rely only on the source index or README; unsampled behavior is not inferred.
Main entry points: api.ts API client · router.py Versioned router · auth.py Account endpoints · App.tsx React application
Components 30
Web experience
- React application
frontend/src/App.tsx - Search view
frontend/src/features/search/SearchPage.tsx - Media details
frontend/src/features/media/MediaDetailsPage.tsx - Personal library
frontend/src/features/library/LibraryPage.tsx - Account views
frontend/src/features/auth/AuthPage.tsx - Auth state
frontend/src/features/auth/AuthContext.tsx - API client
frontend/src/services/api.ts - API data types
frontend/src/types/api.ts
API workflows
- FastAPI application
backend/app/main.py - Versioned router
backend/app/api/v1/router.py - Catalog search
backend/app/api/v1/endpoints/search.py - Media details
backend/app/api/v1/endpoints/media.py - Watch providers
backend/app/api/v1/endpoints/providers.py - Library operations
backend/app/api/v1/endpoints/library.py
Identity services
- Account endpoints
backend/app/api/v1/endpoints/auth.py - Session tokens
backend/app/services/auth.py - Token security
backend/app/core/security.py - Email verification
backend/app/services/email_verification.py - Email delivery
backend/app/services/email.py
Catalog integration
- TMDB client
backend/app/integrations/tmdb/client.py
Persistence
- Catalog persistence
backend/app/services/catalog.py - Media records
backend/app/models/media.py - Library records
backend/app/models/library.py - User records
backend/app/models/user.py - Refresh tokens
backend/app/models/refresh_token.py - Database sessions
backend/app/db/session.py
Other components
- User browser
- Brevo email
- TMDB catalog
- PostgreSQL
Connections 42
- User browser → React application: uses
- React application → Search view: routes to
frontend/src/App.tsx - React application → Media details: routes to
frontend/src/App.tsx - React application → Personal library: routes to
frontend/src/App.tsx - React application → Account views: routes to
frontend/src/App.tsx - Account views → API client: requests
frontend/src/features/auth/AuthPage.tsx - Account views → Auth state: uses
frontend/src/features/auth/AuthPage.tsx - Auth state → API client: calls
frontend/src/features/auth/AuthContext.tsx - Search view → API client: searches
frontend/src/features/search/SearchPage.tsx - Media details → API client: loads details
frontend/src/features/media/MediaDetailsPage.tsx - Personal library → API client: manages items
frontend/src/features/library/LibraryPage.tsx - API client → API data types: uses types
frontend/src/services/api.ts - API client → FastAPI application: HTTP requests
- FastAPI application → Versioned router: mounts
backend/app/main.py - Versioned router → Catalog search: registers
backend/app/api/v1/router.py - Versioned router → Media details: registers
backend/app/api/v1/router.py - Versioned router → Watch providers: registers
backend/app/api/v1/router.py - Versioned router → Library operations: registers
backend/app/api/v1/router.py - Versioned router → Account endpoints: registers
backend/app/api/v1/router.py - Catalog search → TMDB client: queries
backend/app/api/v1/endpoints/search.py - Media details → TMDB client: fetches details
backend/app/api/v1/endpoints/media.py - Watch providers → TMDB client: fetches providers
backend/app/api/v1/endpoints/providers.py - TMDB client → TMDB catalog: requests catalog data
backend/app/integrations/tmdb/client.py - Library operations → Catalog persistence: uses
backend/app/api/v1/endpoints/library.py - Library operations → Media records: queries
backend/app/api/v1/endpoints/library.py - Library operations → Library records: manages
backend/app/api/v1/endpoints/library.py - Account endpoints → Session tokens: issues and rotates
backend/app/api/v1/endpoints/auth.py - Account endpoints → Email verification: verifies accounts
backend/app/api/v1/endpoints/auth.py - Account endpoints → Email delivery: sends messages
backend/app/api/v1/endpoints/auth.py - Email delivery → Brevo email: delivers via
- Account endpoints → Token security: hashes credentials
backend/app/api/v1/endpoints/auth.py - Session tokens → Token security: hashes tokens
backend/app/services/auth.py - Session tokens → Refresh tokens: persists tokens
backend/app/services/auth.py - Email verification → User records: updates account
backend/app/services/email_verification.py - Library operations → Database sessions: uses session
backend/app/api/v1/endpoints/library.py - Account endpoints → Database sessions: uses session
backend/app/api/v1/endpoints/auth.py - Database sessions → PostgreSQL: connects
- Catalog persistence → Media records: updates records
backend/app/services/catalog.py - Media records → PostgreSQL: stored in
- Library records → PostgreSQL: stored in
- User records → PostgreSQL: stored in
- Refresh tokens → PostgreSQL: stored in