How yamaniyassine/portfolio works
Project type and purpose
• This is a single-page portfolio application built with React (no backend services).
• Its purpose is to showcase personal projects, skills, and contact information in a responsive, themable SPA.
File structure
• Top level:
• package.json / package-lock.json → npm project, React dependencies, build scripts
• public/ → static assets served at runtime (index.html, PDFs, manifest.json, robots.txt)
• src/ → React source code
• src/components/ → presentational and UI-logic components (Navbar, Hero, About, Projects, Skills, Contact, Footer, Darkmodeswitch, ScrollToTop)
• src/contexts/ → ThemeContext for dark/light mode across the app
• src/App.js → root component that ties together Context provider and page structure
• src/index.js → ReactDOM entry point, injects App into public/index.html
README
• Minimal: “npm start” to launch the development server.
• No backend or external APIs are defined—this is purely client-side.
a. Main components
• Client Browser (user agent)
• Development/build environment (npm start / webpack dev server)
• Static asset server (serves public/)
• React Application
– Entry point: index.html + index.js
– Context layer: ThemeContext.Provider
– UI Components: Navbar, Hero, About, Projects, Skills, Contact, Footer, DarkModeSwitch, ScrollToTop
• Assets and configuration: CSS files, PDFs, manifest.json, robots.txt
b. Relationships & interactions
• Browser requests index.html → Dev server / static server → React bundle + assets
• index.js mounts App into DOM
• App wraps child components in ThemeContext.Provider
• DarkModeSwitch dispatches theme changes through Context → all components consume theme
• ScrollToTop listens to route/scroll events → programmatic scroll
• User interactions (clicks, navigation) flow from UI Components → React state/Context
c. Architectural patterns
• Component-based decomposition (each view section is its own component)
• Context API for cross-cutting concerns (theme management)
• Static asset hosting for PDFs and manifest (PWA readiness)
d. Key technologies
• React, ReactDOM
• Context API
• Create-React-App toolchain (webpack, Babel)
• CSS modules / global CSS (App.css, index.css, component-specific CSS)
Elements
• HTTP request from Browser to Server
• Module imports and Context data flow
• User event flows (e.g., click → state update → re-render)
• Entry points (index.html/index.js)
• Context/provider layer
• UI components
• Static assets
Detailed guidance
• “index.js” mounting “App” in the DOM.
• Under that, group all UI components (Navbar, Hero, About, Projects, Skills, Contact, Footer, DarkModeSwitch, ScrollToTop).