How yudswin/nettubebe works
Project type and purpose
• This is a standalone backend API server (no frontend code) written in TypeScript using Express.
• It serves as a media content management and streaming platform (“Nettube Backend”): handles user auth, content CRUD, streaming, favorites, history, reviews, genres, countries, collections.
• It targets two database environments (MySQL in development, Neon PostgreSQL in production) via Drizzle ORM.
• It integrates with external media and image-storage services (Cloudinary for video, Imgur for images).
File structure
• Top-level files: configuration (drizzle-dev, drizzle-production), build scripts, CLI helper (register-paths.js), seed script.
• src/index.ts: application entrypoint.
• src/routes → src/controllers → src/services → src/models: a classic layered architecture.
• src/db: database client initialization and external-service config (Cloudinary, Imgur).
• src/middleware: JWT auth, error handlers.
• src/libs, src/types: shared utilities (bcrypt, JWT, CORS, logging) and type definitions.
• src/data + seed.ts: static CSV/JSON used for bootstrapping.
• Config files: tsconfig.json, vercel.json (deployment), .env for secrets.
README for additional insights
• The README confirms Express + TypeScript + Drizzle ORM.
• It lists all feature endpoints (authentication, user avatar, watch history, favorites, media management, streaming proxy, content, genres, countries, cast, directors, persons, departments, reviews, collections).
• It details the migration workflow for dev vs prod and seeding.