How ismouslih/my-portfolio works
Project type and purpose
• This is a static single-page React application scaffolded with Vite.
• Its purpose (inferred from the file tree) is likely a personal portfolio or marketing site: it serves sections such as About, Skills, Projects, a downloadable resume PDF, and contact links—all client-side.
File structure
Top-level:
• public/ – raw static assets (PDF, images, robots.txt, sitemap.xml)
• src/ – application source
– components/ – reusable UI parts (NavBar, Hero, AboutSection, etc.)
– pages/ – top-level routes (Home, Notfound)
– lib/ – pure data and utilities (projectsSet, SkillsSet, utils.js)
– App.jsx + main.jsx – entry points and React root
– index.css – global styles
Build/config:
• vite.config.js – Vite build settings
• package.json & eslint.config.js – dependencies & lint rules
README for additional insights
• Confirms use of Vite (with HMR) and React.
• Mentions ESLint and optional TS template—indicates a focus on fast dev feedback and code quality.
A. Development Flow
1. Developer Workstation
– Source files in src/ and public/ under Git.
– eslint.config.js runs lint rules.
– npm run dev spins up the Vite dev server.
2. Vite Dev Server
– Processes App.jsx + modules via ESBuild/Babel (depending on plugin).
– Serves modules with HMR to speed up edits.
3. Browser (localhost:3000)
– Loads index.html, which pulls in the Vite-served bundle.
– React hydrates components (components → pages → App).
B. Production Flow
1. CI/CD Pipeline (optional – e.g. GitHub Actions)
– Runs npm run build
– Vite compiles, bundles & outputs static files (index.html, assets) into dist/.
2. Static Web Host / CDN (e.g. Netlify, Vercel, GitHub Pages)
– Deploys dist/ artifacts.
– Serves index.html and JS/CSS from edge locations.
3. End-user Browser
– Requests index.html → JS/CSS → runs React SPA.
– Fetches static assets from public/ (resume PDF, images).
C. Internal Code Modules
– App.jsx glues together routing (Home/Notfound) and site layout.
– components/ houses UI building blocks.
– lib/ supplies data (skills, projects) and small utils.
– pages/ define route endpoints.
– public/ holds truly static resources.
Architectural patterns & design principles
– SPA (Single-Page Application): React + client-side routing.
– Module-based: clearly separated components, pages, and data helpers.
– Static pre-render: content (resume, images) served directly via CDN.
– HMR / fast dev feedback courtesy of Vite and React Refresh plugin.
Essential architectural elements to capture
• Project structure (src vs. public)
• Build toolchain (Vite plugins, Babel/SWC)
• Deployment target (static host/CDN)
• Client-side routing (Home, Notfound)
• Data sources (local lib files vs. external APIs—none in this case)