How stphnhthwy/feed works
Project type and purpose
• This is a full-stack Next.js application, bootstrapped with create-next-app, using Prisma to interact with a SQLite database.
• The app exposes a simple “posts” API (src/app/api/posts/route.ts), renders a feed page (src/app/feed/page.tsx), and serves static uploads (public/uploads).
File structure
• Top-level:
• src/app – Next.js “app” directory containing server and client code (pages, API routes, layouts, CSS).
• src/lib/db.ts – Prisma client instantiation.
• prisma – schema.prisma, migrations, and dev.db (SQLite).
• public/uploads – static assets (sample videos, user uploads).
• scripts/seed.ts – seed script to populate the database.
• config files: next.config.ts, eslint.config.mjs, postcss.config.mjs, tsconfig.json.
• Pattern: React + SSR/SSG pages in app/, serverless API routes under app/api, ORM layer in lib/db.ts, file-based routing.
README for additional insights
• Confirms a standard Next.js stack.
Details to capture
• SSR vs. client-side fetch distinction
• File-based routing paths (app/feed/page.tsx → /feed, app/api/posts/route.ts → /api/posts)
• Prisma’s role in schema management and migrations
• Static asset handling (public/uploads directory)
• Build/deploy pipeline (Next.js build → Vercel hosting)
• Prisma Client connected to “SQLite Dev Database (prisma/dev.db)”
• Annotation of external font optimization and Vercel deployment