How gagan987123/movie-search works
Project type and purpose
• This is a monorepo hosting a full-stack “Movie Search” web application.
• The backend (Backend/) is a Node.js/Express API server with MVC-style controllers, JWT authentication, MongoDB persistence via Mongoose, and Swagger documentation.
• The frontend (movie-searcher-fav/) is a React single-page application (SPA) built with Vite, using context/hooks and Axios to call the backend.
File structure
• Top-level:
• Backend/ – all server-side code (app.js, controllers/, middleware/, models/, routes/, services/, swagger.yaml)
• movie-searcher-fav/ – React app (src/, public/, index.html, Vite config, ESLint)
• docs_Backend/ – auto-generated Markdown docs for each backend module
• .windsurf/ – documentation/workflow scripts (autodoc, confluence publisher)
• Backend sub-structure follows a clear MVC + service-layer pattern.
• React side uses a component/context/store structure, with a services/api.js wrapper for HTTP calls.
README for additional insights
• Purpose: register/login/logout, search TMDb for movies/TV shows, view details.
• Key tech: Express, JWT, MongoDB, Swagger JsDoc, React, Vite, Axios.
• External dependency: TMDb REST API.
Detail
• Routes: authRoutes, movieRoutes, tvRoutes
• Controllers: authController, movieController, tvController
• Middleware: authMiddleware
• Services: TMDb API wrapper
• Models: User, People
• On the frontend side, show Context Providers, key pages (Home, Search, Favorites, AuthScreen), and the services/api.js call path.
• JWT flow: login request → token issued → token stored in client context/localStorage → token sent on protected API calls → middleware verifies.