# useripx/42-doraemon architecture

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

- Interactive diagram: https://gitdiagram.com/useripx/42-doraemon
- Repository: https://github.com/useripx/42-doraemon

## Overview

Doraemon is a small Python Turtle creative-drawing app. Running Doraemon.py configures a Turtle screen and drawing state, then Doraemon() coordinates the character’s drawing stages before the program enters mainloop() and leaves the window open. Drawing helpers use Turtle operations directly; they are not separate services. The README documents the geometry, palette, and smooth-rendering intent. The sampled source supports the drawing flow; no separate runtime modules or storage are present.

Main entry points: [`Doraemon.py`](https://github.com/useripx/42-doraemon/blob/main/Doraemon.py) (Doraemon)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry"]
  node_entrypoint["Screen setup<br/>[Doraemon.py]"]
end

subgraph group_drawing["Character drawing"]
  node_composition["Doraemon<br/>[Doraemon.py]"]
  node_head["Face and eyes<br/>[Doraemon.py]"]
  node_features["Facial details<br/>[Doraemon.py]"]
  node_body["Body and bell<br/>[Doraemon.py]"]
  node_helpers["Position helper<br/>[Doraemon.py]"]
end

subgraph group_turtle["Turtle graphics"]
  node_graphics["Turtle API"]
  node_screen["Turtle window"]
end

node_user(("User"))

node_user -->|"runs script"| node_entrypoint
node_entrypoint -->|"configures screen"| node_graphics
node_entrypoint -->|"calls drawing"| node_composition
node_composition -->|"draws head"| node_head
node_composition -->|"draws details"| node_features
node_composition -->|"draws body"| node_body
node_head -->|"positions with"| node_helpers
node_features -->|"positions with"| node_helpers
node_body -->|"positions with"| node_helpers
node_composition -->|"draws via"| node_graphics
node_head -->|"draws via"| node_graphics
node_features -->|"draws via"| node_graphics
node_body -->|"draws via"| node_graphics
node_helpers -->|"moves via"| node_graphics
node_graphics -->|"renders"| node_screen
node_entrypoint -->|"enters mainloop"| node_screen

click node_entrypoint "https://github.com/useripx/42-doraemon/blob/main/Doraemon.py"
click node_composition "https://github.com/useripx/42-doraemon/blob/main/Doraemon.py"
click node_head "https://github.com/useripx/42-doraemon/blob/main/Doraemon.py"
click node_features "https://github.com/useripx/42-doraemon/blob/main/Doraemon.py"
click node_body "https://github.com/useripx/42-doraemon/blob/main/Doraemon.py"
click node_helpers "https://github.com/useripx/42-doraemon/blob/main/Doraemon.py"

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_entrypoint,node_user toneBlue
class node_composition,node_head,node_features,node_body,node_helpers toneAmber
class node_graphics,node_screen toneMint
```

## Components

### App entry

- [Screen setup](https://github.com/useripx/42-doraemon/blob/main/Doraemon.py): `Doraemon.py`

### Character drawing

- [Doraemon](https://github.com/useripx/42-doraemon/blob/main/Doraemon.py): `Doraemon.py`
- [Face and eyes](https://github.com/useripx/42-doraemon/blob/main/Doraemon.py): `Doraemon.py`
- [Facial details](https://github.com/useripx/42-doraemon/blob/main/Doraemon.py): `Doraemon.py`
- [Body and bell](https://github.com/useripx/42-doraemon/blob/main/Doraemon.py): `Doraemon.py`
- [Position helper](https://github.com/useripx/42-doraemon/blob/main/Doraemon.py): `Doraemon.py`

### Turtle graphics

- **Turtle API**
- **Turtle window**

### Other components

- **User**

## Connections

- User → Screen setup: runs script
- Screen setup → Turtle API: configures screen
- Screen setup → Doraemon: calls drawing
- Doraemon → Face and eyes: draws head
- Doraemon → Facial details: draws details
- Doraemon → Body and bell: draws body
- Face and eyes → Position helper: positions with
- Facial details → Position helper: positions with
- Body and bell → Position helper: positions with
- Doraemon → Turtle API: draws via
- Face and eyes → Turtle API: draws via
- Facial details → Turtle API: draws via
- Body and bell → Turtle API: draws via
- Position helper → Turtle API: moves via
- Turtle API → Turtle window: renders
- Screen setup → Turtle window: enters mainloop
