How ujjwalvivek/portfolio works
Project type and purpose
• This is a single‐page, client‐only portfolio website built with React.
• It uses Create React App (CRA) under the hood (overridden via react-app-rewired and customize-cra), styled with CSS Modules and PostCSS, and deployed as static assets to Firebase Hosting.
• It has a simple CI/CD setup using GitHub Actions to push to Firebase on PRs and merges.
File structure
• Top Level
• config‐overrides.js, postcss.config.js – custom CRA and PostCSS build configs
• firebase.json, .firebaserc – Firebase Hosting configuration
• .github/workflows/*.yml – CI/CD pipelines for deploying to Firebase
• package.json, package-lock.json – npm package config
• public/
• static assets, index.html, manifest.json, robots.txt
• src/
• React entrypoint (index.js), App component (App.js + App.module.css), tests, support files (reportWebVitals.js, setupTests.js)
README insights
• Core stack: React, CSS Modules, PostCSS plugins (import, preset-env, nested, autoprefixer, cssnano)
• Dev flow: npm start for local, npm run build → static bundle, npm test, CI via GitHub Actions
Components
a. Main components
1. Developer Environment
• Local machine with Node.js / npm
• React Dev Server (npm start)
• Test runner (npm test)
2. Build Pipeline
• react-app-rewired & customize-cra
• Webpack / Babel / PostCSS build steps
• Output: static files (JS/CSS/HTML) in build/
3. Source Code & Version Control
• Git repo on GitHub
• .github/workflows GitHub Actions for CI/CD
4. Continuous Integration / Deployment
• GitHub Actions workflows
• firebase-hosting-pull-request.yml (deploy preview)
• firebase-hosting-merge.yml (deploy production)
5. Hosting Infrastructure
• Firebase Hosting (as static site)
• .firebaserc connects to Firebase projects
6. End Users
• Web browsers requesting static assets
b. Relationships & interactions
• Developer commits code → pushes to GitHub
• On push/PR → GitHub Actions runs build & tests
• Successful build → Actions deploys to Firebase Hosting (preview or prod)
• Firebase serves static bundle to end users
• Local dev uses React Dev Server to serve dynamic app at localhost
c. Architectural patterns & design principles
• Single‐page application (SPA)
• Unidirectional data flow within React
• Build‐time asset pipeline (PostCSS + CSS Modules)
• GitOps via CI/CD: “infrastructure as code” (firebase.json, workflows)
• Separation of concerns: code (src/) vs public assets vs config vs CI
d. Technologies & frameworks
• React, React DOM
• react-app-rewired & customize-cra
• Webpack, Babel
• PostCSS plugins (import, preset-env, nested, autoprefixer, cssnano)
• CSS Modules
• Firebase CLI & Hosting
• GitHub Actions