A full-stack Next.js video-sharing app with ImageKit uploads
Uploading to ImageKit
01Overview
A full-stack video-sharing app built entirely in Next.js with TypeScript. Users register and log in with NextAuth, upload vertical videos to ImageKit, and browse a feed of the latest uploads. User and video data are stored in MongoDB through Mongoose, and routes are protected by middleware.
02The Challenge
Learn full-stack Next.js end-to-end — auth, protected API routes, a database, and secure direct-to-CDN media uploads — in a single TypeScript codebase.
03Key Features
04Technical Implementation
App Router API routes: /api/auth (register + NextAuth), /api/imageKit-auth (upload signatures) and /api/Video (GET feed, POST new video behind getServerSession).
Typed Mongoose models (User, Video) with a shared database connection helper.
next-auth middleware (withAuth) guards every route except login, register and auth endpoints.
Work in progress — the core flow is built; UI polish and deployment are next.