mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 05:05:38 -04:00
Replace fully client-side dashboard and title detail pages with server component orchestrators that fetch data directly via service functions, eliminating extra network round-trips through API routes. Each section streams independently through its own Suspense boundary. - Extract getUserStats(), getTitleWithChildren(), getRecommendationsForTitle() into service layer; update getNewAvailableFeed() to include tmdbId/voteAverage - Split dashboard into server sections (stats, continue watching, library, recommendations) with client children for animations - Split title page into server hero + client interaction provider with shared context for optimistic mutations across actions and seasons - Add generateMetadata with OG tags, server-side TMDB ID resolution via redirect(), loading.tsx and not-found.tsx for both pages - Add per-section skeleton components, fix ContinueWatchingSkeleton dimensions - Remove 6 unused API routes (feed/*, titles/[id] GET, titles/[id]/recommendations) - Remove components/stats-summary.tsx, add lib/types/title.ts for shared types Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
62 lines
1.3 KiB
TypeScript
62 lines
1.3 KiB
TypeScript
export interface Episode {
|
|
id: string;
|
|
episodeNumber: number;
|
|
name: string | null;
|
|
overview: string | null;
|
|
stillPath: string | null;
|
|
airDate: string | null;
|
|
runtimeMinutes: number | null;
|
|
}
|
|
|
|
export interface Season {
|
|
id: string;
|
|
seasonNumber: number;
|
|
name: string | null;
|
|
episodes: Episode[];
|
|
}
|
|
|
|
export interface AvailabilityOffer {
|
|
providerId: number;
|
|
providerName: string;
|
|
logoPath: string | null;
|
|
offerType: string;
|
|
}
|
|
|
|
export interface RecommendedTitle {
|
|
id: string;
|
|
tmdbId: number;
|
|
type: "movie" | "tv";
|
|
title: string;
|
|
posterPath: string | null;
|
|
releaseDate: string | null;
|
|
firstAirDate: string | null;
|
|
voteAverage: number | null;
|
|
}
|
|
|
|
export interface ColorPalette {
|
|
vibrant: string | null;
|
|
darkVibrant: string | null;
|
|
lightVibrant: string | null;
|
|
muted: string | null;
|
|
darkMuted: string | null;
|
|
lightMuted: string | null;
|
|
}
|
|
|
|
export interface ResolvedTitle {
|
|
id: string;
|
|
tmdbId: number;
|
|
type: "movie" | "tv";
|
|
title: string;
|
|
originalTitle: string | null;
|
|
overview: string | null;
|
|
releaseDate: string | null;
|
|
firstAirDate: string | null;
|
|
posterPath: string | null;
|
|
backdropPath: string | null;
|
|
popularity: number | null;
|
|
voteAverage: number | null;
|
|
voteCount: number | null;
|
|
status: string | null;
|
|
colorPalette: ColorPalette | null;
|
|
}
|