How gu-web-dev-2024/fullstack-app-example works
Main Components
• Frontend Component: Represent the React client housed under the “frontend” directory. Note that this includes the “src” folder (with App.js, index.js, etc.) for React components and the “public” folder for static assets.
• Backend Component: Represent the Node.js/Express server from the “backend” directory. Focus on the “server.js” file that sets up the API endpoints (e.g., the /api/project route) and the Express middleware.
• Root-Level Coordination: Although there is a root package.json (and scripts to run both backend and frontend concurrently), this mainly orchestrates the two parts rather than representing a distinct runtime server.
Relationships and Interactions
• That the backend, having its own API routes (like the sample /api/project route), responds with JSON data.
• Details on how CORS is configured to allow cross-domain communication between client (localhost:3000) and server (localhost:5000).
Architectural Patterns
• Separation of Concerns: Emphasize a clear separation between the client-side (React) and server-side (Express) functionalities.
• Modular Structure Demonstrated by the file tree: Both “frontend” and “backend” have independent package.json files and node_modules directories driving focused dependency management.
Relevant Technologies
• Client-Side: React (including supporting libraries like react-dom and testing libraries from the src directory) and static assets served from the “public” directory.
• Server-Side: Node.js, Express, and any middleware (like CORS) configured in server.js.
• Tooling: npm for dependency management and concurrently (as noted in the README) for running both servers simultaneously.