Schema: - Add VideoPost model (muxUploadId, muxAssetId, muxPlaybackId, status, durationSecs, aspectRatio) linked 1-to-1 with Post - Add VideoStatus enum (PROCESSING/READY/ERROR) - Add PostType.VIDEO Backend: - src/lib/mux.ts — singleton Mux client + webhook secret - videos router: createUpload (Mux direct upload URL + PROCESSING post), getByPostId (status polling), updateCaption - POST /api/webhooks/mux: verifies signature; handles video.upload.asset_created (store muxAssetId), video.asset.ready (set READY + playbackId + fan-out to feed), video.asset.errored (set ERROR) - feed.ts + posts.byPetId: include videoPost in all post queries UI: - VideoUploadForm: drop zone → XHR PUT to Mux upload URL with progress bar; caption field; transitions to "Processing…" on success - VideoCard: PROCESSING shows spinner; READY renders MuxPlayer (HLS, orange accent); polls every 5s until status changes - PostTypeSheet: "Video Post" option added (between Photo and Milestone) - PostCard: VIDEO type renders VideoCard instead of image carousel Env vars: MUX_TOKEN_ID, MUX_TOKEN_SECRET, MUX_WEBHOOK_SECRET, NEXT_PUBLIC_APP_URL — placeholders added to .env.local Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
68 lines
1.8 KiB
JSON
68 lines
1.8 KiB
JSON
{
|
|
"name": "pawfeed",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"scripts": {
|
|
"dev": "next dev",
|
|
"build": "next build",
|
|
"start": "next start",
|
|
"lint": "eslint"
|
|
},
|
|
"prisma": {
|
|
"seed": "npx tsx prisma/seed.ts"
|
|
},
|
|
"dependencies": {
|
|
"@aws-sdk/client-s3": "^3.1062.0",
|
|
"@aws-sdk/s3-request-presigner": "^3.1062.0",
|
|
"@base-ui/react": "^1.5.0",
|
|
"@clerk/nextjs": "^7.4.3",
|
|
"@hookform/resolvers": "^5.4.0",
|
|
"@mux/mux-node": "^14.1.1",
|
|
"@mux/mux-player-react": "^3.13.0",
|
|
"@prisma/adapter-pg": "^7.8.0",
|
|
"@prisma/client": "^7.8.0",
|
|
"@prisma/extension-accelerate": "^3.0.1",
|
|
"@supabase/supabase-js": "^2.107.0",
|
|
"@tanstack/react-query": "^5.101.0",
|
|
"@trpc/client": "^11.17.0",
|
|
"@trpc/server": "^11.17.0",
|
|
"@trpc/tanstack-react-query": "^11.17.0",
|
|
"@upstash/redis": "^1.38.0",
|
|
"class-variance-authority": "^0.7.1",
|
|
"client-only": "^0.0.1",
|
|
"clsx": "^2.1.1",
|
|
"embla-carousel-react": "^8.6.0",
|
|
"lucide-react": "^1.17.0",
|
|
"next": "16.2.7",
|
|
"next-themes": "^0.4.6",
|
|
"pg": "^8.21.0",
|
|
"prisma": "^7.8.0",
|
|
"react": "19.2.4",
|
|
"react-dom": "19.2.4",
|
|
"react-hook-form": "^7.77.0",
|
|
"react-intersection-observer": "^10.0.3",
|
|
"server-only": "^0.0.1",
|
|
"shadcn": "^4.10.0",
|
|
"sonner": "^2.0.7",
|
|
"tailwind-merge": "^3.6.0",
|
|
"tw-animate-css": "^1.4.0",
|
|
"zod": "^4.4.3"
|
|
},
|
|
"devDependencies": {
|
|
"@tailwindcss/postcss": "^4",
|
|
"@types/node": "^20",
|
|
"@types/pg": "^8.20.0",
|
|
"@types/react": "^19",
|
|
"@types/react-dom": "^19",
|
|
"@vitejs/plugin-react": "^6.0.2",
|
|
"@vitest/coverage-v8": "^4.1.8",
|
|
"eslint": "^9",
|
|
"eslint-config-next": "16.2.7",
|
|
"jsdom": "^28.1.0",
|
|
"tailwindcss": "^4",
|
|
"tsx": "^4.22.4",
|
|
"typescript": "^6.0.3",
|
|
"vitest": "^4.1.8"
|
|
}
|
|
}
|