A modern video upload platform built with Next.js, enabling users to upload and manage their videos seamlessly.
- User Authentication: Secure login/signup with email/password and Google OAuth
- Video Upload: Video uploads with real-time processing
- Personal Dashboard: Manage your uploaded videos with delete functionality
- Responsive Design: Mobile-first design with Tailwind CSS
- Real-time Processing: Videos are uploaded to ImageKit immediately upon selection
- User Management: Complete user profile and video management system
- Frontend: Next.js 15, React, Tailwind CSS
- Backend: Next.js API Routes
- Database: MongoDB
- Authentication: NextAuth.js
- File Storage: ImageKit
- Language: TypeScript
-
Clone the repository
git clone https://github.com/Rupayan2005/Aurora.git cd video-platform -
Install dependencies
npm install # or yarn install -
Set up environment variables Create a
.env.localfile in the root directory:# Database MONGODB_URI=your_mongodb_connection_string # NextAuth NEXTAUTH_URL=http://localhost:3000 NEXTAUTH_SECRET=your_nextauth_secret # Google OAuth GOOGLE_CLIENT_ID=your_google_client_id GOOGLE_CLIENT_SECRET=your_google_client_secret # ImageKit IMAGEKIT_PUBLIC_KEY=your_imagekit_public_key IMAGEKIT_PRIVATE_KEY=your_imagekit_private_key IMAGEKIT_URL_ENDPOINT=your_imagekit_url_endpoint
-
Run the development server
npm run dev # or yarn dev -
Open your browser Navigate to http://localhost:3000
video-platform/
βββ app/ # Next.js 13+ App Router
β βββ api/ # API routes
β β βββ auth/ # Authentication API routes
β β βββ video/ # Video management API routes
β βββ login/ # Login page
β βββ register/ # Sign Up page
β βββ dashboard/ # User dashboard
β βββ components/ # Video upload page and Providers
β βββ layout.tsx # Root layout
β βββ page.tsx # Home page
β βββ globals.css # Global styles
βββ models/ # Database models
β βββ user.ts # User model
β βββ video.ts # Video model
βββ lib/ # Utility functions
βββ middleware.ts # Next.js middleware
βββ public/ # Static assets
- Login Page: Email/password and Google OAuth signin
- Signup Page: User registration with validation
- Home Page: Landing page with platform overview
- Dashboard: Personal video management interface
- Upload Page: Video upload with title and description fields
POST /api/auth/[...nextauth]- NextAuth.js authenticationGET /api/videos- Fetch user videosPOST /api/videos- Upload new videoDELETE /api/videos/[id]- Delete videoGET /api/user/profile- Get user profile
- User selects video file
- File immediately uploads to ImageKit
- User adds title and description
- Clicking "Publish" saves metadata to MongoDB
- Video appears in user dashboard
- Email/password authentication
- Google OAuth integration
- Protected routes with middleware
- Session management with NextAuth.js
- View all uploaded videos
- Delete videos (removes from both ImageKit and MongoDB)
- Video metadata display
- Responsive grid layout
- Middleware Protection: Secure routes requiring authentication
- Input Validation: Server-side validation for all inputs
- File Type Validation: Only video files accepted
- Session Management: Secure session handling with NextAuth.js
- Connect your GitHub repository to Vercel
- Add environment variables in Vercel dashboard
- Deploy automatically on push to main branch
- Build the project:
npm run build
- Start the production server:
npm start
{
email: string;
password: string;
provider: "credentials" | "google";
_id: mongoose.Types.ObjectId;
createdAt: Date;
updatedAt: Date;
}{
title: string;
description: string;
videoUrl: string;
thumbnailUrl: string;
fileId: string;
userId: string;
controls: boolean;
transformation: {
height: number;
width: number;
quality: number;
};
createdAt: Date;
updatedAt: Date;
}- Create an ImageKit account
- Get your public/private keys and URL endpoint
- Configure upload settings in ImageKit dashboard
- Set video upload permissions
- Create a MongoDB Atlas cluster
- Get connection string
- Add your IP to whitelist
- Create database and collections
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License.
- Next.js team for the amazing framework
- ImageKit for reliable video storage
- MongoDB for flexible database solutions
- NextAuth.js for seamless authentication
Built with β€οΈ by [Rupayan Auddya]