How arlaudcyril/test-landing works
Project type and purpose
• This is a single-page frontend application (SPA) bootstrapped with Create React App.
• It presents marketing pages, user flows (login, reset password, unsubscribe, verify email), rich typography (custom fonts), and on-chain interactions (claim tokens via smart contracts).
File structure
• Top-level:
• public/ – static assets served by the web server or CDN (index.html, manifest, robots.txt, images, fonts).
• src/ – application source code:
– App.js + routing entry point (React Router manages pages under src/pages/).
– src/components/ – reusable UI components grouped by domain (articles, claimToken, contactForm, layout, etc.).
– src/context/ – global state management (Context + reducers + actions).
– src/utils/ – API wrappers (henceforthApi) and validation constants.
– src/assets/ – fonts, images, and SCSS styles.
• .github/workflows/main.yml – CI pipeline (build/test/deploy).
README for additional insights
• Confirms standard CRA lifecycle (npm start, build, test, eject), no custom backend here.
• Uses standard Webpack/Babel under the hood.
Main components and interactions
1) User’s Browser/Client
– Static Host/CDN (serves public/*)
– React SPA
• Routing Module (React Router)
• UI Components (src/components)
• Pages (src/pages)
• State Layer (Context Provider + Reducers)
• Style Layer (SCSS modules imported into components)
• Utility Layer (henceforthApi calls, validation)
• Blockchain Connector (Web3/Ethers + ABI JSON under src/components/claimToken/contract)
2) External Services
– REST API Backend (henceforthApi endpoints)
– Ethereum (or EVM-compatible) Network / Smart Contracts
3) CI/CD Pipeline
– GitHub Actions (checkout → install → test → build → deploy)
• Browser → Static Host (initial GET /index.html)
• index.html loads React bundle → React App bootstraps
• React App (UI) ←→ State Layer (dispatch actions, subscribe to state)
• State Layer → Utility Layer → Backend REST API (HTTP) → returns JSON → updates State → rerenders UI
• ClaimToken Component → Blockchain Connector → Smart Contract → returns tx receipt → updates State → UI
• GitHub Actions → on push to main → runs tests → builds assets → deploys to Static Host/CDN
c. Architectural patterns & design principles:
– SPA with client routing (no full-page reloads)
– Flux-style unidirectional data flow (Context + Reducers)
– Separation of concerns: UI vs. State vs. Services vs. Assets
– Modular SCSS for styling
– Immutable state updates in reducers
– CI/CD promotion of code through test → build → deploy
d. Key technologies & frameworks:
– React, React Router, Context API
– Webpack/Babel (via CRA)
– SCSS modules
– GitHub Actions
– Web3/Ethers + Smart Contracts (ABI JSON)
– REST API (henceforthApi wrapper)