https://github.com/princeraj620/youtube-clone
A modern, full-featured YouTube clone built with Flask, MongoDB. Features: video upload, comments, likes, user authentication, responsive design. Tech: Python, Flask, MongoDB, Bootstrap, JavaScript.
https://github.com/princeraj620/youtube-clone
authentication bootstrap comments css3 drag-drop flask html5 javascript mongodb python real-time responsive-design social-media subscriptions video-sharing web-development youtube-clone-app
Last synced: 3 months ago
JSON representation
A modern, full-featured YouTube clone built with Flask, MongoDB. Features: video upload, comments, likes, user authentication, responsive design. Tech: Python, Flask, MongoDB, Bootstrap, JavaScript.
- Host: GitHub
- URL: https://github.com/princeraj620/youtube-clone
- Owner: princeraj620
- Created: 2025-06-16T23:19:15.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-16T23:51:39.000Z (about 1 year ago)
- Last Synced: 2025-06-17T00:28:12.423Z (about 1 year ago)
- Topics: authentication, bootstrap, comments, css3, drag-drop, flask, html5, javascript, mongodb, python, real-time, responsive-design, social-media, subscriptions, video-sharing, web-development, youtube-clone-app
- Language: CSS
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
<<<<<<< HEAD
# GrievanceGuardian
**AI-Powered Citizen Grievance Redressal & Tracking System**
GrievanceGuardian is a full-stack web platform that empowers citizens to submit complaints, track their progress in real time, and ensures government departments handle them efficiently, transparently, and on time. The system uses AI for smart categorization, priority scoring, and automatic routing, and leverages blockchain-inspired transparency for immutable records and audit trails.
## Features
- **User Registration & Login:** Citizens, officials, and admins
- **AI Complaint Analyzer:** NLP-based categorization, priority scoring, and department routing
- **Blockchain Transparency:** Immutable complaint records, smart contract logic for escalations
- **Real-Time Tracking:** Live status updates, notifications, and feedback system
- **Official Dashboard:** Department-wise complaint management and analytics
- **Token Rewards:** Earn tokens for feedback and engagement
- **Analytics:** Visualize complaint trends and department performance
- **Multi-language Ready:** Easily extendable for 22+ Indian languages
## Tech Stack
- **Frontend:** Jinja2 (Bootstrap 5, FontAwesome)
- **Backend:** Flask, Python, Flask-Login
- **Database:** MongoDB (Atlas or local)
- **AI/ML:** NLTK, TextBlob (NLP)
- **Blockchain:** Simulated with hashes and smart contract logic
- **Deployment:** Docker-ready, cloud deployable
## Setup Instructions
1. **Clone the repository:**
```bash
git clone
cd
```
2. **Install dependencies:**
```bash
pip install -r requirements.txt
```
3. **Set up MongoDB:**
- Use MongoDB Atlas or run a local MongoDB instance
- Update the MongoDB URI in `app.py` if needed
4. **Run the app:**
```bash
python app.py
```
5. **Access the app:**
- Open [http://localhost:5000](http://localhost:5000) in your browser
## Demo Accounts
- **Citizen:** `citizen1` / `password123`
- **Official:** `official1` / `password123`
- **Admin:** `admin` / `admin123`
## Project Structure
- `app.py` - Main Flask backend
- `templates/` - Jinja2 HTML templates
- `static/` - CSS, JS, images
- `uploads/` - File uploads
- `requirements.txt` - Python dependencies
## Contributing
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
## License
MIT
=======
# YouTube Clone - Real-Time Video Sharing Platform
> **🔍 SEO Keywords**: YouTube Clone, Flask Video Sharing, MongoDB Video Platform, Python Web App, Video Upload System, Social Media Clone
A modern, full-featured YouTube clone built with Flask, MongoDB, and modern web technologies. This application provides a complete video sharing platform with user authentication, video upload, streaming, comments, likes, and more.
## 🌟 **Why This YouTube Clone?**
- **Complete Feature Set**: User authentication, video upload, comments, likes, subscriptions
- **Modern Tech Stack**: Flask, MongoDB, Bootstrap 5, JavaScript ES6+
- **Responsive Design**: Works perfectly on desktop, tablet, and mobile
- **Production Ready**: Includes security features, error handling, and optimization
- **Easy Setup**: One-click installation and demo data included
## 🚀 Quick Start - One Click Setup!
### Option 1: Windows Users (Easiest!)
1. **Double-click** `start.bat` file
2. Wait for automatic setup to complete
3. Open your browser to `http://localhost:5000`
4. **That's it!** 🎉
### Option 2: All Platforms
1. **Run** `python start.py`
2. Wait for automatic setup to complete
3. Open your browser to `http://localhost:5000`
4. **That's it!** 🎉
### Option 3: Manual Setup
```bash
python -m venv venv
venv\Scripts\activate # Windows
source venv/bin/activate # macOS/Linux
pip install -r requirements.txt
python app.py
```
## 🎯 Demo Access
Once the application is running:
Live access - https://6a6e5bee-6df6-497c-96f4-acca8cea596e-00-zfrsh8m8eegx.sisko.replit.dev/
- **Main Site**: http://localhost:5000
- **Quick Demo Login**: http://localhost:5000/demo-login
- **Demo Credentials**:
- Username: `demo_user1`
- Password: `password123`
## 🚀 Features
### Core Features
- **User Authentication**: Secure registration and login system with bcrypt password hashing
- **Video Upload**: Drag-and-drop video upload with automatic thumbnail generation
- **Video Streaming**: HTML5 video player with support for multiple formats
- **Comments System**: Real-time commenting on videos
- **Like/Dislike System**: Interactive like and dislike functionality
- **User Channels**: Personal channel pages with subscriber system
- **Search Functionality**: Full-text search across video titles and descriptions
- **Trending Videos**: Algorithm-based trending video recommendations
### Modern UI/UX
- **Responsive Design**: Mobile-first responsive layout
- **Modern Interface**: Clean, YouTube-inspired design with smooth animations
- **Video Grid Layout**: Pinterest-style video grid with hover effects
- **Real-time Interactions**: AJAX-powered like/dislike and subscribe buttons
- **Loading States**: Smooth loading animations and feedback
### Technical Features
- **MongoDB Integration**: Scalable NoSQL database for video and user data
- **File Management**: Secure file upload with size and type validation
- **Thumbnail Generation**: Automatic video thumbnail creation
- **Session Management**: Flask-Login for secure user sessions
- **Error Handling**: Comprehensive error handling and user feedback
- **Sample Data**: Pre-loaded demo content for immediate testing
## 🛠️ Technology Stack
### Backend
- **Flask 3.0.0**: Python web framework
- **MongoDB**: NoSQL database with PyMongo
- **Flask-Login**: User session management
- **bcrypt**: Password hashing
- **MoviePy**: Video processing and thumbnail generation
- **Pillow**: Image processing
- **OpenCV**: Video frame extraction
### Frontend
- **Bootstrap 5**: CSS framework for responsive design
- **Font Awesome**: Icon library
- **JavaScript (ES6+)**: Modern JavaScript for interactivity
- **CSS3**: Custom styling with CSS Grid and Flexbox
### Development Tools
- **Python 3.8+**: Programming language
- **pip**: Package management
- **Git**: Version control
## 📋 Prerequisites
Before running this application, make sure you have:
- Python 3.8 or higher
- MongoDB database (local or cloud)
- FFmpeg (for video processing)
- Modern web browser
## 🚀 Installation & Setup
### Automatic Setup (Recommended)
The application includes automatic setup scripts that handle everything:
1. **Windows**: Double-click `start.bat`
2. **All Platforms**: Run `python start.py`
These scripts will:
- ✅ Check Python installation
- ✅ Create virtual environment
- ✅ Install all dependencies
- ✅ Create necessary directories
- ✅ Start the application
- ✅ Load sample data
### Manual Setup
If you prefer manual setup:
#### 1. Clone the Repository
```bash
git clone
cd Real-Time-Fire-Detection-Flask-App
```
#### 2. Create Virtual Environment
```bash
python -m venv venv
# On Windows
venv\Scripts\activate
# On macOS/Linux
source venv/bin/activate
```
#### 3. Install Dependencies
```bash
pip install -r requirements.txt
```
#### 4. MongoDB Setup
1. Create a MongoDB database (local or cloud)
2. Update the MongoDB connection string in `app.py`:
```python
client = MongoClient("your-mongodb-connection-string")
db = client["youtube_clone"]
```
#### 5. Environment Configuration
Create a `.env` file in the root directory:
```env
FLASK_SECRET_KEY=your-secret-key-here
MONGODB_URI=your-mongodb-connection-string
```
#### 6. Create Upload Directories
The application will automatically create the required directories:
- `uploads/videos/` - For video files
- `uploads/thumbnails/` - For video thumbnails
#### 7. Run the Application
```bash
python app.py
```
The application will be available at `http://localhost:5000`
## 📁 Project Structure
```
Real-Time-Fire-Detection-Flask-App/
├── app.py # Main Flask application
├── start.py # Python startup script
├── start.bat # Windows startup script
├── requirements.txt # Python dependencies
├── README.md # Project documentation
├── uploads/ # Upload directories
│ ├── videos/ # Video files
│ └── thumbnails/ # Video thumbnails
├── static/ # Static assets
│ ├── img/ # Images
│ ├── css/ # Stylesheets
│ └── js/ # JavaScript files
└── templates/ # HTML templates
├── base.html # Base template
├── index.html # Home page
├── login.html # Login page
├── register.html # Registration page
├── upload.html # Video upload page
├── video.html # Video watch page
├── channel.html # User channel page
├── search.html # Search results page
└── trending.html # Trending videos page
```
## 🎯 Key Features Explained
### User Authentication
- Secure registration with email validation
- Password hashing using bcrypt
- Session management with Flask-Login
- Protected routes for authenticated users
- **Demo login available for instant testing**
### Video Upload System
- Drag-and-drop file upload interface
- File type validation (MP4, AVI, MOV, MKV, WEBM)
- File size limits (500MB max)
- Automatic thumbnail generation from video frames
- Progress indicators and error handling
### Video Player
- HTML5 video player with custom controls
- Responsive design for all screen sizes
- Video quality selection (if available)
- Playback statistics tracking
### Social Features
- **Comments**: Real-time commenting system
- **Likes/Dislikes**: Interactive rating system
- **Subscriptions**: Channel subscription functionality
- **User Profiles**: Personal channel pages
### Search & Discovery
- Full-text search across video content
- Search result highlighting
- Trending video algorithm
- Related video recommendations
### Sample Data
- **Pre-loaded demo content**: 6 sample videos with realistic data
- **Demo users**: 3 sample accounts for testing
- **Sample comments**: Pre-existing comments on videos
- **View statistics**: Realistic view counts and engagement
## 🔧 Configuration
### Database Collections
The application uses the following MongoDB collections:
- `users` - User accounts and profiles
- `videos` - Video metadata and information
- `comments` - Video comments
- `likes` - User likes and dislikes
- `views` - Video view tracking
### File Upload Settings
- Maximum file size: 500MB
- Supported formats: MP4, AVI, MOV, MKV, WEBM
- Thumbnail generation: Automatic from video frames
- Storage: Local file system (can be extended to cloud storage)
## 🚀 Deployment
### Local Development
```bash
python app.py
```
### Production Deployment
For production deployment, consider:
1. **Web Server**: Use Gunicorn or uWSGI
```bash
pip install gunicorn
gunicorn -w 4 -b 0.0.0.0:5000 app:app
```
2. **Reverse Proxy**: Nginx for static file serving
3. **Cloud Storage**: AWS S3 or similar for video files
4. **CDN**: Content delivery network for global access
5. **SSL**: HTTPS certificate for security
### Environment Variables
```env
FLASK_ENV=production
FLASK_SECRET_KEY=your-production-secret-key
MONGODB_URI=your-production-mongodb-uri
```
## 🔒 Security Features
- Password hashing with bcrypt
- CSRF protection
- File upload validation
- SQL injection prevention (MongoDB)
- XSS protection
- Secure session management
## 📊 Performance Optimization
- Video thumbnail caching
- Database indexing for search
- Static file compression
- Lazy loading for video grids
- CDN integration ready
## 🤝 Contributing
1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Add tests if applicable
5. Submit a pull request
## 📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
## 🆘 Support
If you encounter any issues:
1. **Check the console** for error messages
2. **Verify MongoDB connection** is working
3. **Ensure all dependencies** are installed
4. **Check file permissions** for upload directories
5. **Try the demo login** at `/demo-login` to test functionality
## 🎉 What You Get Immediately
When you start the application, you'll have:
- ✅ **6 Sample Videos** ready to watch
- ✅ **3 Demo Users** to test with
- ✅ **Sample Comments** on videos
- ✅ **Realistic View Counts** and engagement metrics
- ✅ **Full Functionality** - upload, comment, like, subscribe
- ✅ **Responsive Design** that works on all devices
- ✅ **Modern UI** with smooth animations
## 🎯 Future Enhancements
- **Real-time Notifications**: WebSocket integration
- **Video Categories**: Content categorization
- **Advanced Search**: Filters and sorting options
- **Video Playlists**: User-created playlists
- **Live Streaming**: Real-time video streaming
- **Mobile App**: React Native or Flutter app
- **Analytics Dashboard**: Video performance metrics
- **Monetization**: Ad integration and premium features
## 🔍 **Related Projects & Alternatives**
Looking for other video sharing platforms or social media clones?
- **Instagram Clone**: Photo sharing platform
- **Twitter Clone**: Microblogging platform
- **Facebook Clone**: Social networking platform
- **TikTok Clone**: Short video platform
- **Netflix Clone**: Video streaming platform
## 📈 **Popularity & Usage**
This YouTube clone has been used by:
- **Students** learning web development
- **Developers** building portfolio projects
- **Startups** creating video platforms
- **Companies** testing video features
---
**🎉 Ready to use! Just run `start.bat` (Windows) or `python start.py` (All platforms) and enjoy your YouTube clone!**
**⭐ Star this repository if you found it helpful!**
>>>>>>> 69fd3cb497a186fc35fbc747bec116d14231234b