How developer-junaid/developerfolio works
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: App.jsx App composition · useSanityData.js CMS data hook · sanity.json Studio configuration · index.js Browser entry
Components 19
React Portfolio
Single-page browser application.
- Static host shell
public/index.html - Browser entry
src/index.js - App composition · Composes the scrolling page sections.
src/App.jsx - Navigation & menu
src/components/Nav/Nav.jsx - Identity & contact
src/components/Home/Home.jsx - Services section
src/components/Services/Services.jsx - Portfolio section
src/components/Portfolio/index.jsx - Testimonials section
src/components/Testimonials/Testimonials.jsx - Shared UI primitives
src/components/Button/Button.jsx - CMS data hook · Keeps query and client details outside UI sections.
src/hooks/useSanityData.js - GROQ query definitions
src/constants/sanityQueries.js - Sanity client
src/client.js
Sanity Studio
Independently operated content authoring project.
- Studio configuration
portfoliosanitydata/sanity.json - Schema registry
portfoliosanitydata/schemas/schema.js - Portfolio content types · Portfolio, service, testimonial, and site settings documents.
portfoliosanitydata/schemas/portfolio.js - Built Studio
portfoliosanitydata/dist/index.html
Delivery
- Service worker
src/serviceWorker.js - Publishing workflow
.github/workflows/publish.yml
Other components
- Hosted Sanity dataset · Shared hosted content boundary for Studio and frontend.
Connections 23
- 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