How ideawithflo/portfolio works
1. Repository shape
This is a two-part portfolio system: web/ is the public Next.js site, and cms/ is a Sanity Studio used to author content. The repo also contains assets/ for original source files and animation assets that are consumed or mirrored by the frontend.
2. Public website runtime (web/)
The public-facing app is a Next.js 14 App Router application written in TypeScript and styled with Tailwind CSS. It is the main delivery surface for pages, project detail routes, SEO metadata, and interactive portfolio UI.
3. Content management boundary (cms/)
The CMS is a separate Sanity v3 studio. It runs independently from the website and is the only authoring interface for editable content such as projects and site settings. Publishing in Sanity is what makes content visible on the website.
4. Data model
The CMS schema layer is small and explicit: project.ts, settings.ts, and post.ts define the content types. project appears to be the core portfolio entity, while settings likely stores global site configuration and featured content. The schema files define the shape of content the frontend can query.
5. Frontend data access
The web/lib/ folder is the boundary between the site and Sanity. sanity.ts configures the Sanity client, and queries.ts centralizes the GROQ queries used by pages and components. This keeps data fetching separate from presentation.
6. Routing and page composition
The site is organized around App Router pages in web/app/: a homepage, legal pages (agb, datenschutz, impressum), a new page, a project listing, dynamic project detail routes (projects/[slug]), and workflow pages (workflow and workflow/[slug]). This suggests a mostly content-driven structure with dynamic rendering for individual entries.
7. UI component layer
Reusable UI is factored into web/components/ rather than being embedded in pages. The main sections include Hero, About, Services, Projects, FeaturedProject, ProjectSlider, Contact, and navigation/theme components. Pages assemble these into the site’s marketing and portfolio experience.
8. Interactive and media features
Several components represent specialized client-side features: ThemeProvider/ThemeToggle handle dark/light mode, CookieBanner handles consent UX, ModelViewer supports 3D GLB assets, and Konfetti appears to wrap the confetti effect sourced from assets/input.konfetti. These are presentation features layered on top of the CMS data.
9. SEO and platform metadata
The app includes StructuredData for JSON-LD, a sitemap route, and robots.txt in public/. app/layout.tsx likely owns global metadata and verification tags, which makes SEO a first-class architectural concern rather than an afterthought.
10. Static asset flow
Public files live in web/public/, including 3D models under public/models/. This separates immutable static media from CMS-managed content. The assets/ directory holds original source material, while the Next.js app consumes the built/public versions.
11. Deployment and environment
The intended production runtime is Vercel for the Next.js app, with Sanity hosted separately. The frontend depends on environment variables for the Sanity project ID, dataset, and site URL, so deployment is split between static/runtime site config and externally hosted CMS content.
Main entry points: queries.ts Queries · page.tsx Home · ModelViewer.tsx Media UI · ProjectCard.tsx Project UI
Components 18
Web app
Next.js public portfolio site
- Layout · Global app shell and metadata
web/app/layout.tsx - Home · Homepage route composition
web/app/page.tsx - Projects · Project listing route
web/app/projects/[slug]/page.tsx - Workflow · Workflow listing and detail routes
web/app/workflow/page.tsx - Legal · Static legal pages
web/app/agb/page.tsx - Sections · Hero, About, Services, Projects, Contact
web/components/Projects.tsx - Project UI · Project cards, sliders, featured project
web/components/ProjectCard.tsx - Shell UI · Navbar, theme toggle, provider
web/components/Navbar.tsx - Media UI · 3D viewer and confetti presentation
web/components/ModelViewer.tsx - SEO · Structured data and consent banner
web/components/StructuredData.tsx - Sanity client · Frontend Sanity connection config
web/lib/sanity.ts - Queries · Centralized content queries
web/lib/queries.ts - Sitemap · XML sitemap generation
web/app/sitemap.ts
CMS
Sanity studio and content schema
Media assets
Source and public static assets
- Source assets · Original confetti asset sources
assets/input.konfetti/index.html - Public media · Built and served static files including models and robots
web/public/robots.txt
Connections 20
- Layout → Shell UI: wraps · Provides global navigation and theme context
- Layout → SEO: owns · Defines shared metadata and structured data
- Home → Sections: assembles · Homepage composes marketing sections
- Home → Project UI: shows · Homepage highlights portfolio items
- Projects → Project UI: renders · Project routes use card/slider UI
- Workflow → Sections: reuses · Workflow pages share reusable section components
- Legal → Shell UI: inherits · Legal pages share the app shell
- Home → Queries: reads · Homepage fetches portfolio content
- Projects → Queries: reads · Project pages query project data
- Workflow → Queries: reads · Workflow pages query content entries
- Queries → Sanity client: uses · Queries execute through the Sanity client
- Studio → Schemas: loads · Studio registers content types
- Studio → Preview: extends · Studio includes preview tooling
- Queries → Schemas: targets · Frontend queries mirror CMS content models
- Schemas → Preview: supports · Schema content is previewed in studio
- Media UI → Public media: consumes · Viewer and media features use public assets
- Media UI → Source assets: mirrors · Some presentation assets originate in source files
- Sitemap → Public media: publishes · Sitemap and static public files are served together
- SEO → Sitemap: aligns · SEO metadata complements sitemap output
- Project UI → Media UI: enhances · Portfolio UI can embed media-rich presentation