A modern full-stack application combining YouTube-like video sharing with Twitter-style social features.
YouTweet is a comprehensive platform that allows users to:
- Upload and share videos with custom thumbnails
- Create and manage personal channels
- Post tweets and interact socially
- Subscribe to channels and build communities
- Like, comment, and engage with content
youtweet-frontend/
├── backend/ # Backend API (Node.js + Express + MongoDB)
│ ├── src/
│ │ ├── controllers/ # API controllers
│ │ ├── models/ # MongoDB models
│ │ ├── routes/ # API routes
│ │ ├── middlewares/ # Custom middlewares
│ │ └── utils/ # Utility functions
│ ├── package.json
│ └── README.md
├── src/ # Frontend React Application
│ ├── components/ # Reusable UI components
│ ├── pages/ # Page components
│ ├── store/ # Redux store and slices
│ ├── config/ # Configuration files
│ └── utils/ # Utility functions
├── package.json
└── README.md
- Runtime: Node.js
- Framework: Express.js
- Database: MongoDB with Mongoose
- Authentication: JWT tokens
- File Upload: Multer + Cloudinary
- Security: bcrypt, CORS
- Framework: React 18 with Vite
- State Management: Redux Toolkit
- Routing: React Router v6
- Styling: Tailwind CSS
- Forms: React Hook Form
- HTTP Client: Axios
- UI Components: Heroicons, Lucide React
- Node.js 16+ and npm
- MongoDB database
- Cloudinary account (for file storage)
-
Navigate to backend directory
cd backend -
Install dependencies
npm install
-
Environment Configuration
cp .env.sample .env
Update
.envwith your configuration:PORT=4000 MONGODB_URL=mongodb://localhost:27017/youtweet CORS_ORIGIN=http://localhost:5173 ACCESS_TOKEN_SECRET=your_access_token_secret ACCESS_TOKEN_EXPIRY=1d REFRESH_TOKEN_SECRET=your_refresh_token_secret REFRESH_TOKEN_EXPIRY=10d CLOUDINARY_CLOUD_NAME=your_cloudinary_name CLOUDINARY_API_KEY=your_cloudinary_key CLOUDINARY_API_SECRET=your_cloudinary_secret
-
Start backend server
npm run dev
-
Navigate to project root
cd .. -
Install dependencies
npm install
-
Environment Configuration
cp .env.example .env
Update
.env:VITE_API_BASE_URL=http://localhost:4000/api/v1
-
Start frontend development server
npm run dev
- Upload Videos: Upload videos with thumbnails and metadata
- Video Player: Custom video player with full controls
- Video Discovery: Browse, search, and filter videos
- Channel Management: Organize videos in personal channels
- Authentication: Secure registration and login
- User Profiles: Customizable profiles with avatars
- Channel Subscriptions: Subscribe to favorite channels
- Watch History: Track viewing history
- Tweet System: Post and manage tweets
- Interactions: Like videos, tweets, and comments
- Comments: Comment on videos and engage
- Social Feed: Discover content from subscriptions
- Responsive Design: Mobile-first responsive layout
- Dark Mode: Full dark theme support
- Modern Interface: Clean, intuitive design
- Real-time Updates: Live notifications and updates
POST /api/v1/users/register- User registrationPOST /api/v1/users/login- User loginPOST /api/v1/users/logout- User logoutPOST /api/v1/users/refresh-token- Refresh access token
GET /api/v1/videos- Get all videosPOST /api/v1/videos- Upload videoGET /api/v1/videos/:id- Get video by IDPATCH /api/v1/videos/:id- Update videoDELETE /api/v1/videos/:id- Delete video
GET /api/v1/users/current-user- Get current userGET /api/v1/users/c/:username- Get user channelPATCH /api/v1/users/update-account- Update user details
POST /api/v1/likes/toggle/v/:videoId- Toggle video likePOST /api/v1/subscriptions/c/:channelId- Toggle subscriptionPOST /api/v1/tweets- Create tweetGET /api/v1/tweets/user/:userId- Get user tweets
Use the provided Postman collection (Backend.postman_collection.json) to test API endpoints.
- Set up MongoDB Atlas or your preferred MongoDB hosting
- Configure Cloudinary for file storage
- Deploy to platforms like Heroku, Railway, or DigitalOcean
- Update environment variables for production
- Build the application:
npm run build - Deploy to platforms like Vercel, Netlify, or AWS S3
- Update API base URL for production
- 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 - see the LICENSE file for details.
- Design inspiration from modern video platforms
- MongoDB for database solutions
- Cloudinary for media management
- The React and Node.js communities
For support, email support@youtweet.com or create an issue in the repository.
Happy Coding! 🚀