A full-stack SaaS-style video compression and management platform built with Next.js 16, Clerk Auth, Prisma, PostgreSQL, Cloudinary, and Vercel.
Users can upload videos, automatically compress them using Cloudinary, preview & play them, download compressed versions, and delete videos (both from Cloudinary & database).
Includes a clean dashboard UI, sidebar navigation, protected routes, and full authentication system.
- Login & Signup using Clerk
- Protected routes with middleware
- Auto-redirect based on login state
- Secure logout with redirect
- Upload high-quality videos
- Auto-compression with Cloudinary
- Save metadata to database:
- Title
- Description
- Duration
- Original Size
- Compressed Size
- Cloudinary Public ID
- Click thumbnail → Full-screen video player
- Background preview video pauses automatically
- Close button fully stops playback
- Download compressed videos with one click
- Deletes from Cloudinary
- Deletes from Prisma Database
- Sidebar navigation
- User avatar + details
- Logout button
- Modern UI (TailwindCSS + DaisyUI)
| Layer | Technology |
|---|---|
| Frontend | Next.js 16, TypeScript, TailwindCSS, DaisyUI |
| Auth | Clerk |
| Storage | Cloudinary |
| Database | PostgreSQL |
| ORM | Prisma 6 |
| Deployment | Vercel |
/app
├── home/
├── video-upload/
├── api/
│ ├── videos/
│ ├── video-upload/
│ └── delete-video/
├── layout.tsx
└── page.tsx (redirect)
/components
├── VideoCard.tsx
├── VideoPlayerModal.tsx
└── Layout/
└── AppLayout.tsx
/prisma
└── schema.prisma
/types
└── Video.ts
Create .env file:
# Clerk Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_key
CLERK_SECRET_KEY=your_secret
# Cloudinary
NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
# PostgreSQL Database
DATABASE_URL=postgresql://username:password@host:5432/dbname
npx prisma generatenpx prisma migrate deploynpm install
npm run devApp will run at:
http://localhost:3000
Everything builds automatically:
- Next.js app
- Prisma client
- Server routes
- Cloudinary functions
Cloudinary env variables missing or incorrect.
Use:
signOut({ redirectUrl: "/sign-in" });Make sure you are using:
generator client {
provider = "prisma-client-js"
engineType = "binary"
}Cloudinary free plan timeout → upgrade or reduce file size.
- Multi-video upload
- Video trimming
- AI thumbnails
- Analytics dashboard
- Cloudflare R2 support
If this project helped you, consider giving it a star ⭐!