How adilraq/portfolio works
Project type and purpose
• Type: Single‐Page Application (SPA) built with React (bootstrapped via Create React App).
• Purpose: A personal/portfolio site showcasing About, Articles, Projects, and a downloadable resume.
High-level analysis of the file structure
• .storybook: component playground for UI development (Storybook).
• public/: static assets (index.html, resume.pdf).
• src/: React source – entry point (index.tsx), App shell (App.tsx, Layout.tsx), components (UI library), pages (About, Articles, Projects), data.tsx.
• build tool config: webpack.config.js, tailwind.config.js, tsconfig.json.
• package.json: dependencies (React, Tailwind, Storybook, Webpack), scripts (start, build, test, storybook).
Key insights from README
• Uses CRA conventions: webpack under the hood, development server, production build.
• Standard npm scripts for start, test, build, eject.
Main components
A. Developer Environment
– IDE/Code Editor
– Source Repo (Git)
– Storybook (Component Dev Server)
– Webpack Dev Server (npm start)
B. Build Pipeline
– Webpack (bundling JS/CSS/assets)
– Tailwind CSS processing
– Babel/TypeScript transpilation
C. Deployment Artifacts
– Static files: index.html, bundle.js, styles.css, resume.pdf
D. Runtime in Browser
– React SPA
– React Router (or internal nav) controlling Views
– UI Components (Accordion, Button, NavBar, Badge, etc.)
– Data Layer (data.tsx for projects/articles metadata)
Relationships & interactions
1. Developer writes code → commits to Git
2. On npm start: Webpack Dev Server serves index.html + live‐reloaded JS chunks
3. Storybook runs in parallel for isolated component testing
4. On npm run build: Webpack + Babel + Tailwind produce optimized static bundle
5. Static files deployed to CDN or static host (e.g., Netlify, Vercel)
6. Browser requests index.html → loads bundle.js → React hydrates the SPA → user navigates through pages → UI components fetch data from data.tsx
Architectural patterns & design principles
• Component‐based UI: reusable, isolated components organized under src/components, enhanced via Storybook.
• Separation of concerns: Layout vs. Page vs. Component vs. Data.
• Build‐time theming/styling: Tailwind CSS integrated via PostCSS in Webpack.
• Single entry point (index.tsx) → root React tree (App → Layout → NavBar + Page content).
What to label explicitly
• “Webpack Dev Server” vs. “Storybook Server”
• “Transpile & Bundle” process (Babel + TypeScript + Tailwind)
• “Static Host / CDN” as deployment target
• React root structure: App → Layout → NavBar + Pages → Components