# mohaneshwarishanmugaraj-arch/skincare-ai architecture

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

- Interactive diagram: https://gitdiagram.com/mohaneshwarishanmugaraj-arch/skincare-ai
- Repository: https://github.com/mohaneshwarishanmugaraj-arch/skincare-ai

## Overview

This small Next.js skincare app guides a user through a skin-profile quiz, submits the answers to an API route, and displays the generated morning and evening routine. The route builds a prompt and requests a routine from OpenAI; no persistence is shown. The graph covers the evidenced UI, request handling, and AI generation, without treating framework setup as product behavior.

Main entry points: [`components/Quiz.tsx`](https://github.com/mohaneshwarishanmugaraj-arch/skincare-ai/blob/main/components/Quiz.tsx) (Profile quiz), [`app/api/skincare/route.ts`](https://github.com/mohaneshwarishanmugaraj-arch/skincare-ai/blob/main/app/api/skincare/route.ts) (Skincare API), [`app/page.tsx`](https://github.com/mohaneshwarishanmugaraj-arch/skincare-ai/blob/main/app/page.tsx) (Home page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Quiz experience"]
  node_home["Home page<br/>[page.tsx]"]
  node_quiz["Profile quiz<br/>[Quiz.tsx]"]
  node_routine["Routine result<br/>[Quiz.tsx]"]
end

subgraph group_generation["Routine generation"]
  node_api["Skincare API<br/>[route.ts]"]
  node_openai{{"OpenAI chat"}}
end

node_user(("Skincare user"))

node_user -->|"opens"| node_home
node_home -->|"renders"| node_quiz
node_user -->|"enters profile"| node_quiz
node_quiz -->|"posts answers"| node_api
node_api -->|"requests routine"| node_openai
node_api -->|"returns routine"| node_routine
node_quiz -->|"renders result"| node_routine

click node_home "https://github.com/mohaneshwarishanmugaraj-arch/skincare-ai/blob/main/app/page.tsx"
click node_quiz "https://github.com/mohaneshwarishanmugaraj-arch/skincare-ai/blob/main/components/Quiz.tsx"
click node_api "https://github.com/mohaneshwarishanmugaraj-arch/skincare-ai/blob/main/app/api/skincare/route.ts"
click node_routine "https://github.com/mohaneshwarishanmugaraj-arch/skincare-ai/blob/main/components/Quiz.tsx"

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_home,node_quiz,node_routine,node_user toneBlue
class node_api,node_openai toneAmber
```

## Components

### Quiz experience

- [Home page](https://github.com/mohaneshwarishanmugaraj-arch/skincare-ai/blob/main/app/page.tsx): `app/page.tsx`
- [Profile quiz](https://github.com/mohaneshwarishanmugaraj-arch/skincare-ai/blob/main/components/Quiz.tsx): `components/Quiz.tsx`
- [Routine result](https://github.com/mohaneshwarishanmugaraj-arch/skincare-ai/blob/main/components/Quiz.tsx): `components/Quiz.tsx`

### Routine generation

- [Skincare API](https://github.com/mohaneshwarishanmugaraj-arch/skincare-ai/blob/main/app/api/skincare/route.ts): `app/api/skincare/route.ts`
- **OpenAI chat**

### Other components

- **Skincare user**

## Connections

- Skincare user → Home page: opens
- Home page → Profile quiz: renders (evidence: `app/page.tsx`)
- Skincare user → Profile quiz: enters profile (evidence: `components/Quiz.tsx`)
- Profile quiz → Skincare API: posts answers (evidence: `components/Quiz.tsx`)
- Skincare API → OpenAI chat: requests routine (evidence: `app/api/skincare/route.ts`)
- Skincare API → Routine result: returns routine (evidence: `app/api/skincare/route.ts`)
- Profile quiz → Routine result: renders result (evidence: `components/Quiz.tsx`)
