How vubaolinh123/movie-fpoly works
Project type and purpose
• This is a Next.js–based full-stack web application (front-end + light SSR/backend integration) used as a movie discovery and streaming portal.
• It fetches data from TheMovieDB (TMDB) public API and from a separate custom backend (Node/Express API) for user-specific data (favorites, comments, profiles).
• Features include browsing movies/TV, authentication (NextAuth), user profile management, comments, favorites, and SSR/CSR pages.
File structure
Top-level directories and roles:
• pages/ ← Next.js routing (SSR, API routes)
– pages/api/auth/... ← NextAuth endpoints
– pages/... ← all site pages (home, movie, tv, category, account, admin)
• api/ ← front-end service wrappers for TMDB & backend REST calls
• app/ ← Next.js app entrypoints: root layout, hooks, Redux store setup
• components/ ← reusable UI components (Layout, Display, Movie, Shared, PrivateRouter)
• features/ ← Redux slices (auth, comment, favorite, products, user)
• models/ ← TypeScript interfaces / types
• public/ ← static assets
• styles/ ← global and module CSS/SCSS
Configuration & tooling files: next.config.js, tsconfig.json, .babelrc, Tailwind config, linting, etc.
README for additional insights
• Tech stack: Next.js, React, TypeScript, Tailwind, Ant Design, SWR, Redux Toolkit
• Integration points:
• NEXT_PUBLIC_TMDB_API_KEY & TMDB API URL
• NEXT_PUBLIC_API_BACKEND (custom backend)
• NextAuth for login (credentials/JWT)
• This is a team assignment demo with public URL, but architecturally it is a production-style SSR/CSR Next.js app.
Elements
• Browser → Next.js (page request)
• Components → Redux/SWR → API Layer → External APIs
• NextAuth flows for sign-in/sign-out
• UI (light blue)
• Data/State (yellow)
• Services (green)
• External APIs (orange)
Final advice
• Both SSR initial loads and CSR fetch patterns separately.
• Authentication flow (NextAuth) is distinctly highlighted (session cookie, JWT verification).