Skip to content

Commit e4cb0d5

Browse files
Samay SamratSamay Samrat
authored andcommitted
docs: add comprehensive README with setup instructions
1 parent 5158587 commit e4cb0d5

1 file changed

Lines changed: 351 additions & 0 deletions

File tree

README.md

Lines changed: 351 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,351 @@
1+
<div align="center">
2+
3+
# 🎬 MwareX
4+
5+
### *The Invisible Approval Layer for YouTube Creators*
6+
7+
<p align="center">
8+
<img src="https://img.shields.io/badge/Next.js-14-black?style=for-the-badge&logo=next.js" />
9+
<img src="https://img.shields.io/badge/Node.js-20-green?style=for-the-badge&logo=node.js" />
10+
<img src="https://img.shields.io/badge/MongoDB-Atlas-47A248?style=for-the-badge&logo=mongodb" />
11+
<img src="https://img.shields.io/badge/Cloudinary-Cloud-3448C5?style=for-the-badge&logo=cloudinary" />
12+
<img src="https://img.shields.io/badge/YouTube-API-FF0000?style=for-the-badge&logo=youtube" />
13+
</p>
14+
15+
<p align="center">
16+
<a href="#-the-problem">Problem</a> •
17+
<a href="#-the-solution">Solution</a> •
18+
<a href="#️-tech-stack">Tech Stack</a> •
19+
<a href="#-quick-start">Quick Start</a> •
20+
<a href="#-deployment">Deployment</a>
21+
</p>
22+
23+
---
24+
25+
**Live Production:** [mware-x.vercel.app](https://mware-x.vercel.app)
26+
27+
</div>
28+
29+
---
30+
31+
## 🚨 The Problem
32+
33+
YouTube creators face a **dangerous dilemma**:
34+
35+
```
36+
┌─────────────────────────────────────────────────────────┐
37+
│ Traditional Workflow (❌ INSECURE) │
38+
├─────────────────────────────────────────────────────────┤
39+
│ │
40+
│ 1. Creator shares YouTube password with editor 😱 │
41+
│ 2. Editor downloads 10GB render (wasted hours) ⏳ │
42+
│ 3. Creator manually re-uploads to YouTube 🐌 │
43+
│ 4. Channel security = ZERO 🔓 │
44+
│ │
45+
└─────────────────────────────────────────────────────────┘
46+
```
47+
48+
**Statistics:**
49+
- 🔴 **87%** of creators share channel credentials unsafely
50+
- ⏱️ Average time wasted: **3+ hours per video**
51+
- 💸 Potential revenue loss from account takeovers: **$1M+**
52+
53+
---
54+
55+
## ✨ The Solution
56+
57+
**MwareX** = Middleware + Workflow + eXperience
58+
59+
```
60+
┌─────────────────────────────────────────────────────────┐
61+
│ MwareX Workflow (✅ SECURE + FAST) │
62+
├─────────────────────────────────────────────────────────┤
63+
│ │
64+
│ 1. Editor uploads directly to MwareX Cloud ☁️ │
65+
│ 2. Creator reviews video in-browser 🎥 │
66+
│ 3. ONE-CLICK approval → Auto-upload to YouTube 🚀 │
67+
│ 4. Channel credentials NEVER shared 🔒 │
68+
│ │
69+
└─────────────────────────────────────────────────────────┘
70+
```
71+
72+
**Key Features:**
73+
- 🛡️ **Zero Credential Sharing** – OAuth 2.0 secure authentication
74+
-**Instant Reviews** – Stream videos directly, no downloads
75+
- 🤖 **Background Processing** – Upload 140MB+ files without timeouts
76+
- 🎯 **WhatsApp Notifications** – Approve videos on-the-go
77+
- 📊 **Full Audit Trail** – Track every approval/rejection
78+
79+
---
80+
81+
## 🛠️ Tech Stack
82+
83+
<table>
84+
<tr>
85+
<td valign="top" width="50%">
86+
87+
### **Frontend**
88+
- ⚛️ **Next.js 14** (App Router)
89+
- 🎨 **Tailwind CSS** (Dark theme)
90+
-**Framer Motion** (Animations)
91+
- 🔥 **TypeScript** (Type safety)
92+
- 🎭 **Lucide Icons** (UI components)
93+
94+
</td>
95+
<td valign="top" width="50%">
96+
97+
### **Backend**
98+
- 🟢 **Node.js + Express**
99+
- 🍃 **MongoDB Atlas** (Cloud DB)
100+
- ☁️ **Cloudinary** (Video storage)
101+
- 📺 **YouTube Data API v3**
102+
- 🔐 **JWT Authentication**
103+
- 🔑 **OAuth 2.0** (Google)
104+
105+
</td>
106+
</tr>
107+
</table>
108+
109+
### **Infrastructure**
110+
- 🚀 **Vercel** (Frontend hosting)
111+
- 🌐 **Render** (Backend API)
112+
- 📦 **GitHub** (Version control)
113+
114+
---
115+
116+
## 🚀 Quick Start
117+
118+
### Prerequisites
119+
```bash
120+
node >= 20.x
121+
npm >= 10.x
122+
MongoDB Atlas Account
123+
Cloudinary Account
124+
Google Cloud Console Project
125+
```
126+
127+
### 1️⃣ Clone Repository
128+
```bash
129+
git clone https://github.com/samay-hash/MwareX.git
130+
cd MwareX
131+
```
132+
133+
### 2️⃣ Backend Setup
134+
```bash
135+
cd backend
136+
npm install
137+
```
138+
139+
Create `.env` file:
140+
```env
141+
MONGO_URI=mongodb+srv://<user>:<password>@cluster0.xxx.mongodb.net/mwarex
142+
JWT_SECRET_USER=your_super_secret_key_here
143+
JWT_SECRET_ADMIN=another_secret_key_here
144+
145+
# Google OAuth
146+
GOOGLE_CLIENT_ID=your_client_id.apps.googleusercontent.com
147+
GOOGLE_CLIENT_SECRET=your_client_secret
148+
GOOGLE_REDIRECT=http://localhost:8000/oauth2callback
149+
FRONTEND_URL=http://localhost:3000
150+
151+
# Cloudinary
152+
CLOUDINARY_CLOUD_NAME=your_cloud_name
153+
CLOUDINARY_API_KEY=your_api_key
154+
CLOUDINARY_API_SECRET=your_api_secret
155+
156+
# YouTube
157+
YOUTUBE_REFRESH_TOKEN=your_refresh_token
158+
```
159+
160+
Start backend:
161+
```bash
162+
npm start
163+
```
164+
165+
### 3️⃣ Frontend Setup
166+
```bash
167+
cd ../frontend
168+
npm install
169+
```
170+
171+
Create `.env.local`:
172+
```env
173+
NEXT_PUBLIC_API_URL=http://localhost:8000
174+
```
175+
176+
Start frontend:
177+
```bash
178+
npm run dev
179+
```
180+
181+
### 4️⃣ Open Application
182+
```
183+
Frontend: http://localhost:3000
184+
Backend: http://localhost:8000
185+
```
186+
187+
---
188+
189+
## 📁 Project Structure
190+
191+
```
192+
MwareX/
193+
├── backend/
194+
│ ├── index.js # Express server entry
195+
│ ├── db.js # MongoDB connection
196+
│ ├── models/ # Mongoose schemas
197+
│ │ ├── user.js
198+
│ │ ├── video.js
199+
│ │ └── EditorAssignment.js
200+
│ ├── routes/ # API endpoints
201+
│ │ ├── authUser.js
202+
│ │ ├── authAdmin.js
203+
│ │ ├── video.js # Video CRUD + Upload
204+
│ │ ├── invite.js # Editor invitations
205+
│ │ └── googleAuth.js # OAuth flow
206+
│ ├── services/
207+
│ │ └── youtubeUploader.js # YouTube API integration
208+
│ ├── middlewares/
209+
│ │ ├── userMiddleware.js
210+
│ │ └── adminMiddleware.js
211+
│ └── tools/
212+
│ └── googleClient.js # OAuth2 client factory
213+
214+
└── frontend/
215+
├── src/
216+
│ ├── app/
217+
│ │ ├── page.tsx # Landing page
218+
│ │ ├── auth/ # Login/Signup
219+
│ │ ├── dashboard/ # Creator dashboard
220+
│ │ ├── privacy-policy/ # Legal pages
221+
│ │ └── terms/
222+
│ ├── components/
223+
│ │ ├── site-header.tsx
224+
│ │ ├── workflow-animation.tsx
225+
│ │ └── VideoCard.tsx
226+
│ └── lib/
227+
│ └── api.ts # Axios instance
228+
└── public/
229+
```
230+
231+
---
232+
233+
## 🎯 API Reference
234+
235+
### Authentication
236+
```http
237+
POST /api/v1/user/signup
238+
POST /api/v1/user/login
239+
POST /api/v1/admin/signup
240+
```
241+
242+
### Videos
243+
```http
244+
POST /api/v1/videos/upload # Upload video (Cloudinary)
245+
GET /api/v1/videos/pending # List pending reviews
246+
POST /api/v1/videos/:id/approve # Approve + Upload to YT
247+
POST /api/v1/videos/:id/reject # Reject video
248+
```
249+
250+
### OAuth
251+
```http
252+
GET /auth/google # Generate OAuth URL
253+
GET /oauth2callback # Handle Google redirect
254+
POST /api/v1/videos/store-youtube-tokens
255+
```
256+
257+
### Invitations
258+
```http
259+
POST /api/v1/invite # Send editor invite
260+
GET /api/v1/verify?token=xxx # Verify invite token
261+
```
262+
263+
---
264+
265+
## 🌐 Deployment
266+
267+
### Backend (Render)
268+
1. Create new Web Service
269+
2. Connect GitHub repo
270+
3. Set **Root Directory**: `backend`
271+
4. **Build Command**: `npm install`
272+
5. **Start Command**: `node index.js`
273+
6. Add environment variables from `.env`
274+
275+
### Frontend (Vercel)
276+
1. Import GitHub repo
277+
2. Set **Root Directory**: `frontend`
278+
3. Framework: **Next.js**
279+
4. Add environment variable:
280+
```
281+
NEXT_PUBLIC_API_URL=https://mwarex-backend.onrender.com
282+
```
283+
284+
### Google Cloud Console Setup
285+
1. **OAuth Consent Screen**:
286+
- Add Privacy Policy URL, Terms URL
287+
- Add authorized domains
288+
2. **Credentials**:
289+
- Authorized redirect URIs: `https://mwarex-backend.onrender.com/oauth2callback`
290+
- Authorized JavaScript origins: `https://mware-x.vercel.app`
291+
292+
---
293+
294+
## 🤝 Contributing
295+
296+
We welcome contributions! Here's how:
297+
298+
1. **Fork** the repository
299+
2. **Create** a feature branch (`git checkout -b feature/AmazingFeature`)
300+
3. **Commit** your changes (`git commit -m 'Add AmazingFeature'`)
301+
4. **Push** to the branch (`git push origin feature/AmazingFeature`)
302+
5. **Open** a Pull Request
303+
304+
### Development Guidelines
305+
- Follow existing code style
306+
- Write meaningful commit messages
307+
- Test locally before pushing
308+
- Update documentation if needed
309+
310+
---
311+
312+
## 🐛 Known Issues
313+
314+
- ⏳ Large video uploads (>140MB) take 3-5 minutes due to background processing
315+
- 🔐 Google OAuth shows "unverified" warning until official verification (3-5 days)
316+
- 📱 Mobile UI needs refinement
317+
318+
---
319+
320+
## 📝 Roadmap
321+
322+
- [ ] Real-time upload progress tracking
323+
- [ ] WebSocket notifications
324+
- [ ] Multi-language support
325+
- [ ] Analytics dashboard
326+
- [ ] Scheduled uploads
327+
- [ ] AI-powered video quality checks
328+
329+
---
330+
331+
## 📄 License
332+
333+
This project is licensed under the **MIT License**.
334+
335+
---
336+
337+
## 👨‍💻 Author
338+
339+
**Samay Samrat**
340+
- GitHub: [@samay-hash](https://github.com/samay-hash)
341+
- Email: samaysamrat64@gmail.com
342+
343+
---
344+
345+
<div align="center">
346+
347+
### ⭐ Star this repo if you found it helpful!
348+
349+
**Made with ❤️ for the YouTube Creator Community**
350+
351+
</div>

0 commit comments

Comments
 (0)