How kl3init/course-hub-frontend works
Project type and purpose
• This is a full-stack, client-centric “Comprehensive Learning Platform” built with Next.js (App Router), React, TypeScript, and Tailwind CSS.
• The README describes an educational portal with course catalog, learning modules, admin/manager dashboards, payments, analytics, and user/auth management.
• It’s deployed to Vercel and synchronized via v0.dev; the front end consumes REST/WS microservices (“services/*.ts”) for all business domains (courses, payments, users, reports, etc.).
File structure
• Top-level config & environment: .env.*, next.config.mjs, postcss.config.mjs, tailwind.config.ts, package.json, tsconfig.json.
• “app/” contains Next.js page routes (App Router) for public (courses, login, register), learner (“learn/…”), admin (“app/admin/…”), manager (“app/manager/…”), payment flows, profile, etc.
• “components/” is organized by feature domain (auth, admin, manager, learning, payment, profile, UI primitives).
• “services/” holds typed HTTP client wrappers for each backend API domain plus a WebSocket service.
• “context/” & “hooks/” provide global state, auth guard, custom React hooks (debounce, video player, course data, toast, mobile).
• “styles/” & “public/assets” for static styling and assets.
• Utilities (“lib/”, “utils/”) and domain types (“types/”) for shared functions and TypeScript models.
README for additional insights
• No explicit backend code lives here; the front end relies on external v0.dev–deployed APIs.
• Deployment is on Vercel; continuous sync with v0.dev chat-based builder.
Capturing essential architectural elements
• Cover all major domains: auth, course management, learning, payments, admin analytics, reporting.
• How dynamic routing in /app triggers code splitting and SSR/SSG.
• Don’t omit the WebSocket channel for real-time notifications/analytics.