How moodykroko/my-portfolio works
1. This repository is an Astro-based static site, likely a portfolio or case-study website rather than a traditional app backend. The architecture is centered on file-based routes in src/pages, reusable UI pieces in src/components, shared page framing in src/layouts, and global styling in src/styles.
2. The main site surfaces as standard Astro routes:
- src/pages/index.astro for the homepage
- src/pages/about.astro
- src/pages/work/index.astro for the work listing
- src/pages/work/project-1.astro, project-2.astro
- a nested case study area under src/pages/work/goodnotes-folder-colours/
This implies a content-driven site where each page is independently rendered from route files.
3. The src/pages/work/goodnotes-folder-colours/ subtree is the clearest example of a case-study template split into multiple pieces:
- index.astro as the route entry
- content.astro for the main narrative/content
- supporting static design-handoff documents in sibling folders like design_handoff_problem_section, design_handoff_user_need_section, and design_handoff_exploration_section
Architecturally, this suggests the site is organized around modular sections that can be composed into a long-form project presentation.
4. Shared layout and navigation are handled through components:
- src/layouts/Layout.astro likely defines the common shell
- src/components/Nav.astro and Footer.astro provide global chrome
- ProjectCard.astro, StackSection.astro, and ContactSection.astro encapsulate repeatable content blocks
These components form the presentation layer boundary: pages assemble them, but the components own the reusable structure and styling hooks.
5. The site’s content flow is mostly top-down and static: page routes import shared layout/components, render curated content, and rely on assets from src/assets and public. There is no visible database, CMS, or client-side state layer in the tree, so the architecture is primarily build-time composition rather than runtime data orchestration.
6. Static assets are split by purpose:
- public/solution-video.mp4 is a directly served media asset
- src/assets/Device Bezels/iPad and src/assets/icons appear to be imported assets used inside components or pages
This indicates the site mixes Astro-managed asset imports with public static files for direct URL access, especially for media-heavy case study pages.
7. There is a small server-side boundary at src/pages/api/cs-auth.ts. Because it lives under src/pages/api, Astro will expose it as an API route. Its exact role isn’t visible from the tree, but it is the only explicit backend endpoint and likely serves some kind of content/security/authentication function for a specific section of the site.
8. src/middleware.ts adds another request-time boundary. Middleware in Astro runs before route handling, so it can enforce access rules, redirects, localization, or other cross-cutting request logic. Combined with the API route, it suggests the site is not purely static in behavior, even if the main content is pre-rendered.
9. Styling is centralized in src/styles/global.css, which likely sets global typography, spacing, and theme tokens used by all pages. The architecture appears to rely more on component composition plus one global stylesheet than on a large utility framework.
10. The repo includes astro.config.mjs, tsconfig.json, and package.json with the usual Astro toolchain. The runtime is Node-based build tooling for generating a static production site into dist/, with local dev and preview modes matching standard Astro workflows.
11. The design_handoff_* folders and HTML files look like source artifacts for content review or presentation of design process sections, not runtime app logic. They likely support the work/case-study narrative and may have been generated or hand-authored for stakeholder handoff.
12. In diagram terms, the cleanest abstraction is:
- browser requests route-specific Astro pages
- pages compose shared layout/components
- components render content using static assets
- global CSS provides the styling layer
- one API route and middleware handle the small amount of server-side request logic
The overall system is a content-first Astro site with a mostly static rendering model and a thin server-side edge for special route handling.
Main entry points: Layout.astro Layout · pages/index.astro Home · work/index.astro Work Index · cs-auth.ts CS Auth
Components 20
Routes
File-based Astro pages and page subtrees
- Home · Homepage route
src/pages/index.astro - About · About route
src/pages/about.astro - Work Index · Listing of projects
src/pages/work/index.astro - Project 1 · Standalone work case page
src/pages/work/project-1.astro - Project 2 · Standalone work case page
src/pages/work/project-2.astro - Goodnotes Route · Nested case-study entry route
src/pages/work/goodnotes-folder-colours/index.astro - Case Content · Long-form narrative content
src/pages/work/goodnotes-folder-colours/content.astro
UI
Shared layout, components, and styling
- Layout · Shared page frame
src/layouts/Layout.astro - Nav · Global navigation
src/components/Nav.astro - Footer · Global footer
src/components/Footer.astro - Project Card · Reusable project teaser
src/components/ProjectCard.astro - Stack Section · Reusable profile section
src/components/StackSection.astro - Contact Section · Reusable contact block
src/components/ContactSection.astro - Global CSS · Site-wide styling layer
src/styles/global.css
Content
Case-study artifacts and static media
- Assets · Imported images and icons
src/assets - Public Media · Directly served video asset
public/solution-video.mp4 - Handoff Docs · Design-review and section artifacts
design_handoff_problem_section
Server Edge
Request-time logic beyond static pages
- CS Auth · Server endpoint under /api
src/pages/api/cs-auth.ts - Middleware · Cross-cutting request logic
src/middleware.ts
Connections 26
- Home → Layout: uses · Homepage renders inside the shared shell
- About → Layout: uses · About page renders inside the shared shell
- Work Index → Layout: uses · Work listing uses the shared shell
- Project 1 → Layout: uses · Project page uses the shared shell
- Project 2 → Layout: uses · Project page uses the shared shell
- Goodnotes Route → Layout: uses · Case-study route uses the shared shell
- Layout → Nav: wraps · Layout composes global navigation
- Layout → Footer: wraps · Layout composes global footer
- Home → Project Card: renders · Homepage likely surfaces project teasers
- Work Index → Project Card: renders · Work index lists projects with cards
- Home → Stack Section: renders · Homepage can include profile/stack content
- Home → Contact Section: renders · Homepage can include contact CTA
- Goodnotes Route → Case Content: includes · Route entry delegates to long-form content
- Case Content → Assets: imports · Case-study content uses local assets
- Case Content → Public Media: references · Long-form content can embed direct media
- Project 1 → Handoff Docs: references · Project presentation may draw from handoff artifacts
- Project 2 → Handoff Docs: references · Project presentation may draw from handoff artifacts
- Home → Global CSS: styles · Global stylesheet affects all pages
- About → Global CSS: styles · Global stylesheet affects all pages
- Work Index → Global CSS: styles · Global stylesheet affects all pages
- Goodnotes Route → Global CSS: styles · Global stylesheet affects all pages
- CS Auth → Middleware: protected by · Request flow is shaped by middleware
- Home → CS Auth: may call · Special site behavior can reach the API route
- Work Index → CS Auth: may call · Special site behavior can reach the API route
- Astro Config → Home: builds · Astro config drives page generation
- Astro Config → CS Auth: builds · Astro config applies to API route generation