How ins-vj/amber works
Project type and purpose
• Full-stack e-learning platform (“Amber”) combining a Next.js/TypeScript frontend with an Express.js backend.
• Purpose: allow users to upload, manage, and stream video lessons (M3U8) with adaptive quality, backed by cloud storage and a managed database.
File structure
A. Top-level “backend” directory
– src/controllers, src/routes, src/middlewares → Express MVC pattern
– prisma/ → Prisma ORM migrations & schema for Neon DB
– utils/ → shared helpers (ApiError, ApiResponse, asyncHandler, token, cloudinary)
– seed.js → initial DB data
B. “experimental” directory (sandbox proof-of-concept)
– experimental/backend → standalone Express demo for Cloudinary + Neon
– experimental/frontend → simple React demo with VideoUploader/VideoPlayer components
C. No production “frontend” folder is present in the tree, but README indicates a Next.js 14 TypeScript project under frontend/.
README for additional insights
• Frontend: Next.js 14 + TypeScript + Spline for 3D UI
• Backend: Express.js, Cloudinary for video storage/streaming, Neon for metadata
• Authentication via JWT (in middlewares)
• Streaming served via Cloudinary M3U8 endpoints, quality switching handled client-side
Elements
– Clear component labels (e.g., “Next.js App”, “Express API”, “Prisma Client”, “Cloudinary Storage”, “Neon DB”)
• Frontend: blue rectangle
• Backend/API: green rectangle
– Annotations for protocols (HTTP-REST, JWT auth headers, M3U8 HLS streaming) and ports (e.g., 3000, 8080)