How prajwal100/nepali_movies works
Main System Components
• Frontend Application (User Panel):
• Located under the “frontend” directory.
• Built using React, Redux; it contains components, actions, reducers, and pages (celebrity, movies, authentication, home, etc.).
• Acts as the client that consumes backend APIs.
• Admin Panel:
• Located under the “admin” directory.
• Also built in React/Redux, with its own set of actions, reducers, and views (dashboard, login, settings, etc.).
• Used for administrative tasks which may include managing movies, celebrities, and settings.
• Backend/API Server:
• Found in the “backend” folder, with an entry point like server.js or app.js.
• Contains Express configuration, routes (celebrityRoute.js, movieRoute.js, userRoute.js), controllers, models for movies, celebrities, users, settings, middleware for authentication, error handling, and utility functions.
• Implements JWT authentication and integrates with MongoDB through Mongoose.
• Database:
• Although not explicitly seen as a directory, the configuration under backend/config and models indicates MongoDB as the data store.
• External Assets and Themes:
• “startbootstrap-sb-admin-2-gh-pages” likely represents a static theme/template that could be used as a reference or for legacy design.
• “demo” folder and several CSS/SCSS, vendor, and public files are utilized to serve static assets.
Relationships and Interactions
• The Frontend and Admin panels interact with the backend API via HTTP requests. Data flows from the UI (React components) to Redux actions; these then call the Express endpoints.
• The backend server processes these requests by applying middleware (including JWT authentication) and invokes controllers that modify/read MongoDB data using Mongoose models.
• Static assets such as CSS, JavaScript, and images (found in the “public” directories of both frontend and admin) are served to the clients.
• There is a clear separation between the client-side logic and the server-side API, forming a typical three-tier architecture.
Architectural Patterns and Design Principles
• MVC-like Pattern in the Backend:
• Models represent the database schema.
• Controllers encapsulate the logic for handling client requests.
• Routes define the API endpoints.
• Separation of Concerns:
• Client interfaces (frontend and admin) are decoupled from backend business logic.
• Use of Redux for predictable state management on the client-side.
• RESTful API Design:
• Express routes imply a RESTful design, with different endpoints for movies, celebrities, users, etc.
• Security and Middleware:
• Incorporation of JWT authentication, error handling, and asynchronous error capture through middleware.
Technologies, Frameworks, and Libraries
• Frontend: React, Redux, JavaScript, CSS/SCSS, possibly additional libraries for charts and UI components.
• Backend: Node.js, Express, Mongoose (MongoDB), JWT for authentication.
• Build and Configuration: npm, package.json for dependencies in each sub-project (frontend, admin, backend).
• Additional: Theme assets from Startbootstrap SB Admin 2.