# developer-junaid/developerfolio architecture

> Architecture diagram of the GitHub repository developer-junaid/developerfolio, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/developer-junaid/developerfolio
- Repository: https://github.com/developer-junaid/developerfolio

## Overview

#### Purpose and Entry Points
This repository is a personal developer portfolio with a React single-page frontend and a separately configured Sanity Studio CMS for editable portfolio content. The browser application starts at `src/index.js`, mounts the application composition in `src/App.jsx`, and uses static host assets from `public/index.html`. The CMS is operated independently from `portfoliosanitydata/`.

#### React Application Shell
`src/App.jsx` composes the major page sections—home, navigation, services, portfolio, testimonials, contact, and footer—into a single scrolling experience. Navigation is implemented by `src/components/Nav/Nav.jsx` and the responsive menu by `src/components/Menu/Menu.jsx`; animation and scroll libraries named in the README support section transitions and interaction behavior.

#### CMS Client and Data Boundary
The frontend’s Sanity connection is centralized in `src/client.js`. Query definitions reside in `src/constants/sanityQueries.js`, while `src/hooks/useSanityData.js` is the application-facing retrieval layer. This creates a boundary between UI components and Sanity/GROQ query details: sections consume fetched CMS records rather than owning direct backend configuration.

#### Content-Driven Page Sections
The portfolio’s primary content sections map to Sanity-managed entities:
- Portfolio rendering: `src/components/Portfolio/index.jsx`, `src/components/Portfolio/PortfolioItem/PortfolioItem.jsx`
- Services rendering: `src/components/Services/Services.jsx`, `src/components/Services/ServicesCard/ServicesCard.jsx`
- Testimonials rendering: `src/components/Testimonials/Testimonials.jsx`, `src/components/Testimonials/Testimonial/Testimonial.jsx`
- Site identity/contact content: `src/components/Home/Home.jsx`, `src/components/Contact/Contact.jsx`

Shared UI primitives, such as `src/components/Button/Button.jsx` and `src/components/Heading/Heading.jsx`, provide presentation consistency across these sections.

#### Sanity Studio and Content Model
The standalone Sanity Studio is rooted at `portfoliosanitydata/sanity.json`; its schema registry is `portfoliosanitydata/schemas/schema.js`. Its principal document types are:
- Portfolio entries: `portfoliosanitydata/schemas/portfolio.js`
- Service entries: `portfoliosanitydata/schemas/service.js`
- Testimonials: `portfoliosanitydata/schemas/testimonial.js`
- Global settings: `portfoliosanitydata/schemas/siteSettings.js`

Studio query or inspection support is present in `portfoliosanitydata/queries/index.js`. Built Studio output is committed under `portfoliosanitydata/dist/index.html`.

#### External Services and Runtime Boundaries
The frontend runs as a React/JavaScript client application and communicates with Sanity’s hosted dataset using project and dataset settings configured through `src/client.js` and the Studio’s `portfoliosanitydata/sanity.json`. Firebase is listed as part of the stack and is likely associated with contact or deployment functionality, though no Firebase source files are visible in this tree. GitHub Actions publishing automation is defined in `.github/workflows/publish.yml`.

#### Delivery and Offline Surface
The browser build uses `public/` as its static HTML/manifest/robots boundary and includes service-worker support through `src/serviceWorker.js`. Global styling begins in `src/index.css`, with component-local CSS colocated beside React components. The repository therefore has two independently installable/deployable Node-based projects: the public React portfolio at the root and the Sanity Studio in `portfoliosanitydata/package.json`.

