How charliechauri/charliechauri-web works
Project type and purpose
• This is a single‐page application (SPA) built with React and TypeScript, bootstrapped via Create-React-App and extended with a custom boilerplate (“cra-extended”).
• Its primary goals are to serve as Charlie Chauri’s personal website and as a reference/demo of best practices in React front-end development (testing, i18n, theming, code quality, CI/CD, etc.).
File structure
• Top-level config and tooling:
• .github/workflows/build.yml (GitHub Actions CI/CD)
• commitlint.config.js, .eslintrc, .prettierrc, Husky/git hooks
• package.json, tsconfig.json
• Public assets:
• public/index.html, manifest.json, robots.txt, fonts
• Source code (src/):
• App entrypoints (App.tsx, index.tsx, serviceWorker.ts)
• Context providers (ThemeContext.tsx, i18n.tsx)
• Components directory (Description, Heading, Select, etc.)
• Pages directory (Home.tsx)
• Styling (src/scss/*) and images (src/img)
• Testing setup (App.test.tsx, setupTests.ts, src/test/)
• Localization files (src/locales/en/translation.json, es/…)
README for technical stack and workflows
• Yarn scripts for start, build, test, lint, format
• Enforced code quality via ESLint, Prettier, commit lint, coverage thresholds
• CI: GitHub Actions runs build/test on push, deploys to Netlify
• Hosting: static build delivered via Netlify (with CDN)
Main components and their interactions
a. Components
• Developer workstation: IDE, Node.js/npm or Yarn, Git client
• Code repository on GitHub (with pull-request templates, branch protections)
• CI/CD pipeline (GitHub Actions)
• Static hosting & CDN (Netlify)
• Client runtime (Web browser)
• React app runtime: Context providers (i18n, Theme), component tree, service worker
b. Relationships and data flow
1. Developer writes code → commits & pushes to GitHub
2. GitHub Actions triggers: linter → tests → build
3. On success, Netlify picks up build artifacts → deploys to CDN
4. End user’s browser requests site → CDN serves index.html & JS/CSS bundles
5. React loads in browser → Contexts initialize (theme, locale) → renders component tree → fetches any dynamic/static assets
6. Service worker registers for offline support
c. Architectural patterns & design principles
• Component-driven UI with small, focused components (atomic design style)
• React Context API for cross-cutting concerns (theming, i18n)
• CSS/Sass modularization (SCSS partials, component-scoped styles)
• Absolute imports via TypeScript config for cleaner module paths
• Automated code quality: linters, formatters, commit hooks, coverage gates
• CI/CD as code via GitHub workflows and Netlify integration
d. Key technologies
• React, TypeScript, Create-React-App (Webpack, Babel)
• Sass (node-sass), CSS modules/global SCSS
• react-i18next for localization
• Jest & React Testing Library for unit tests
• ESLint, Prettier, Husky, Commitlint for quality
• GitHub Actions for CI
• Netlify for hosting & CDN
Essential details to capture
• The dual objectives: personal website + best-practices demo
• The zero-server/static hosting model (Netlify + CDN)
• The local dev → CI → deployment workflow
• The internal React architecture: contexts, styling, locales, tests