How shreyasikhar/react-ecommerce works
Main components
• Gatsby Build & Server Process: Represent the build-time configuration (gatsby-config.js, gatsby-node.js) and rendering layers (gatsby-ssr.js and gatsby-browser.js). These files are central to how Gatsby generates the site, both for static rendering and client-side interactivity.
• Frontend Pages: The pages inside the "src/pages" directory (like index.js, about.js, contact.js, services.js) form the main entry points of the user interface.
• UI Components: The “src/components” folder (with subdirectories for “About”, “Cart”, “Contact”, “Services”, and “Reusable”) encapsulates parts of the UI – such as the Navbar, Footer, HeroSection, and others – that are reused among pages.
• Static Assets: The “src/images” directory (and its contents) should be included as a source for images and potentially data for content (especially since there is a “contentFul” subfolder, which may tie into external CMS integration).
Important architectural patterns and design principles
• Separation of Concerns: Clearly show how the UI is modularized (pages vs. components vs. assets).
• Build-Time vs. Runtime: Emphasize the difference between what is processed/compiled at build time (through Gatsby’s Node APIs and static generation) versus what runs in the browser (react components and browser APIs).
• Component Reusability and Modularity: The “src/components/Reusable” folder in particular is a key point.