# mijeeapps-collab/it-skill-quiz architecture

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

- Interactive diagram: https://gitdiagram.com/mijeeapps-collab/it-skill-quiz
- Repository: https://github.com/mijeeapps-collab/it-skill-quiz

## Overview

1. **Project shape**
   - This is a small, single-route **Next.js App Router** application.
   - There are no visible API routes, server actions, database layers, or external service integrations in the tree, so the runtime architecture is primarily **client-side UI state + local content**.

2. **Top-level entry points**
   - `app/layout.tsx` defines the shared document shell.
   - `app/page.tsx` is the main application entry and likely contains the core state machine for the quiz flow.
   - `app/globals.css` provides global styling across the app.

3. **Main user flow**
   - The component set suggests a flow like: **start screen → category selection → quiz questions → progress feedback → result screen**.
   - `StartScreen`, `CategoryCard`, `QuizCard`, `ProgressBar`, and `ResultCard` map directly to these stages.

4. **UI subsystem**
   - `components/` contains the presentational building blocks:
     - `StartScreen.tsx` for the landing/entry state.
     - `CategoryCard.tsx` for category choice or display.
     - `QuizCard.tsx` for question rendering and answer interaction.
     - `ProgressBar.tsx` for tracking progress through the quiz.
     - `ResultCard.tsx` for final scoring or outcome display.
   - This separation keeps screen composition in the page layer and display logic in reusable components.

5. **State and orchestration boundary**
   - `app/page.tsx` is the likely orchestration layer that coordinates:
     - current screen/state,
     - selected category,
     - current question index,
     - accumulated score or completion result.
   - In diagram terms, this is the main control node between static data and the UI components.

6. **Data model**
   - `types/question.ts` defines the core domain types for the quiz data.
   - This acts as the contract between content (`data/questions.ts`) and the rendering components, ensuring consistent question/category/result structures.

7. **Content source**
   - `data/questions.ts` is the local content store for quiz questions.
   - Because questions live in the repository rather than in a backend, the app is **content-driven but offline/local-data based**.
   - The file tree suggests questions are grouped by category or similar metadata.

8. **Styling and design system**
   - Styling is handled with standard Next.js CSS:
     - `app/globals.css` for global rules,
     - `postcss.config.mjs` for CSS processing.
   - There is no dedicated CSS-in-JS or component library visible, so the visual layer is likely custom and lightweight.

9. **Platform/runtime dependencies**
   - The stack is **TypeScript + React + Next.js**.
   - `package.json`, `tsconfig.json`, `eslint.config.mjs`, and `next.config.ts` indicate a standard Next.js TypeScript setup with linting and build configuration.
   - `package-lock.json` shows npm is the package manager in use.

10. **Static assets and deployment**
   - `public/` is the static asset boundary for images, icons, and other files served directly by Next.js.
   - The README indicates default **Vercel-compatible** deployment, but nothing in the tree suggests custom infrastructure beyond standard Next.js hosting.

11. **Documentation / stray artifacts**
   - `README.md` is the generic create-next-app scaffold, so it does not document domain behavior.
   - `第一歩.txt` and `第二歩.txt` look like repository notes or draft content files; they are not part of the obvious app runtime path but may inform content or future development.

12. **Architecture summary**
   - The repo is best diagrammed as: **one Next.js page orchestrating a quiz experience**, backed by **local typed question data**, and rendered through a **small set of screen-specific UI components**.
   - The main boundary is between **content/model** (`data/`, `types/`) and **presentation/control** (`app/`, `components/`), with no backend boundary present.

