# boneli41/projeto-jogo-de-digitacao architecture

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

- Interactive diagram: https://gitdiagram.com/boneli41/projeto-jogo-de-digitacao
- Repository: https://github.com/boneli41/projeto-jogo-de-digitacao

## Overview

Digita Comigo is a Java Swing typing-practice game designed for older learners. The learner starts from the menu, chooses a starting practice module, types timed exercises with visual feedback, and sees a scored result before continuing or returning to the menu. The game also tracks lives, XP, levels, streaks, and achievements. The README documents keyboard guidance and a local ranking; their implementation details were not sampled, so those capabilities are shown without asserting unsupported storage or call relationships.

Main entry points: [`ui/panels/GamePanel.java`](https://github.com/boneli41/projeto-jogo-de-digitacao/blob/main/ui/panels/GamePanel.java) (Typing session), [`ui/TypingGame.java`](https://github.com/boneli41/projeto-jogo-de-digitacao/blob/main/ui/TypingGame.java) (Game window), [`ui/panels/MenuPanel.java`](https://github.com/boneli41/projeto-jogo-de-digitacao/blob/main/ui/panels/MenuPanel.java) (Start menu), [`ui/panels/ResultPanel.java`](https://github.com/boneli41/projeto-jogo-de-digitacao/blob/main/ui/panels/ResultPanel.java) (Exercise results)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Game interface"]
  node_entry["Application entry<br/>[Main.java]"]
  node_game["Game window<br/>[TypingGame.java]"]
  node_menu["Start menu<br/>[MenuPanel.java]"]
  node_gameplay["Typing session<br/>[GamePanel.java]"]
  node_results["Exercise results<br/>[ResultPanel.java]"]
  node_panelbase["Shared panel UI<br/>[BasePanel.java]"]
  node_keyboard["Visual keyboard<br/>[GamePanel.java]"]
  node_ranking["Ranking display<br/>[MenuPanel.java]"]
end

subgraph group_practice["Practice content"]
  node_factory["Exercise factory"]
  node_content["Practice text sets"]
  node_exercise["Exercise rules<br/>[Exercise.java]"]
  node_sentence["Sentence exercises"]
  node_letter["Letter exercises"]
  node_word["Word exercises<br/>[WordExercise.java]"]
end

subgraph group_progress["Player progress"]
  node_player["Player state<br/>[Player.java]"]
end

node_learner(("Learner"))

node_learner -->|"chooses module"| node_menu
node_entry -->|"launches"| node_game
node_game -->|"shows"| node_menu
node_game -->|"shows"| node_gameplay
node_game -->|"shows"| node_results
node_menu -->|"starts session"| node_game
node_gameplay -->|"creates campaign"| node_factory
node_factory -->|"loads text"| node_content
node_factory -->|"creates"| node_sentence
node_sentence -->|"extends"| node_exercise
node_letter -->|"extends"| node_exercise
node_word -->|"extends"| node_exercise
node_gameplay -->|"uses"| node_exercise
node_learner -->|"types exercise"| node_gameplay
node_gameplay -.->|"guides typing"| node_keyboard
node_gameplay -->|"updates progress"| node_player
node_gameplay -->|"submits result"| node_game
node_game -->|"passes score"| node_results
node_results -->|"displays stats"| node_player
node_results -->|"continues session"| node_game
node_menu -.->|"shows top scores"| node_ranking
node_menu -->|"inherits UI"| node_panelbase
node_gameplay -->|"inherits UI"| node_panelbase
node_results -->|"inherits UI"| node_panelbase

click node_entry "https://github.com/boneli41/projeto-jogo-de-digitacao/blob/main/Main.java"
click node_game "https://github.com/boneli41/projeto-jogo-de-digitacao/blob/main/ui/TypingGame.java"
click node_menu "https://github.com/boneli41/projeto-jogo-de-digitacao/blob/main/ui/panels/MenuPanel.java"
click node_gameplay "https://github.com/boneli41/projeto-jogo-de-digitacao/blob/main/ui/panels/GamePanel.java"
click node_results "https://github.com/boneli41/projeto-jogo-de-digitacao/blob/main/ui/panels/ResultPanel.java"
click node_panelbase "https://github.com/boneli41/projeto-jogo-de-digitacao/blob/main/ui/panels/BasePanel.java"
click node_keyboard "https://github.com/boneli41/projeto-jogo-de-digitacao/blob/main/ui/panels/GamePanel.java"
click node_ranking "https://github.com/boneli41/projeto-jogo-de-digitacao/blob/main/ui/panels/MenuPanel.java"
click node_factory "https://github.com/boneli41/projeto-jogo-de-digitacao/blob/main/factory/ExerciseFactory.java"
click node_content "https://github.com/boneli41/projeto-jogo-de-digitacao/tree/main/assets/exercises"
click node_exercise "https://github.com/boneli41/projeto-jogo-de-digitacao/blob/main/model/Exercise.java"
click node_sentence "https://github.com/boneli41/projeto-jogo-de-digitacao/blob/main/model/SentenceExercise.java"
click node_letter "https://github.com/boneli41/projeto-jogo-de-digitacao/blob/main/model/LetterExercise.java"
click node_word "https://github.com/boneli41/projeto-jogo-de-digitacao/blob/main/model/WordExercise.java"
click node_player "https://github.com/boneli41/projeto-jogo-de-digitacao/blob/main/model/Player.java"

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_entry,node_game,node_menu,node_gameplay,node_results,node_panelbase,node_keyboard,node_ranking toneBlue
class node_factory,node_content,node_exercise,node_sentence,node_letter,node_word toneAmber
class node_player toneMint
class node_learner toneIndigo
```

## Components

### Game interface

- [Application entry](https://github.com/boneli41/projeto-jogo-de-digitacao/blob/main/Main.java): `Main.java`
- [Game window](https://github.com/boneli41/projeto-jogo-de-digitacao/blob/main/ui/TypingGame.java): `ui/TypingGame.java`
- [Start menu](https://github.com/boneli41/projeto-jogo-de-digitacao/blob/main/ui/panels/MenuPanel.java): `ui/panels/MenuPanel.java`
- [Typing session](https://github.com/boneli41/projeto-jogo-de-digitacao/blob/main/ui/panels/GamePanel.java): `ui/panels/GamePanel.java`
- [Exercise results](https://github.com/boneli41/projeto-jogo-de-digitacao/blob/main/ui/panels/ResultPanel.java): `ui/panels/ResultPanel.java`
- [Shared panel UI](https://github.com/boneli41/projeto-jogo-de-digitacao/blob/main/ui/panels/BasePanel.java): `ui/panels/BasePanel.java`
- [Visual keyboard](https://github.com/boneli41/projeto-jogo-de-digitacao/blob/main/ui/panels/GamePanel.java): `ui/panels/GamePanel.java`
- [Ranking display](https://github.com/boneli41/projeto-jogo-de-digitacao/blob/main/ui/panels/MenuPanel.java): `ui/panels/MenuPanel.java`

### Practice content

- [Exercise factory](https://github.com/boneli41/projeto-jogo-de-digitacao/blob/main/factory/ExerciseFactory.java): `factory/ExerciseFactory.java`
- [Practice text sets](https://github.com/boneli41/projeto-jogo-de-digitacao/tree/main/assets/exercises): `assets/exercises`
- [Exercise rules](https://github.com/boneli41/projeto-jogo-de-digitacao/blob/main/model/Exercise.java): `model/Exercise.java`
- [Sentence exercises](https://github.com/boneli41/projeto-jogo-de-digitacao/blob/main/model/SentenceExercise.java): `model/SentenceExercise.java`
- [Letter exercises](https://github.com/boneli41/projeto-jogo-de-digitacao/blob/main/model/LetterExercise.java): `model/LetterExercise.java`
- [Word exercises](https://github.com/boneli41/projeto-jogo-de-digitacao/blob/main/model/WordExercise.java): `model/WordExercise.java`

### Player progress

- [Player state](https://github.com/boneli41/projeto-jogo-de-digitacao/blob/main/model/Player.java): `model/Player.java`

### Other components

- **Learner**

## Connections

- Learner → Start menu: chooses module (evidence: `README.md`)
- Application entry → Game window: launches (evidence: `Main.java`)
- Game window → Start menu: shows (evidence: `ui/TypingGame.java`)
- Game window → Typing session: shows (evidence: `ui/TypingGame.java`)
- Game window → Exercise results: shows (evidence: `ui/TypingGame.java`)
- Start menu → Game window: starts session (evidence: `ui/panels/MenuPanel.java`)
- Typing session → Exercise factory: creates campaign (evidence: `ui/panels/GamePanel.java`)
- Exercise factory → Practice text sets: loads text (evidence: `factory/ExerciseFactory.java`)
- Exercise factory → Sentence exercises: creates (evidence: `factory/ExerciseFactory.java`)
- Sentence exercises → Exercise rules: extends (evidence: `model/SentenceExercise.java`)
- Letter exercises → Exercise rules: extends (evidence: `model/LetterExercise.java`)
- Word exercises → Exercise rules: extends (evidence: `model/WordExercise.java`)
- Typing session → Exercise rules: uses (evidence: `ui/panels/GamePanel.java`)
- Learner → Typing session: types exercise (evidence: `README.md`)
- Typing session → Visual keyboard: guides typing (evidence: `ui/panels/GamePanel.java`)
- Typing session → Player state: updates progress (evidence: `ui/panels/GamePanel.java`)
- Typing session → Game window: submits result (evidence: `ui/panels/GamePanel.java`)
- Game window → Exercise results: passes score (evidence: `ui/TypingGame.java`)
- Exercise results → Player state: displays stats (evidence: `ui/panels/ResultPanel.java`)
- Exercise results → Game window: continues session (evidence: `ui/panels/ResultPanel.java`)
- Start menu → Ranking display: shows top scores (evidence: `ui/panels/MenuPanel.java`)
- Start menu → Shared panel UI: inherits UI (evidence: `ui/panels/MenuPanel.java`)
- Typing session → Shared panel UI: inherits UI (evidence: `ui/panels/GamePanel.java`)
- Exercise results → Shared panel UI: inherits UI (evidence: `ui/panels/ResultPanel.java`)
