A video sharing platform for Piramal Finance.
- Video upload with thumbnail
- Admin panel for content management
- User authentication and authorization
- Video playback
- Responsive design
- Frontend: React, TailwindCSS, Framer Motion
- Backend: Node.js, Express
- Database: MongoDB
- Authentication: JWT
- Node.js (v14 or higher)
- MongoDB (local or Atlas)
- Clone the repository:
git clone https://github.com/yourusername/sphurti-tube.git
cd sphurti-tube- Install dependencies:
# Install backend dependencies
cd backend
npm install
# Install frontend dependencies
cd ../frontend
npm install- Create a
.envfile in the backend directory:
PORT=5000
MONGO_URI=mongodb://localhost:27017/sphurti-tube
JWT_SECRET=your_jwt_secret
- Start the backend server:
cd backend
npm run dev- Start the frontend development server:
cd frontend
npm start- Create an admin user:
cd backend
npm run create-adminThis will create an admin user with the following credentials:
- Email: [email protected]
- Password: admin123
- Open your browser and navigate to
http://localhost:3000 - Log in with the admin credentials
- Use the admin panel to upload videos and manage content
sphurti-tube/
├── backend/
│ ├── config/
│ ├── controllers/
│ ├── middleware/
│ ├── models/
│ ├── routes/
│ ├── scripts/
│ ├── uploads/
│ └── server.js
├── frontend/
│ ├── public/
│ └── src/
│ ├── components/
│ ├── context/
│ ├── hooks/
│ ├── pages/
│ ├── services/
│ └── styles/
└── README.md
POST /api/users/register- Register a new userPOST /api/users/login- Login userGET /api/users/me- Get current user
GET /api/videos- Get all videosGET /api/videos/trending- Get trending videosGET /api/videos/:id- Get a single videoPOST /api/videos- Create a new video (requires authentication)PUT /api/videos/:id- Update a video (requires authentication)DELETE /api/videos/:id- Delete a video (requires authentication)POST /api/videos/:id/thumbnail- Upload a thumbnail for a video (requires authentication)PUT /api/videos/:id/like- Like a video (requires authentication)PUT /api/videos/:id/dislike- Dislike a video (requires authentication)
- Clean, Modern UI with intuitive navigation
- Smooth Video Playback with a distraction-free player
- Easy Content Management through an admin panel
- High Performance & Scalability optimized for fast loading
- Dark/Light Theme toggle for user preference
- Responsive Design for all device sizes
- Frontend: React.js, Tailwind CSS, Framer Motion
- Backend: Node.js (Express.js)
- Database: MongoDB (Mongoose ORM)
sphurti-tube/
├── frontend/ # React.js frontend
│ ├── public/ # Static assets
│ └── src/
│ ├── components/ # Reusable UI components
│ ├── pages/ # Page components
│ ├── hooks/ # Custom React hooks
│ ├── context/ # Context providers
│ ├── services/ # API service functions
│ ├── utils/ # Utility functions
│ ├── assets/ # Images, icons, etc.
│ └── styles/ # Global styles
│
└── backend/ # Node.js/Express backend
├── controllers/ # Request handlers
├── models/ # Mongoose models
├── routes/ # API routes
├── middleware/ # Custom middleware
├── config/ # Configuration files
├── utils/ # Utility functions
└── server.js # Entry point
- Node.js (v14 or higher)
- MongoDB (local or Atlas)
-
Clone the repository:
git clone https://github.com/yourusername/sphurti-tube.git cd sphurti-tube -
Install backend dependencies:
cd backend npm install -
Install frontend dependencies:
cd ../frontend npm install -
Create a
.envfile in the backend directory with the following variables:NODE_ENV=development PORT=5000 MONGO_URI=mongodb://localhost:27017/sphurti-tube JWT_SECRET=your_jwt_secret_key_here JWT_EXPIRE=30d
-
Start the backend server:
cd backend npm run dev -
Start the frontend development server:
cd frontend npm start -
Open your browser and navigate to
http://localhost:3000
GET /api/videos- Get all videos (with pagination)GET /api/videos/trending- Get trending videosGET /api/videos/:id- Get a single videoPOST /api/videos- Create a new video (requires authentication)PUT /api/videos/:id- Update a video (requires authentication)DELETE /api/videos/:id- Delete a video (requires authentication)PUT /api/videos/:id/like- Like a videoPUT /api/videos/:id/dislike- Dislike a video
This project is licensed under the MIT License - see the LICENSE file for details.