Main entry points: [`app/page.tsx`](https://github.com/mijeeapps-collab/it-skill-quiz/blob/main/app/page.tsx) (Quiz page), [`app/layout.tsx`](https://github.com/mijeeapps-collab/it-skill-quiz/blob/main/app/layout.tsx) (Layout), [`data/questions.ts`](https://github.com/mijeeapps-collab/it-skill-quiz/blob/main/data/questions.ts) (Questions data), [`types/question.ts`](https://github.com/mijeeapps-collab/it-skill-quiz/blob/main/types/question.ts) (Question types)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App shell"]
  node_layout["Layout<br/>next shell<br/>[layout.tsx]"]
  node_page["Quiz page<br/>flow orchestrator<br/>[page.tsx]"]
  node_globals["Global CSS<br/>styles<br/>[globals.css]"]
end

subgraph group_ui["UI flow"]
  node_start["Start screen<br/>[StartScreen.tsx]"]
  node_category["Category card<br/>selection UI<br/>[CategoryCard.tsx]"]
  node_quiz["Quiz card<br/>question UI<br/>[QuizCard.tsx]"]
  node_progress["Progress bar<br/>feedback UI<br/>[ProgressBar.tsx]"]
  node_result["Result card<br/>outcome UI<br/>[ResultCard.tsx]"]
end

subgraph group_content["Content model"]
  node_questions["Questions data<br/>content store<br/>[questions.ts]"]
  node_questiontypes["Question types<br/>domain types<br/>[question.ts]"]
end

subgraph group_platform["Platform"]
  node_nextconfig["Next config<br/>build config<br/>[next.config.ts]"]
  node_postcss["PostCSS<br/>style pipeline<br/>[postcss.config.mjs]"]
  node_eslint["ESLint<br/>lint config<br/>[eslint.config.mjs]"]
  node_tsconfig["TS config<br/>compiler config<br/>[tsconfig.json]"]
  node_packagejson["Package manifest<br/>deps manifest<br/>[package.json]"]
  node_public[("Public assets<br/>static assets")]
end

node_layout -->|"renders"| node_page
node_page -->|"entry state"| node_start
node_page -->|"selects category"| node_category
node_page -->|"drives quiz"| node_quiz
node_page -->|"tracks progress"| node_progress
node_page -->|"shows result"| node_result
node_page -->|"reads content"| node_questions
node_questions -->|"typed by"| node_questiontypes
node_quiz -->|"consumes types"| node_questiontypes
node_category -->|"filters data"| node_questions
node_start -->|"starts flow"| node_page
node_result -->|"restarts flow"| node_page
node_globals -->|"applies to"| node_layout
node_nextconfig -->|"builds app"| node_page
node_postcss -->|"processes"| node_globals
node_packagejson -->|"configures"| node_nextconfig
node_eslint -->|"checks"| node_page
node_tsconfig -->|"compiles"| node_questiontypes
node_public -->|"serves assets"| node_layout

click node_layout "https://github.com/mijeeapps-collab/it-skill-quiz/blob/main/app/layout.tsx"
click node_page "https://github.com/mijeeapps-collab/it-skill-quiz/blob/main/app/page.tsx"
click node_globals "https://github.com/mijeeapps-collab/it-skill-quiz/blob/main/app/globals.css"
click node_start "https://github.com/mijeeapps-collab/it-skill-quiz/blob/main/components/StartScreen.tsx"
click node_category "https://github.com/mijeeapps-collab/it-skill-quiz/blob/main/components/CategoryCard.tsx"
click node_quiz "https://github.com/mijeeapps-collab/it-skill-quiz/blob/main/components/QuizCard.tsx"
click node_progress "https://github.com/mijeeapps-collab/it-skill-quiz/blob/main/components/ProgressBar.tsx"
click node_result "https://github.com/mijeeapps-collab/it-skill-quiz/blob/main/components/ResultCard.tsx"
click node_questions "https://github.com/mijeeapps-collab/it-skill-quiz/blob/main/data/questions.ts"
click node_questiontypes "https://github.com/mijeeapps-collab/it-skill-quiz/blob/main/types/question.ts"
click node_nextconfig "https://github.com/mijeeapps-collab/it-skill-quiz/blob/main/next.config.ts"
click node_postcss "https://github.com/mijeeapps-collab/it-skill-quiz/blob/main/postcss.config.mjs"
click node_eslint "https://github.com/mijeeapps-collab/it-skill-quiz/blob/main/eslint.config.mjs"
click node_tsconfig "https://github.com/mijeeapps-collab/it-skill-quiz/blob/main/tsconfig.json"
click node_packagejson "https://github.com/mijeeapps-collab/it-skill-quiz/blob/main/package.json"
click node_public "https://github.com/mijeeapps-collab/it-skill-quiz/tree/main/public"

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_layout,node_page,node_globals toneBlue
class node_start,node_category,node_quiz,node_progress,node_result toneAmber
class node_questions,node_questiontypes toneMint
class node_nextconfig,node_postcss,node_eslint,node_tsconfig,node_packagejson,node_public toneRose
```

## Components

### App shell

Next.js App Router entry and global styling

- [Layout](https://github.com/mijeeapps-collab/it-skill-quiz/blob/main/app/layout.tsx): next shell · Shared document and app shell · `app/layout.tsx`
- [Quiz page](https://github.com/mijeeapps-collab/it-skill-quiz/blob/main/app/page.tsx): flow orchestrator · Main route that coordinates quiz state and screen transitions · `app/page.tsx`
- [Global CSS](https://github.com/mijeeapps-collab/it-skill-quiz/blob/main/app/globals.css): styles · App-wide styling rules · `app/globals.css`

### UI flow

Screen components composing the quiz experience

- [Start screen](https://github.com/mijeeapps-collab/it-skill-quiz/blob/main/components/StartScreen.tsx): screen · Entry screen for beginning the quiz · `components/StartScreen.tsx`
- [Category card](https://github.com/mijeeapps-collab/it-skill-quiz/blob/main/components/CategoryCard.tsx): selection UI · Category choice or display component · `components/CategoryCard.tsx`
- [Quiz card](https://github.com/mijeeapps-collab/it-skill-quiz/blob/main/components/QuizCard.tsx): question UI · Renders questions and answer interaction · `components/QuizCard.tsx`
- [Progress bar](https://github.com/mijeeapps-collab/it-skill-quiz/blob/main/components/ProgressBar.tsx): feedback UI · Shows quiz completion progress · `components/ProgressBar.tsx`
- [Result card](https://github.com/mijeeapps-collab/it-skill-quiz/blob/main/components/ResultCard.tsx): outcome UI · Displays final score or outcome · `components/ResultCard.tsx`

### Content model

Typed local quiz data and domain contracts

- [Questions data](https://github.com/mijeeapps-collab/it-skill-quiz/blob/main/data/questions.ts): content store · Local quiz content grouped by category · `data/questions.ts`
- [Question types](https://github.com/mijeeapps-collab/it-skill-quiz/blob/main/types/question.ts): domain types · Shared TypeScript contracts for quiz data · `types/question.ts`

### Platform

Build, lint, and runtime configuration

- [Next config](https://github.com/mijeeapps-collab/it-skill-quiz/blob/main/next.config.ts): build config · Next.js configuration · `next.config.ts`
- [PostCSS](https://github.com/mijeeapps-collab/it-skill-quiz/blob/main/postcss.config.mjs): style pipeline · CSS processing configuration · `postcss.config.mjs`
- [ESLint](https://github.com/mijeeapps-collab/it-skill-quiz/blob/main/eslint.config.mjs): lint config · Code quality rules · `eslint.config.mjs`
- [TS config](https://github.com/mijeeapps-collab/it-skill-quiz/blob/main/tsconfig.json): compiler config · TypeScript project settings · `tsconfig.json`
- [Package manifest](https://github.com/mijeeapps-collab/it-skill-quiz/blob/main/package.json): deps manifest · Project dependencies and scripts · `package.json`
- [Public assets](https://github.com/mijeeapps-collab/it-skill-quiz/tree/main/public): static assets · Static files served directly by Next.js · `public`

## Connections

- Layout → Quiz page: renders · Layout wraps the route content
- Quiz page → Start screen: entry state · Initial screen shown before the quiz begins
- Quiz page → Category card: selects category · Handles category choice and display
- Quiz page → Quiz card: drives quiz · Coordinates question display and answer flow
- Quiz page → Progress bar: tracks progress · Updates completion feedback during the quiz
- Quiz page → Result card: shows result · Presents the final outcome after completion
- Quiz page → Questions data: reads content · Uses local question bank as the quiz source
- Questions data → Question types: typed by · Question data conforms to shared domain types
- Quiz card → Question types: consumes types · Question rendering depends on the quiz schema
- Category card → Questions data: filters data · Category selection maps into grouped question content
- Start screen → Quiz page: starts flow · User action enters the orchestrated quiz state machine
- Result card → Quiz page: restarts flow · Outcome screen returns control to the page orchestrator
- Global CSS → Layout: applies to · Global styles are loaded through the app shell
- Next config → Quiz page: builds app · Next.js config supports the App Router runtime
- PostCSS → Global CSS: processes · PostCSS handles stylesheet processing
- Package manifest → Next config: configures · Project dependencies and scripts support the build setup
- ESLint → Quiz page: checks · Linting covers the application code
- TS config → Question types: compiles · TypeScript configuration governs shared types and app code
- Public assets → Layout: serves assets · Static files are available to the app shell
