A full-stack video sharing platform built using the MERN stack where users can upload videos, authenticate securely, manage profiles, and interact with content.
- User Authentication (JWT)
- Access & Refresh Tokens
- Video Uploads
- Cloudinary Media Storage
- User Profiles
- Responsive Frontend
- REST API Backend
- MongoDB Database Integration
- React.js
- Vite
- Tailwind CSS
- Axios
- Node.js
- Express.js
- MongoDB
- Mongoose
- JWT Authentication
- Cloudinary
videotube/
│
├── backend/
│ ├── src/
│ ├── public/
│ ├── package.json
│ ├── .env.example
│
├── frontend/
│ ├── src/
│ ├── public/
│ ├── package.json
│
├── README.md
└── .gitignore
git clone https://github.com/yourusername/videotube.gitcd videotubecd backendnpm installIf dependency issues occur:
npm install --forceCreate a .env file inside the backend folder and add:
PORT=
MONGODB_URL=
CORS_ORIGIN=
ACCESS_TOKEN_SECRET=
ACCESS_TOKEN_EXPIRY=1d
REFRESH_TOKEN_SECRET=
REFRESH_TOKEN_EXPIRY=10d
CLOUDINARY_CLOUD_NAME=
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=npm run devBackend will start on:
http://localhost:8000
Move to frontend folder:
cd frontendnpm installnpm run devFrontend will start on:
http://localhost:5173
| Variable | Description |
|---|---|
| PORT | Server Port |
| MONGODB_URL | MongoDB Connection String |
| CORS_ORIGIN | Frontend URL |
| ACCESS_TOKEN_SECRET | JWT Access Token Secret |
| REFRESH_TOKEN_SECRET | JWT Refresh Token Secret |
| CLOUDINARY_CLOUD_NAME | Cloudinary Cloud Name |
| CLOUDINARY_API_KEY | Cloudinary API Key |
| CLOUDINARY_API_SECRET | Cloudinary API Secret |
- Never upload
.envfile to GitHub - Keep API keys private
- Rotate secrets if exposed publicly
npm run dev
npm startnpm run dev
npm run buildYou can deploy:
- Frontend → Vercel / Netlify
- Backend → Render / Railway
- Database → MongoDB Atlas
Contributions are welcome.
- Fork the repository
- Create a new branch
- Commit your changes
- Push the branch
- Open a Pull Request
This project is licensed under the MIT License.
Agrim Agrawal
GitHub: https://github.com/iagrimagrawal