How techreagan/youtube-clone-nodejs-api works
VueTube is an Express REST API for a YouTube-style video and channel service. A client request enters the versioned API, reaches feature routes and controllers, and reads or changes MongoDB-backed records; protected operations use JWT authentication. The README also documents upload and watch actions, likes and dislikes, comments and replies, subscriptions, history, search, trending, and channel settings. Source excerpts and index references support the main route, controller, and model links; README-only capabilities are shown without asserting unverified implementation details.
Main entry points: Video.js Video records · app.js Express API · videos.js Video routes · auth.js Authentication
Components 28
API entry
- Express API
app.js - Auth routes
routes/auth.js - User routes
routes/users.js - Video routes
routes/videos.js - Search routes
routes/search.js
Identity and channels
- Authentication
controllers/auth.js - Channel settings
controllers/users.js - User records
models/User.js
Video catalog
- Video management
controllers/videos.js - Video records
models/Video.js - Categories
controllers/categories.js - Category records
models/Category.js - Video and channel search
controllers/search.js
Viewer engagement
- Comments
controllers/comments.js - Comment records
models/Comment.js - Replies
controllers/replies.js - Reply records
models/Reply.js - Likes and dislikes
controllers/feelings.js - Feeling records
models/Feeling.js - Subscriptions
controllers/subscriptions.js - Subscription records
models/Subscription.js - Watch history
controllers/histories.js - History records
models/History.js
Shared services
- JWT protection
middleware/auth.js - Paged results
middleware/advancedResults.js
Other components
- API client
- MongoDB
- SMTP email service
Connections 34
- API client → Express API: calls REST API
README.md - Express API → Auth routes: mounts routes
app.js - Express API → User routes: mounts routes
app.js - Express API → Video routes: mounts routes
app.js - Express API → Search routes: mounts routes
app.js - Auth routes → Authentication: dispatches to
routes/auth.js - User routes → Channel settings: dispatches to
routes/users.js - Video routes → Video management: dispatches to
routes/videos.js - Search routes → Video and channel search: dispatches to
routes/search.js - Auth routes → JWT protection: protects routes
routes/auth.js - User routes → JWT protection: protects routes
routes/users.js - Video routes → JWT protection: protects routes
routes/videos.js - Authentication → User records: reads and updates
controllers/auth.js - Authentication → SMTP email service: sends reset email
controllers/auth.js - Channel settings → User records: manages records
controllers/users.js - JWT protection → User records: loads user
middleware/auth.js - Video management → Video records: manages videos
controllers/videos.js - Categories → Category records: manages categories
controllers/categories.js - Video and channel search → Video records: searches videos
controllers/search.js - Video and channel search → User records: searches channels
controllers/search.js - Comments → Comment records: manages comments
controllers/comments.js - Comments → Video records: accesses video
controllers/comments.js - Replies → Reply records: manages replies
controllers/replies.js - Replies → Comment records: accesses comments
controllers/replies.js - Likes and dislikes → Feeling records: manages reactions
controllers/feelings.js - Likes and dislikes → Video records: updates video reactions
controllers/feelings.js - Subscriptions → Subscription records: manages subscriptions
controllers/subscriptions.js - Subscriptions → Video records: queries videos
controllers/subscriptions.js - Watch history → History records: manages history
controllers/histories.js - Watch history → Video records: queries videos
controllers/histories.js - Video routes → Paged results: applies pagination
routes/videos.js - Paged results → MongoDB: queries model
- Authentication → MongoDB: persists user data
- Video management → MongoDB: persists video data