How mushtaq96/portfolio-react-app works
Project Type and Purpose
• This is a static, single‐page personal portfolio website built with React (front-end only) and styled using Tailwind CSS.
• There is no custom back end or database—everything is hosted as static assets on GitHub Pages, with a GitHub Actions workflow automating the build and deploy.
File Structure Analysis
• Top level:
• .github/workflows/deploy-to-github-pages.yml → CI/CD pipeline definition
• public/ → static HTML and meta files (index.html, manifest.json, robots.txt)
• src/ → React source code with components, assets, CSS, and entry point
• tailwind.config.js, postcss.config.js → build tooling for Tailwind
• package.json → project dependencies and scripts
• Patterns:
• “public” vs. “src” separation (static hosting + SPA structure)
• Component-based directory under src/components (React UI)
• src/assets/projects for project imagery
README Insights
• Uses Yarn for package management
• Development (yarn start) vs. production build (yarn build)
• Deploys to GitHub Pages via peaceiris/actions-gh-pages in GitHub Actions
Main Components
a. Developer / Local Machine
• Node.js & Yarn
• Local React dev server (localhost:3000)
b. Version Control & CI/CD
• GitHub repository
• .github/workflows/deploy-to-github-pages.yml
• GitHub Actions runner (ubuntu-latest)
• Steps: checkout, setup-node, yarn install, yarn build, deploy via GH Pages action
c. Build Artifacts
• build/ folder (bundled JS/CSS, hashed filenames, minified assets)
d. Hosting & CDN
• GitHub Pages static site
• index.html, JS bundle, CSS, image assets served over HTTPS
e. Client (User’s Browser)
• Requests static files
• Loads React SPA, renders components (Navbar, Home, About, Skills, Work, Contact)
Relationships & Data Flow
• Developer pushes to main → triggers GitHub Actions
• CI fetches source, builds assets (Tailwind & React build pipeline) → produces build/
• CI pushes build/ to GitHub Pages branch → hosted at username.github.io/repo
• End user’s browser fetches index.html → React SPA loads JS bundle → user interacts with components, asset requests
Architectural Patterns & Principles
• Single‐Page Application (SPA)
• Component‐based UI (React)
• Utility‐first CSS (Tailwind)
• GitOps style CI/CD (push-based deployment)
• Separation of concerns: “public” vs. “src”, build vs. runtime
Technologies & Frameworks to Call Out
• React (UI library)
• Tailwind CSS (styling)
• PostCSS (CSS processing)
• Yarn & Node.js (dependency management & build)
• GitHub Actions & peaceiris/actions-gh-pages (CI/CD & deployment)
• GitHub Pages (static hosting)