Main entry points: [`src/App.jsx`](https://github.com/developer-junaid/developerfolio/blob/master/src/App.jsx) (App composition), [`src/hooks/useSanityData.js`](https://github.com/developer-junaid/developerfolio/blob/master/src/hooks/useSanityData.js) (CMS data hook), [`portfoliosanitydata/sanity.json`](https://github.com/developer-junaid/developerfolio/blob/master/portfoliosanitydata/sanity.json) (Studio configuration), [`src/index.js`](https://github.com/developer-junaid/developerfolio/blob/master/src/index.js) (Browser entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["React Portfolio"]
  node_html["Static host shell<br/>HTML entry<br/>[index.html]"]
  node_index["Browser entry<br/>React bootstrap<br/>[index.js]"]
  node_app["App composition<br/>React shell<br/>[App.jsx]"]
  node_navigation["Navigation &amp; menu<br/>React navigation<br/>[Nav.jsx]"]
  node_home_contact["Identity &amp; contact<br/>React sections<br/>[Home.jsx]"]
  node_services["Services section<br/>React section<br/>[Services.jsx]"]
  node_portfolio["Portfolio section<br/>React section<br/>[index.jsx]"]
  node_testimonials["Testimonials section<br/>React section<br/>[Testimonials.jsx]"]
  node_ui["Shared UI primitives<br/>React components<br/>[Button.jsx]"]
  node_data_hook["CMS data hook<br/>retrieval layer<br/>[useSanityData.js]"]
  node_queries["GROQ query definitions<br/>query layer<br/>[sanityQueries.js]"]
  node_sanity_client["Sanity client<br/>CMS client<br/>[client.js]"]
end

subgraph group_cms["Sanity Studio"]
  node_studio_config["Studio configuration<br/>Sanity Studio<br/>[sanity.json]"]
  node_schema_registry["Schema registry<br/>Sanity schemas<br/>[schema.js]"]
  node_content_types["Portfolio content types<br/>Sanity documents<br/>[portfolio.js]"]
  node_studio_build["Built Studio<br/>static Studio output<br/>[index.html]"]
end

subgraph group_delivery["Delivery"]
  node_service_worker["Service worker<br/>offline support<br/>[serviceWorker.js]"]
  node_publishing["Publishing workflow<br/>GitHub Actions<br/>[publish.yml]"]
end

node_sanity_dataset[("Hosted Sanity dataset<br/>managed CMS")]

node_html -->|"loads"| node_index
node_index -->|"mounts"| node_app
node_index -->|"registers"| node_service_worker
node_app -->|"composes"| node_navigation
node_app -->|"composes"| node_home_contact
node_app -->|"composes"| node_services
node_app -->|"composes"| node_portfolio
node_app -->|"composes"| node_testimonials
node_app -->|"uses"| node_ui
node_services -->|"loads content"| node_data_hook
node_portfolio -->|"loads content"| node_data_hook
node_testimonials -->|"loads content"| node_data_hook
node_home_contact -->|"loads content"| node_data_hook
node_data_hook -->|"uses"| node_queries
node_data_hook -->|"calls"| node_sanity_client
node_sanity_client -->|"queries"| node_sanity_dataset
node_studio_config -->|"loads"| node_schema_registry
node_schema_registry -->|"registers"| node_content_types
node_studio_config -->|"configures"| node_sanity_dataset
node_content_types -->|"defines documents"| node_sanity_dataset
node_studio_config -->|"builds"| node_studio_build
node_publishing -.->|"publishes frontend"| node_html
node_publishing -.->|"publishes Studio"| node_studio_build

click node_html "https://github.com/developer-junaid/developerfolio/blob/master/public/index.html"
click node_index "https://github.com/developer-junaid/developerfolio/blob/master/src/index.js"
click node_app "https://github.com/developer-junaid/developerfolio/blob/master/src/App.jsx"
click node_navigation "https://github.com/developer-junaid/developerfolio/blob/master/src/components/Nav/Nav.jsx"
click node_home_contact "https://github.com/developer-junaid/developerfolio/blob/master/src/components/Home/Home.jsx"
click node_services "https://github.com/developer-junaid/developerfolio/blob/master/src/components/Services/Services.jsx"
click node_portfolio "https://github.com/developer-junaid/developerfolio/blob/master/src/components/Portfolio/index.jsx"
click node_testimonials "https://github.com/developer-junaid/developerfolio/blob/master/src/components/Testimonials/Testimonials.jsx"
click node_ui "https://github.com/developer-junaid/developerfolio/blob/master/src/components/Button/Button.jsx"
click node_data_hook "https://github.com/developer-junaid/developerfolio/blob/master/src/hooks/useSanityData.js"
click node_queries "https://github.com/developer-junaid/developerfolio/blob/master/src/constants/sanityQueries.js"
click node_sanity_client "https://github.com/developer-junaid/developerfolio/blob/master/src/client.js"
click node_service_worker "https://github.com/developer-junaid/developerfolio/blob/master/src/serviceWorker.js"
click node_studio_config "https://github.com/developer-junaid/developerfolio/blob/master/portfoliosanitydata/sanity.json"
click node_schema_registry "https://github.com/developer-junaid/developerfolio/blob/master/portfoliosanitydata/schemas/schema.js"
click node_content_types "https://github.com/developer-junaid/developerfolio/blob/master/portfoliosanitydata/schemas/portfolio.js"
click node_studio_build "https://github.com/developer-junaid/developerfolio/blob/master/portfoliosanitydata/dist/index.html"
click node_publishing "https://github.com/developer-junaid/developerfolio/blob/master/.github/workflows/publish.yml"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_html,node_index,node_app,node_navigation,node_home_contact,node_services,node_portfolio,node_testimonials,node_ui,node_data_hook,node_queries,node_sanity_client toneBlue
class node_studio_config,node_schema_registry,node_content_types,node_studio_build toneAmber
class node_service_worker,node_publishing toneMint
class node_sanity_dataset toneNeutral
```

## Components

### React Portfolio

Single-page browser application.

- [Static host shell](https://github.com/developer-junaid/developerfolio/blob/master/public/index.html): HTML entry · `public/index.html`
- [Browser entry](https://github.com/developer-junaid/developerfolio/blob/master/src/index.js): React bootstrap · `src/index.js`
- [App composition](https://github.com/developer-junaid/developerfolio/blob/master/src/App.jsx): React shell · Composes the scrolling page sections. · `src/App.jsx`
- [Navigation & menu](https://github.com/developer-junaid/developerfolio/blob/master/src/components/Nav/Nav.jsx): React navigation · `src/components/Nav/Nav.jsx`
- [Identity & contact](https://github.com/developer-junaid/developerfolio/blob/master/src/components/Home/Home.jsx): React sections · `src/components/Home/Home.jsx`
- [Services section](https://github.com/developer-junaid/developerfolio/blob/master/src/components/Services/Services.jsx): React section · `src/components/Services/Services.jsx`
- [Portfolio section](https://github.com/developer-junaid/developerfolio/blob/master/src/components/Portfolio/index.jsx): React section · `src/components/Portfolio/index.jsx`
- [Testimonials section](https://github.com/developer-junaid/developerfolio/blob/master/src/components/Testimonials/Testimonials.jsx): React section · `src/components/Testimonials/Testimonials.jsx`
- [Shared UI primitives](https://github.com/developer-junaid/developerfolio/blob/master/src/components/Button/Button.jsx): React components · `src/components/Button/Button.jsx`
- [CMS data hook](https://github.com/developer-junaid/developerfolio/blob/master/src/hooks/useSanityData.js): retrieval layer · Keeps query and client details outside UI sections. · `src/hooks/useSanityData.js`
- [GROQ query definitions](https://github.com/developer-junaid/developerfolio/blob/master/src/constants/sanityQueries.js): query layer · `src/constants/sanityQueries.js`
- [Sanity client](https://github.com/developer-junaid/developerfolio/blob/master/src/client.js): CMS client · `src/client.js`

### Sanity Studio

Independently operated content authoring project.

- [Studio configuration](https://github.com/developer-junaid/developerfolio/blob/master/portfoliosanitydata/sanity.json): Sanity Studio · `portfoliosanitydata/sanity.json`
- [Schema registry](https://github.com/developer-junaid/developerfolio/blob/master/portfoliosanitydata/schemas/schema.js): Sanity schemas · `portfoliosanitydata/schemas/schema.js`
- [Portfolio content types](https://github.com/developer-junaid/developerfolio/blob/master/portfoliosanitydata/schemas/portfolio.js): Sanity documents · Portfolio, service, testimonial, and site settings documents. · `portfoliosanitydata/schemas/portfolio.js`
- [Built Studio](https://github.com/developer-junaid/developerfolio/blob/master/portfoliosanitydata/dist/index.html): static Studio output · `portfoliosanitydata/dist/index.html`

### Delivery

- [Service worker](https://github.com/developer-junaid/developerfolio/blob/master/src/serviceWorker.js): offline support · `src/serviceWorker.js`
- [Publishing workflow](https://github.com/developer-junaid/developerfolio/blob/master/.github/workflows/publish.yml): GitHub Actions · `.github/workflows/publish.yml`

### Other components

- **Hosted Sanity dataset**: managed CMS · Shared hosted content boundary for Studio and frontend.

## Connections

- Static host shell → Browser entry: loads
- Browser entry → App composition: mounts
- Browser entry → Service worker: registers
- App composition → Navigation & menu: composes
- App composition → Identity & contact: composes
- App composition → Services section: composes
- App composition → Portfolio section: composes
- App composition → Testimonials section: composes
- App composition → Shared UI primitives: uses
- Services section → CMS data hook: loads content
- Portfolio section → CMS data hook: loads content
- Testimonials section → CMS data hook: loads content
- Identity & contact → CMS data hook: loads content
- CMS data hook → GROQ query definitions: uses
- CMS data hook → Sanity client: calls
- Sanity client → Hosted Sanity dataset: queries
- Studio configuration → Schema registry: loads
- Schema registry → Portfolio content types: registers
- Studio configuration → Hosted Sanity dataset: configures
- Portfolio content types → Hosted Sanity dataset: defines documents
- Studio configuration → Built Studio: builds
- Publishing workflow → Static host shell: publishes frontend
- Publishing workflow → Built Studio: publishes Studio
