How kishanwebdev/youtube-backend works
Project type and purpose
• This is a standalone backend service (RESTful API) implementing YouTube-style video features plus Twitter-style tweeting.
• Built with Node.js/Express, MongoDB for persistence, and Cloudinary for media storage.
File structure
• Entry points:
• src/index.js – spins up the Express app, connects to MongoDB.
• src/app.js – registers middleware, routes, global error handlers.
• Layers:
• routes/ – maps URL paths to controller functions.
• controllers/ – contains business logic for each domain (user, video, tweet, comment, like, playlist, subscription, dashboard, healthcheck).
• models/ – Mongoose schemas for each domain object.
• middlewares/ – authentication (JWT), file uploads (multer).
• utils/ – common helpers (ApiResponse, apiError, asyncHandler, cloudinary integration).
• Public/temp – placeholder for temporary uploads.
• Config files: .env.sample, vercel.json, package.json, etc.
Additional insights from README
• Core features: user management, video CRUD, tweet CRUD, subscriptions, playlists, likes, comments, dashboard stats, healthcheck.
• Tech stack: Node.js, Express.js, MongoDB, Cloudinary.