How dawoodmdbr/mdbr-portfolio works
1. Overall shape
- This is a single-page frontend portfolio built as a static React app. There is no backend, database, or API layer in this repo; the app is entirely driven by local content files and static assets.
2. Bootstrapping and runtime
- index.html is the Vite entry shell, src/main.tsx mounts the React tree, and src/App.tsx is the top-level app composition point.
- The app is authored in TypeScript, built with Vite, styled with Tailwind CSS/PostCSS, and animated with Framer Motion.
3. Page-level boundaries
- The repo has three page-level views in src/pages:
- HomePage.tsx — main portfolio landing page
- PhotosGallery.tsx — photography/gallery experience
- MobileBlock.tsx — alternate or blocked experience for mobile devices
- This suggests the app branches by route or device context rather than being a single uniform page.
4. Home page composition
- HomePage is assembled from section components under src/components/sections:
- HeroSection
- AboutSection
- ExperienceSection
- SkillsSection
- ProjectsSection
- ContactSection
- This is the core information architecture of the portfolio: a vertically structured, section-based landing page.
5. Navigation and section awareness
- src/components/ui/TopNav.tsx and SectionNav.tsx provide navigation between sections.
- src/hooks/useActiveSection.ts likely tracks scroll position / viewport intersection to highlight the active section in the nav, so navigation is tightly coupled to the one-page scroll layout.
6. Responsive behavior
- src/hooks/useMobile.ts and MobileBlock.tsx indicate a deliberate split between desktop and mobile behavior.
- That means responsive handling is not just CSS; there is likely a runtime decision that changes the page experience on small screens.
7. Data-driven content layer
- Most portfolio content is stored outside the UI in src/data:
- nav.ts for navigation items
- projects.ts for project metadata
- skills.ts for skill categories
- quotes.json for text snippets/quotes
- The sections consume these data modules, which keeps the presentation layer separate from the portfolio content.
8. Reusable UI primitives
- src/components/ui contains shared building blocks:
- ProjectCard.tsx for project display
- Cursor.tsx for custom pointer behavior
- TopNav.tsx and SectionNav.tsx for navigation UI
- These are reused by the section components, reducing duplication and keeping section files focused on layout and content assembly.
9. Animation subsystem
- src/animations/variants.ts centralizes motion presets used by Framer Motion.
- This creates a small animation boundary: the sections and UI components consume shared motion variants rather than defining animations ad hoc.
10. Static asset boundary
- Images and downloadable assets live in public/, including public/resume.pdf and image assets under public/images.
- The gallery page and project cards likely reference these assets directly by path, so media is served as static files rather than loaded from an external service.
11. Types and styling
- src/types/index.ts defines shared TypeScript models for content structures like projects, skills, or nav items.
- src/styles/globals.css plus Tailwind config provide the global visual system, while component files contain the actual layout and content semantics.
12. Deployment and hosting
- vercel.json shows the app is intended for Vercel hosting as a static frontend deployment.
- The architecture is therefore: local content + static assets + React UI, deployed as a host-served SPA with no server-side runtime in this repository.
Main entry points: HomePage.tsx Home page · App.tsx App · ProjectsSection.tsx Projects · TopNav.tsx Top nav
Components 27
App shell
Vite entrypoint, React bootstrap, and top-level composition.
- index.html · HTML entry shell used by Vite to mount the SPA.
index.html - main.tsx · App entrypoint that mounts the React tree.
src/main.tsx - App · Top-level React composition point.
src/App.tsx
Pages
Route- or context-level screens for the portfolio experience.
- Home page · Main portfolio landing experience.
src/pages/HomePage.tsx - Gallery · Photography or image gallery experience.
src/pages/PhotosGallery.tsx - Mobile block · Alternate experience shown for mobile or blocked contexts.
src/pages/MobileBlock.tsx
Sections
Home page content sections assembled into the landing page.
- Hero · Opening portfolio introduction section.
src/components/sections/HeroSection.tsx - About · Background and personal summary section.
src/components/sections/AboutSection.tsx - Experience · Work history or timeline section.
src/components/sections/ExperienceSection.tsx - Skills · Capabilities and categories section.
src/components/sections/SkillsSection.tsx - Projects · Featured project showcase section.
src/components/sections/ProjectsSection.tsx - Contact · Contact and call-to-action section.
src/components/sections/ContactSection.tsx
UI components
Reusable presentation primitives shared across pages and sections.
- Top nav · Primary navigation for the portfolio layout.
src/components/ui/TopNav.tsx - Section nav · Section-aware navigation for the one-page scroll layout.
src/components/ui/SectionNav.tsx - Project card · Reusable card for displaying project metadata.
src/components/ui/ProjectCard.tsx - Cursor · Custom cursor or pointer interaction layer.
src/components/ui/Cursor.tsx
Content data
Static content modules consumed by the UI.
- Nav data · Navigation item definitions.
src/data/nav.ts - Projects data · Project metadata used by the projects section and cards.
src/data/projects.ts - Skills data · Skill categories and related portfolio content.
src/data/skills.ts - Quotes · Static quote or snippet content.
src/data/quotes.json
Behavior
Scroll, responsiveness, and animation concerns.
- Active section · Tracks visible section state for navigation highlighting.
src/hooks/useActiveSection.ts - Mobile check · Runtime detection for mobile-specific behavior.
src/hooks/useMobile.ts - Variants · Shared Framer Motion animation variants.
src/animations/variants.ts
Assets
Static media and downloadable files served from the public and asset folders.
- Public assets · Images and downloadable files served statically.
public - Gallery media · Gallery images stored in the source asset tree.
src/assets/gallery
Styling
Global stylesheet and design system configuration.
- Globals · App-wide stylesheet entry.
src/styles/globals.css
Connections 27
- index.html → main.tsx: loads · Vite mounts the React runtime from the HTML shell.
- main.tsx → App: renders · Bootstrap code renders the application root.
- App → Home page: composes · Top-level app composes the landing page experience.
- App → Gallery: routes to · App can branch into the gallery experience.
- App → Mobile block: gates · App can switch to the mobile-specific experience.
- Home page → Hero: includes · Landing page starts with the hero section.
- Home page → About: includes · Landing page includes about content.
- Home page → Experience: includes · Landing page includes experience content.
- Home page → Skills: includes · Landing page includes skills content.
- Home page → Projects: includes · Landing page includes project showcase content.
- Home page → Contact: includes · Landing page ends with contact content.
- Top nav → Nav data: reads · Navigation UI is driven by static nav data.
- Section nav → Active section: uses · Section navigation depends on active-section tracking.
- Top nav → Active section: uses · Top navigation highlights the current section.
- Projects → Project card: uses · Projects section renders reusable project cards.
- Projects → Projects data: reads · Project showcase is driven by project metadata.
- Skills → Skills data: reads · Skills section uses structured skill data.
- About → Quotes: reads · About content can incorporate static quotes.
- Home page → Top nav: uses · Home page includes the main navigation UI.
- Home page → Section nav: uses · Home page includes section-aware navigation.
- Home page → Cursor: uses · Home page can apply custom pointer behavior.
- Home page → Variants: animates with · Sections and UI share motion presets.
- Mobile block → Mobile check: uses · Mobile experience is driven by runtime detection.
- Gallery → Gallery media: loads · Gallery renders source images from the asset tree.
- Projects → Public assets: loads · Projects and downloads reference static public assets.
- App → Globals: imports · App pulls in the global visual system.
- App → Types: shares · App-level components rely on shared TypeScript models.