How fabricegeib/react-for-designers works
Project type and purpose
• This is a Gatsby-based static site (a React SSG) built with the default starter.
• It has no dynamic backend/service—everything is generated at build time via Gatsby’s Node process and GraphQL data layer, then deployed as static assets.
Main components
A. Developer / CI system
• Triggers commands (gatsby develop in dev, gatsby build in CI/production).
B. Gatsby Build Process (Node.js)
1. Configuration & Plugins layer
• gatsby-config.js (site metadata, plugins)
• gatsby-node.js (createPages, extend GraphQL schema)
• gatsby-browser.js (client API hooks)
• gatsby-ssr.js (SSR API hooks)
2. Data Layer (GraphQL)
• Sources: staticdata.json (and any images under src/images)
• Gatsby’s internal GraphQL server to query nodes
3. React Compilation
• src/pages/… → page templates
• src/components/… → React UI components
4. Bundling & Transpilation
• Webpack, Babel (configured by Gatsby under the hood)
C. Build Output
• /public folder: HTML, CSS, JS bundles, static assets
D. Hosting / CDN
• e.g. Netlify (build & deploy) or any static‐file host
E. Client Browser
• Fetches static HTML/CSS/JS and hydrates React for client interactions
Relationships & data flow
• Developer → Gatsby CLI → Build Process
• Build Process reads config + plugins → Spins up GraphQL → Reads data sources → Compiles React pages → Generates static files
• In dev: Build Process serves files on localhost:8000 + GraphiQL at /___graphql
• In prod: CI runs gatsby build → Outputs /public → Deployed to CDN/Netlify → Browser requests static assets
Architectural patterns & principles
• Static-site generation (SSG) pattern
• Component-based UI (React)
• Data abstraction via GraphQL node layer
• Plugin/config-based extensibility (Gatsby APIs)
• Separation of concerns: config, data, component logic, build vs. runtime
Technologies / frameworks
• Node.js & Gatsby CLI
• React (JSX, components under src/)
• GraphQL (data queries at build time)
• Webpack & Babel (bundling & transpilation)
• Prettier (code style)
• NPM/Yarn (package management)