# shiruichan/shiruisan architecture

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

- Interactive diagram: https://gitdiagram.com/shiruichan/shiruisan
- Repository: https://github.com/shiruichan/shiruisan

## Overview

ShiruiSan is a bilingual personal portfolio and services site. Visitors browse the portfolio’s introduction, project case studies, services and process, then can reach the contact section; the site also exposes a contact API route. The Next.js language route mounts the portfolio client, while shared language/theme providers and translation data support the experience. The README documents the route structure, but sampled source does not establish that the contact form calls the API, so that link is omitted.

Main entry points: [`src/features/portfolio/PortfolioApp.tsx`](https://github.com/shiruichan/shiruisan/blob/main/src/features/portfolio/PortfolioApp.tsx) (Portfolio orchestrator), [`src/features/Header.tsx`](https://github.com/shiruichan/shiruisan/blob/main/src/features/Header.tsx) (Navigation header), [`src/features/portfolio/components/ServicesGrid.tsx`](https://github.com/shiruichan/shiruisan/blob/main/src/features/portfolio/components/ServicesGrid.tsx) (Service offers), [`src/features/Footer.tsx`](https://github.com/shiruichan/shiruisan/blob/main/src/features/Footer.tsx) (Site footer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routing["Routing and setup"]
  node_language_page["Language page<br/>[page.tsx]"]
  node_portfolio_client["Portfolio client"]
  node_providers["Site providers<br/>[Providers.tsx]"]
  node_contact_api["Contact endpoint<br/>[route.ts]"]
end

subgraph group_portfolio["Portfolio experience"]
  node_portfolio_app["Portfolio orchestrator<br/>[PortfolioApp.tsx]"]
  node_header["Navigation header<br/>[Header.tsx]"]
  node_hero["Hero introduction<br/>[Hero.tsx]"]
  node_about["About section<br/>[About.tsx]"]
  node_projects["Project cases<br/>[ProjectsGrid.tsx]"]
  node_services["Service offers<br/>[ServicesGrid.tsx]"]
  node_process["Work process<br/>[ProcessSection.tsx]"]
  node_about_content["Profile details<br/>[AboutContent.tsx]"]
  node_contact_form["Contact form<br/>[ContactForm.tsx]"]
  node_footer["Site footer<br/>[Footer.tsx]"]
end

subgraph group_content["Content and localization"]
  node_translations["Translation catalog<br/>[i18n.ts]"]
  node_portfolio_data["Portfolio content<br/>[data.ts]"]
  node_profile_data["Profile settings<br/>[profile.ts]"]
end

subgraph group_runtime["Shared runtime"]
  node_language_state["Language state<br/>[useLang.tsx]"]
  node_theme_state["Theme state<br/>[useTheme.tsx]"]
  node_analytics["Event tracking<br/>[useAnalytics.ts]"]
end

node_visitor(("Site visitor"))

node_visitor -->|"opens route"| node_language_page
node_language_page -->|"renders"| node_portfolio_client
node_portfolio_client -->|"renders"| node_portfolio_app
node_providers -->|"provides"| node_language_state
node_providers -->|"provides"| node_theme_state
node_portfolio_app -->|"renders"| node_header
node_portfolio_app -->|"renders"| node_hero
node_portfolio_app -->|"renders"| node_about
node_portfolio_app -->|"renders"| node_projects
node_portfolio_app -->|"renders"| node_services
node_portfolio_app -->|"renders"| node_process
node_portfolio_app -->|"renders"| node_about_content
node_portfolio_app -->|"renders"| node_contact_form
node_portfolio_app -->|"renders"| node_footer
node_portfolio_app -->|"reads translations"| node_translations
node_portfolio_app -->|"reads language"| node_language_state
node_header -->|"reads and sets"| node_language_state
node_header -->|"reads and sets"| node_theme_state
node_header -->|"reads navigation"| node_portfolio_data
node_header -->|"reads labels"| node_translations
node_projects -->|"reads project data"| node_portfolio_data
node_services -->|"reads contact link"| node_profile_data
node_services -->|"tracks clicks"| node_analytics
node_services -->|"reads translations"| node_translations
node_contact_form -->|"reads profile"| node_profile_data
node_about_content -->|"reads content"| node_portfolio_data
node_footer -->|"reads content"| node_portfolio_data
node_footer -->|"reads language"| node_language_state
node_footer -->|"reads labels"| node_translations
node_contact_api -->|"reads profile"| node_profile_data

click node_language_page "https://github.com/shiruichan/shiruisan/blob/main/app/%5Blang%5D/page.tsx"
click node_portfolio_client "https://github.com/shiruichan/shiruisan/blob/main/app/(site)/components/PortfolioAppClient.tsx"
click node_providers "https://github.com/shiruichan/shiruisan/blob/main/app/(site)/Providers.tsx"
click node_portfolio_app "https://github.com/shiruichan/shiruisan/blob/main/src/features/portfolio/PortfolioApp.tsx"
click node_header "https://github.com/shiruichan/shiruisan/blob/main/src/features/Header.tsx"
click node_hero "https://github.com/shiruichan/shiruisan/blob/main/src/features/portfolio/components/Hero.tsx"
click node_about "https://github.com/shiruichan/shiruisan/blob/main/src/features/portfolio/components/About/About.tsx"
click node_projects "https://github.com/shiruichan/shiruisan/blob/main/src/features/portfolio/components/ProjectsGrid.tsx"
click node_services "https://github.com/shiruichan/shiruisan/blob/main/src/features/portfolio/components/ServicesGrid.tsx"
click node_process "https://github.com/shiruichan/shiruisan/blob/main/src/features/portfolio/components/ProcessSection.tsx"
click node_about_content "https://github.com/shiruichan/shiruisan/blob/main/src/features/portfolio/components/About/AboutContent.tsx"
click node_contact_form "https://github.com/shiruichan/shiruisan/blob/main/src/features/portfolio/components/ContactForm.tsx"
click node_footer "https://github.com/shiruichan/shiruisan/blob/main/src/features/Footer.tsx"
click node_contact_api "https://github.com/shiruichan/shiruisan/blob/main/app/api/contact/route.ts"
click node_language_state "https://github.com/shiruichan/shiruisan/blob/main/src/hooks/useLang.tsx"
click node_theme_state "https://github.com/shiruichan/shiruisan/blob/main/src/hooks/useTheme.tsx"
click node_translations "https://github.com/shiruichan/shiruisan/blob/main/src/shared/i18n.ts"
click node_portfolio_data "https://github.com/shiruichan/shiruisan/blob/main/src/shared/data.ts"
click node_profile_data "https://github.com/shiruichan/shiruisan/blob/main/src/shared/profile.ts"
click node_analytics "https://github.com/shiruichan/shiruisan/blob/main/src/hooks/useAnalytics.ts"

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_language_page,node_portfolio_client,node_providers,node_contact_api toneBlue
class node_portfolio_app,node_header,node_hero,node_about,node_projects,node_services,node_process,node_about_content,node_contact_form,node_footer toneAmber
class node_translations,node_portfolio_data,node_profile_data toneMint
class node_language_state,node_theme_state,node_analytics toneRose
class node_visitor toneIndigo
```

## Components

### Routing and setup

- [Language page](https://github.com/shiruichan/shiruisan/blob/main/app/%5Blang%5D/page.tsx): `app/[lang]/page.tsx`
- [Portfolio client](https://github.com/shiruichan/shiruisan/blob/main/app/(site)/components/PortfolioAppClient.tsx): `app/(site)/components/PortfolioAppClient.tsx`
- [Site providers](https://github.com/shiruichan/shiruisan/blob/main/app/(site)/Providers.tsx): `app/(site)/Providers.tsx`
- [Contact endpoint](https://github.com/shiruichan/shiruisan/blob/main/app/api/contact/route.ts): `app/api/contact/route.ts`

### Portfolio experience

- [Portfolio orchestrator](https://github.com/shiruichan/shiruisan/blob/main/src/features/portfolio/PortfolioApp.tsx): `src/features/portfolio/PortfolioApp.tsx`
- [Navigation header](https://github.com/shiruichan/shiruisan/blob/main/src/features/Header.tsx): `src/features/Header.tsx`
- [Hero introduction](https://github.com/shiruichan/shiruisan/blob/main/src/features/portfolio/components/Hero.tsx): `src/features/portfolio/components/Hero.tsx`
- [About section](https://github.com/shiruichan/shiruisan/blob/main/src/features/portfolio/components/About/About.tsx): `src/features/portfolio/components/About/About.tsx`
- [Project cases](https://github.com/shiruichan/shiruisan/blob/main/src/features/portfolio/components/ProjectsGrid.tsx): `src/features/portfolio/components/ProjectsGrid.tsx`
- [Service offers](https://github.com/shiruichan/shiruisan/blob/main/src/features/portfolio/components/ServicesGrid.tsx): `src/features/portfolio/components/ServicesGrid.tsx`
- [Work process](https://github.com/shiruichan/shiruisan/blob/main/src/features/portfolio/components/ProcessSection.tsx): `src/features/portfolio/components/ProcessSection.tsx`
- [Profile details](https://github.com/shiruichan/shiruisan/blob/main/src/features/portfolio/components/About/AboutContent.tsx): `src/features/portfolio/components/About/AboutContent.tsx`
- [Contact form](https://github.com/shiruichan/shiruisan/blob/main/src/features/portfolio/components/ContactForm.tsx): `src/features/portfolio/components/ContactForm.tsx`
- [Site footer](https://github.com/shiruichan/shiruisan/blob/main/src/features/Footer.tsx): `src/features/Footer.tsx`

### Content and localization

- [Translation catalog](https://github.com/shiruichan/shiruisan/blob/main/src/shared/i18n.ts): `src/shared/i18n.ts`
- [Portfolio content](https://github.com/shiruichan/shiruisan/blob/main/src/shared/data.ts): `src/shared/data.ts`
- [Profile settings](https://github.com/shiruichan/shiruisan/blob/main/src/shared/profile.ts): `src/shared/profile.ts`

### Shared runtime

- [Language state](https://github.com/shiruichan/shiruisan/blob/main/src/hooks/useLang.tsx): `src/hooks/useLang.tsx`
- [Theme state](https://github.com/shiruichan/shiruisan/blob/main/src/hooks/useTheme.tsx): `src/hooks/useTheme.tsx`
- [Event tracking](https://github.com/shiruichan/shiruisan/blob/main/src/hooks/useAnalytics.ts): `src/hooks/useAnalytics.ts`

### Other components

- **Site visitor**

## Connections

- Site visitor → Language page: opens route
- Language page → Portfolio client: renders (evidence: `app/[lang]/page.tsx`)
- Portfolio client → Portfolio orchestrator: renders (evidence: `app/(site)/components/PortfolioAppClient.tsx`)
- Site providers → Language state: provides (evidence: `app/(site)/Providers.tsx`)
- Site providers → Theme state: provides (evidence: `app/(site)/Providers.tsx`)
- Portfolio orchestrator → Navigation header: renders (evidence: `src/features/portfolio/PortfolioApp.tsx`)
- Portfolio orchestrator → Hero introduction: renders (evidence: `src/features/portfolio/PortfolioApp.tsx`)
- Portfolio orchestrator → About section: renders (evidence: `src/features/portfolio/PortfolioApp.tsx`)
- Portfolio orchestrator → Project cases: renders (evidence: `src/features/portfolio/PortfolioApp.tsx`)
- Portfolio orchestrator → Service offers: renders (evidence: `src/features/portfolio/PortfolioApp.tsx`)
- Portfolio orchestrator → Work process: renders (evidence: `src/features/portfolio/PortfolioApp.tsx`)
- Portfolio orchestrator → Profile details: renders (evidence: `src/features/portfolio/PortfolioApp.tsx`)
- Portfolio orchestrator → Contact form: renders (evidence: `src/features/portfolio/PortfolioApp.tsx`)
- Portfolio orchestrator → Site footer: renders (evidence: `src/features/portfolio/PortfolioApp.tsx`)
- Portfolio orchestrator → Translation catalog: reads translations (evidence: `src/features/portfolio/PortfolioApp.tsx`)
- Portfolio orchestrator → Language state: reads language (evidence: `src/features/portfolio/PortfolioApp.tsx`)
- Navigation header → Language state: reads and sets (evidence: `src/features/Header.tsx`)
- Navigation header → Theme state: reads and sets (evidence: `src/features/Header.tsx`)
- Navigation header → Portfolio content: reads navigation (evidence: `src/features/Header.tsx`)
- Navigation header → Translation catalog: reads labels (evidence: `src/features/Header.tsx`)
- Project cases → Portfolio content: reads project data
- Service offers → Profile settings: reads contact link (evidence: `src/features/portfolio/components/ServicesGrid.tsx`)
- Service offers → Event tracking: tracks clicks (evidence: `src/features/portfolio/components/ServicesGrid.tsx`)
- Service offers → Translation catalog: reads translations (evidence: `src/features/portfolio/components/ServicesGrid.tsx`)
- Contact form → Profile settings: reads profile (evidence: `src/features/portfolio/components/ContactForm.tsx`)
- Profile details → Portfolio content: reads content (evidence: `src/features/portfolio/components/About/AboutContent.tsx`)
- Site footer → Portfolio content: reads content (evidence: `src/features/Footer.tsx`)
- Site footer → Language state: reads language (evidence: `src/features/Footer.tsx`)
- Site footer → Translation catalog: reads labels (evidence: `src/features/Footer.tsx`)
- Contact endpoint → Profile settings: reads profile (evidence: `app/api/contact/route.ts`)
