mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 01:35:39 -04:00
Implement full Couch Potato movie & TV tracking app
Add all 10 milestones: Drizzle ORM + SQLite database with WAL mode, Better Auth email/password authentication, TMDB API integration for search and metadata import, TV season/episode caching, user tracking (watchlist/status/watches/ratings with auto-transitions), discovery feeds (continue watching, library, recommendations), US streaming availability via TMDB providers, background job scheduler with instrumentation hook, and dark cinema-themed frontend with DM Serif Display + DM Sans typography and amber accent design system. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { NextResponse } from "next/server";
|
||||
import { AuthError, requireAuth } from "@/lib/api/auth-guard";
|
||||
import { unauthorized } from "@/lib/api/errors";
|
||||
import { getContinueWatchingFeed } from "@/lib/services/discovery";
|
||||
|
||||
export async function GET() {
|
||||
let userId: string;
|
||||
try {
|
||||
userId = await requireAuth();
|
||||
} catch (e) {
|
||||
if (e instanceof AuthError) return unauthorized();
|
||||
throw e;
|
||||
}
|
||||
const feed = getContinueWatchingFeed(userId);
|
||||
return NextResponse.json(feed);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
import type { NextRequest } from "next/server";
|
||||
import { NextResponse } from "next/server";
|
||||
import { AuthError, requireAuth } from "@/lib/api/auth-guard";
|
||||
import { unauthorized } from "@/lib/api/errors";
|
||||
import { getNewAvailableFeed } from "@/lib/services/discovery";
|
||||
|
||||
export async function GET(req: NextRequest) {
|
||||
let userId: string;
|
||||
try {
|
||||
userId = await requireAuth();
|
||||
} catch (e) {
|
||||
if (e instanceof AuthError) return unauthorized();
|
||||
throw e;
|
||||
}
|
||||
const days = Number(req.nextUrl.searchParams.get("days") ?? 14);
|
||||
const feed = getNewAvailableFeed(userId, days);
|
||||
return NextResponse.json(feed);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import { NextResponse } from "next/server";
|
||||
import { AuthError, requireAuth } from "@/lib/api/auth-guard";
|
||||
import { unauthorized } from "@/lib/api/errors";
|
||||
import { getRecommendationsFeed } from "@/lib/services/discovery";
|
||||
|
||||
export async function GET() {
|
||||
let userId: string;
|
||||
try {
|
||||
userId = await requireAuth();
|
||||
} catch (e) {
|
||||
if (e instanceof AuthError) return unauthorized();
|
||||
throw e;
|
||||
}
|
||||
const feed = getRecommendationsFeed(userId);
|
||||
return NextResponse.json(feed);
|
||||
}
|
||||
Reference in New Issue
Block a user