How jahnu05/ad-sphere works
Frontend (in the "frontend" directory) – A React-based client-side application.
2. Backend (in the "server" directory) – A Node.js/Express server with models, routes, and supporting utilities.
Main Components
• Frontend Client: The React application (located in the "frontend" folder) handles user interaction, routing, and rendering of various pages/components (e.g., HomePage, Login, SignUp, multiple dashboards such as AdminHome, AdvertiserHome, etc.).
• Backend Server: The Node.js/Express server (located in the "server" folder) is responsible for handling API requests, interacting with data models (advertisment, customer, question, response, and user), and serving JSON data or processing form submissions.
• Database / Data Source: Although an explicit database isn’t mentioned, the presence of data files (for example in "server/data/relatedCategories.json") and the defined models suggest that a database (or at least a persistent data layer) is involved.
• External Services & Utilities: There are utility functions and possible integrations with other services (for example using nodemon for development, external modules listed in package.json files, etc.).
Analyzing the File Structure
• The "frontend" directory contains the complete React application with its own README, configuration files, public assets (index.html, manifest, etc.), and a "src" folder that includes pages, components, stylesheets, and dashboard-specific files.
• The "server" directory contains:
• “models”: JavaScript files that define the data schema for entities like advertisement, customer, etc.
• “routes”: API endpoints for handling advertisements, forms, and user authentication.
• "utils": Utility scripts (such as mapOrders.js and utils.js) for supporting different functionalities.
• "data" and "images": Additional resources that the backend may serve or use.
• “server.js”: Likely the entry point that sets up the Express server and connects all parts.
• There are separate package.json and package-lock.json files for both frontend and server, indicating independent dependency management and build processes.