Create β’ Record β’ Share β’ Discover
Live Demo β’ Report Bug β’ Request Feature
SnapCast is a modern, full-stack video sharing platform that revolutionizes how you create, share, and discover video content. Built with cutting-edge technologies and designed for the modern web, SnapCast offers a seamless experience for both content creators and viewers.
- π₯ Built-in Screen Recording - Capture and share your screen instantly
- β‘ Lightning Fast - Powered by Next.js 15 with Turbopack
- π Enterprise Security - Arcjet protection with rate limiting and bot detection
- π Global CDN - Fast video delivery worldwide via Bunny CDN
- π± Fully Responsive - Perfect experience on all devices
- π¨ Modern UI/UX - Intuitive design with custom Satoshi font
- Upload & Share - Upload videos with custom thumbnails, titles, and descriptions
- Screen Recording - Built-in screen recorder with one-click capture
- Video Player - Custom player with advanced controls and playback options
- Auto Thumbnails - Automatic thumbnail generation from video content
- Privacy Controls - Public or private video visibility settings
- View Analytics - Track video views and engagement metrics
- Google OAuth - Secure sign-in with Google accounts
- Session Management - Persistent sessions with Better Auth
- Rate Limiting - Arcjet-powered API protection
- Bot Detection - Intelligent bot blocking and CAPTCHA
- CSRF Protection - Built-in security against attacks
- Data Encryption - Secure database with PostgreSQL
- Modern UI - Clean, intuitive interface with Tailwind CSS
- Responsive Design - Perfect on desktop, tablet, and mobile
- Custom Fonts - Premium Satoshi font family
- Search & Filter - Advanced search with multiple filters
- Pagination - Smooth navigation through video library
- User Profiles - Personalized profiles with avatars
- Next.js 15 - React framework with App Router
- React 19 - Latest React features
- TypeScript 5 - Type-safe development
- Tailwind CSS 4 - Utility-first styling
- Custom Components - Reusable component library
- Next.js API Routes - Full-stack API
- PostgreSQL - Neon serverless database
- Drizzle ORM - Type-safe database queries
- Better Auth - Modern authentication
- Edge Runtime - Fast API responses
- Bunny CDN - Global video delivery
- Arcjet - Security & rate limiting
- Vercel - Serverless deployment
- Neon DB - Serverless PostgreSQL
Before you begin, ensure you have:
- Node.js 18+ installed
- PostgreSQL database (we recommend Neon)
- Google OAuth credentials (Get them here)
- Bunny CDN account for video storage (Sign up)
- Arcjet API key for security (Get started)
-
Clone the repository
git clone https://github.com/shivaammmmpatel/SnapCast.git cd SnapCast -
Install dependencies
npm install
-
Set up environment variables
Create a
.envfile in the root directory:# Base URL NEXT_PUBLIC_BASE_URL=http://localhost:3000 # Better Auth BETTER_AUTH_SECRET=your_random_secret_here BETTER_AUTH_URL=http://localhost:3000 # Google OAuth GOOGLE_CLIENT_ID=your_google_client_id GOOGLE_CLIENT_SECRET=your_google_client_secret # Neon Database DATABASE_URL=postgresql://user:password@host/database # Bunny CDN BUNNY_STORAGE_ACCESS_KEY=your_storage_key BUNNY_LIBRARY_ID=your_library_id BUNNY_STREAM_ACCESS_KEY=your_stream_key # Arcjet Security ARCJET_API_KEY=your_arcjet_key
-
Set up the database
npm run db:push
-
Start the development server
npm run dev
-
Open your browser
Navigate to http://localhost:3000
SnapCast/
βββ app/ # Next.js App Router
β βββ (auth)/ # Authentication pages
β β βββ sign-in/ # Sign-in page
β βββ (root)/ # Main application
β β βββ page.tsx # Home/Dashboard
β β βββ upload/ # Video upload
β β βββ profile/ # User profiles
β β βββ video/ # Video player
β βββ api/ # API routes
β β βββ auth/ # Better Auth endpoints
β βββ globals.css # Global styles
βββ components/ # React components
β βββ header.tsx # Navigation header
β βββ VideoCard.tsx # Video thumbnail card
β βββ VideoPlayer.tsx # Custom video player
β βββ RecordScreen.tsx # Screen recorder
β βββ ... # Other components
βββ lib/ # Utilities & configs
β βββ actions/ # Server actions
β β βββ video.ts # Video CRUD operations
β βββ hooks/ # Custom React hooks
β βββ auth.ts # Better Auth config
β βββ auth-client.ts # Auth client setup
β βββ utils.ts # Helper functions
βββ drizzle/ # Database layer
β βββ db.ts # Database connection
β βββ schema-postgres.ts # PostgreSQL schema
β βββ migrations/ # DB migrations
βββ public/ # Static assets
β βββ assets/ # Images, icons, fonts
βββ fonts/ # Custom Satoshi fonts
βββ scripts/ # Utility scripts
- Click "Upload" in the navigation
- Choose "Record Screen" or "Upload File"
- Add title, description, and thumbnail
- Set visibility (Public/Private)
- Click "Upload" to publish
- Navigate to Upload page
- Click "Record Screen"
- Select screen/window to record
- Click Start Recording
- Stop when done and proceed to upload
- View all videos on the Home page
- Filter by newest, oldest, or most viewed
- Search videos by title
- Click on a video to watch
- Access your videos from your Profile
# Development
npm run dev # Start dev server with Turbopack
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint
# Database
npm run db:push # Push schema changes to database
npm run db:studio # Open Drizzle Studio (DB GUI)
npm run db:generate # Generate migrations
npm run db:migrate # Run migrations
# Utilities
npm run seed # Seed database with sample data-
Fork this repository to your GitHub account
-
Import to Vercel
- Go to Vercel
- Import your forked repository
- Vercel will auto-detect Next.js
-
Set Environment Variables
Add all required environment variables in Vercel dashboard:
BETTER_AUTH_URL=https://your-domain.vercel.appNEXT_PUBLIC_BASE_URL=https://your-domain.vercel.appDATABASE_URL= Your Neon database URL- Add all other variables from
.env
-
Update Google OAuth
Add your Vercel domain to Google OAuth:
- Authorized JavaScript origins:
https://your-domain.vercel.app - Authorized redirect URIs:
https://your-domain.vercel.app/api/auth/callback/google
- Authorized JavaScript origins:
-
Deploy!
Vercel will automatically deploy your app
Make sure these are set in your Vercel project:
- β
BETTER_AUTH_URL - β
BETTER_AUTH_SECRET - β
NEXT_PUBLIC_BASE_URL - β
DATABASE_URL - β
GOOGLE_CLIENT_ID - β
GOOGLE_CLIENT_SECRET - β
BUNNY_STORAGE_ACCESS_KEY - β
BUNNY_LIBRARY_ID - β
BUNNY_STREAM_ACCESS_KEY - β
ARCJET_API_KEY
We welcome contributions from the community! Here's how you can help:
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Commit your changes
git commit -m 'Add some amazing feature' - Push to the branch
git push origin feature/amazing-feature
- Open a Pull Request
- Follow the existing code style
- Write meaningful commit messages
- Add tests for new features
- Update documentation as needed
- Ensure all tests pass before submitting PR
- οΏ½ Bug fixes and improvements
- π Documentation updates
- π¨ UI/UX enhancements
- π§ͺ Test coverage
- π Internationalization (i18n)
- βΏ Accessibility improvements
This project is licensed under the MIT License - see the LICENSE file for details.
Special thanks to the amazing open-source projects that made SnapCast possible:
- Next.js - The React Framework for the Web
- Tailwind CSS - Utility-first CSS framework
- Drizzle ORM - TypeScript ORM for SQL databases
- Better Auth - Authentication for Next.js
- Arcjet - Security and rate limiting
- Bunny CDN - Global content delivery network
- Neon - Serverless Postgres
- Vercel - Platform for deploying Next.js apps
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Live Demo: snap-cast-taos.vercel.app
If you find SnapCast useful, please consider giving it a star on GitHub! It helps the project grow and motivates us to keep improving.