# teemoteeo/quarantadue architecture

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

- Interactive diagram: https://gitdiagram.com/teemoteeo/quarantadue
- Repository: https://github.com/teemoteeo/quarantadue

## Overview

This repository is a portfolio of independent 42-school exercises and milestone projects, not one integrated application. The main workflows are project-specific: Python data processing accepts heterogeneous batches, routes them to processors, then exports processed values; RAG indexes source chunks and retrieves relevant spans; Codexion parses simulation arguments and runs a simulation. Other substantial branches include maze and map tools, creature battles, C utilities, and constrained-decoding function calling. Connections are limited to relationships visible in excerpts or the SOURCE INDEX; many unsampled projects are represented without inferred call flows.

Main entry points: [`milestone_4/RAG_against_the_machine/src/retriever.py`](https://github.com/teemoteeo/quarantadue/blob/main/milestone_4/RAG_against_the_machine/src/retriever.py) (BM25 Retriever), [`milestone_2/python05/ex2/data_pipeline.py`](https://github.com/teemoteeo/quarantadue/blob/main/milestone_2/python05/ex2/data_pipeline.py) (Data Pipeline), [`milestone_2/python07/tournament.py`](https://github.com/teemoteeo/quarantadue/blob/main/milestone_2/python07/tournament.py) (Creature Tournament), [`milestone_3/codexion/src/main.c`](https://github.com/teemoteeo/quarantadue/blob/main/milestone_3/codexion/src/main.c) (Simulation CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_c_libs["C Libraries"]
  node_libft["libft Utilities"]
  node_printf["ft_printf<br/>[ft_printf.c]"]
  node_getline["Line Reader<br/>[get_next_line.c]"]
  node_push_swap["push_swap<br/>[push_swap.h]"]
end

subgraph group_python_projects["Python Projects"]
  node_exam_shell["ExamShell<br/>[examshell.py]"]
  node_data_pipeline["Data Pipeline<br/>[data_pipeline.py]"]
  node_processors["Data Processors<br/>[data_processor.py]"]
  node_data_stream["Data Stream<br/>[data_stream.py]"]
  node_tournament["Creature Tournament<br/>[tournament.py]"]
  node_creature_factory["Creature Factories<br/>[factory.py]"]
  node_battle["Battle Strategy<br/>[battle.py]"]
end

subgraph group_simulation_tools["Simulation Tools"]
  node_maze_parser["Maze Parser<br/>[maze_parser.py]"]
  node_maze_solver["Maze Solver<br/>[solver.py]"]
  node_maze_visual["Maze Visualizer<br/>[visual.py]"]
  node_codexion_cli["Simulation CLI<br/>[main.c]"]
  node_codexion_parser["Argument Parser<br/>[parser.c]"]
  node_codexion_run["Codexion Simulation<br/>[simulation.c]"]
  node_fly_parser["Map Parser<br/>[parser.py]"]
  node_fly_schema["Map Schemas<br/>[schemas.py]"]
  node_fly_ui["Fly-in Interface<br/>[tui.py]"]
end

subgraph group_ai_apps["AI Applications"]
  node_function_decoder["Function Decoder<br/>[decoder.py]"]
  node_function_model["Model Adapter<br/>[model.py]"]
  node_function_schemas["Call Schemas<br/>[schemas.py]"]
  node_llm_sdk["LLM SDK<br/>[__init__.py]"]
end

subgraph group_rag_system["RAG System"]
  node_rag_retriever["BM25 Retriever<br/>[retriever.py]"]
  node_rag_walker["Corpus Walker<br/>[walker.py]"]
  node_rag_chunker["Text Chunker<br/>[chunker.py]"]
  node_rag_models["RAG Models<br/>[rag_models.py]"]
  node_rag_generator["Answer Generator<br/>[generator.py]"]
end

node_user(("Project User"))

node_user -->|"submits batches"| node_data_pipeline
node_data_pipeline -->|"uses stream"| node_data_stream
node_data_pipeline -->|"registers processors"| node_processors
node_data_pipeline -->|"reads outputs"| node_processors
node_tournament -->|"creates opponents"| node_creature_factory
node_tournament -->|"starts battles"| node_battle
node_codexion_cli -->|"validates arguments"| node_codexion_parser
node_codexion_cli -->|"runs simulation"| node_codexion_run
node_fly_parser -->|"builds models"| node_fly_schema
node_function_decoder -->|"uses model"| node_function_model
node_function_decoder -->|"uses schemas"| node_function_schemas
node_function_model -->|"uses SDK"| node_llm_sdk
node_rag_retriever -->|"walks corpus"| node_rag_walker
node_rag_retriever -->|"returns source models"| node_rag_models
node_user -.->|"runs exercises"| node_exam_shell
node_user -.->|"provides maze"| node_maze_parser
node_maze_parser -.->|"supplies maze data"| node_maze_solver
node_maze_solver -.->|"shows solution"| node_maze_visual
node_user -.->|"provides map"| node_fly_parser
node_user -.->|"queries corpus"| node_rag_retriever
node_rag_retriever -.->|"chunks corpus"| node_rag_chunker
node_rag_retriever -.->|"supports answer generation"| node_rag_generator

click node_libft "https://github.com/teemoteeo/quarantadue/tree/main/milestone_0/libft"
click node_printf "https://github.com/teemoteeo/quarantadue/blob/main/milestone_1/ft_printf/ft_printf.c"
click node_getline "https://github.com/teemoteeo/quarantadue/blob/main/milestone_1/get_next_line/get_next_line.c"
click node_push_swap "https://github.com/teemoteeo/quarantadue/blob/main/milestone_2/push_swap/push_swap.h"
click node_exam_shell "https://github.com/teemoteeo/quarantadue/blob/main/exam_training/42-Python-ExamShell-Rank03/examshell.py"
click node_data_pipeline "https://github.com/teemoteeo/quarantadue/blob/main/milestone_2/python05/ex2/data_pipeline.py"
click node_processors "https://github.com/teemoteeo/quarantadue/blob/main/milestone_2/python05/ex0/data_processor.py"
click node_data_stream "https://github.com/teemoteeo/quarantadue/blob/main/milestone_2/python05/ex1/data_stream.py"
click node_tournament "https://github.com/teemoteeo/quarantadue/blob/main/milestone_2/python07/tournament.py"
click node_creature_factory "https://github.com/teemoteeo/quarantadue/blob/main/milestone_2/python07/ex0/factory.py"
click node_battle "https://github.com/teemoteeo/quarantadue/blob/main/milestone_2/python07/ex2/battle.py"
click node_maze_parser "https://github.com/teemoteeo/quarantadue/blob/main/milestone_2/amazeing/maze_parser.py"
click node_maze_solver "https://github.com/teemoteeo/quarantadue/blob/main/milestone_2/amazeing/solver.py"
click node_maze_visual "https://github.com/teemoteeo/quarantadue/blob/main/milestone_2/amazeing/visual.py"
click node_codexion_cli "https://github.com/teemoteeo/quarantadue/blob/main/milestone_3/codexion/src/main.c"
click node_codexion_parser "https://github.com/teemoteeo/quarantadue/blob/main/milestone_3/codexion/src/parser.c"
click node_codexion_run "https://github.com/teemoteeo/quarantadue/blob/main/milestone_3/codexion/src/simulation.c"
click node_fly_parser "https://github.com/teemoteeo/quarantadue/blob/main/milestone_3/fly-in/src/parser.py"
click node_fly_schema "https://github.com/teemoteeo/quarantadue/blob/main/milestone_3/fly-in/src/schemas.py"
click node_fly_ui "https://github.com/teemoteeo/quarantadue/blob/main/milestone_3/fly-in/src/tui.py"
click node_function_decoder "https://github.com/teemoteeo/quarantadue/blob/main/milestone_3/call%20me%20maybe/src/decoder.py"
click node_function_model "https://github.com/teemoteeo/quarantadue/blob/main/milestone_3/call%20me%20maybe/src/model.py"
click node_function_schemas "https://github.com/teemoteeo/quarantadue/blob/main/milestone_3/call%20me%20maybe/src/schemas.py"
click node_llm_sdk "https://github.com/teemoteeo/quarantadue/blob/main/milestone_3/call%20me%20maybe/llm_sdk/llm_sdk/__init__.py"
click node_rag_retriever "https://github.com/teemoteeo/quarantadue/blob/main/milestone_4/RAG_against_the_machine/src/retriever.py"
click node_rag_walker "https://github.com/teemoteeo/quarantadue/blob/main/milestone_4/RAG_against_the_machine/src/indexer/walker.py"
click node_rag_chunker "https://github.com/teemoteeo/quarantadue/blob/main/milestone_4/RAG_against_the_machine/src/indexer/chunker.py"
click node_rag_models "https://github.com/teemoteeo/quarantadue/blob/main/milestone_4/RAG_against_the_machine/src/models/rag_models.py"
click node_rag_generator "https://github.com/teemoteeo/quarantadue/blob/main/milestone_4/RAG_against_the_machine/src/generator.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_libft,node_printf,node_getline,node_push_swap,node_user toneBlue
class node_exam_shell,node_data_pipeline,node_processors,node_data_stream,node_tournament,node_creature_factory,node_battle toneAmber
class node_maze_parser,node_maze_solver,node_maze_visual,node_codexion_cli,node_codexion_parser,node_codexion_run,node_fly_parser,node_fly_schema,node_fly_ui toneMint
class node_function_decoder,node_function_model,node_function_schemas,node_llm_sdk toneRose
class node_rag_retriever,node_rag_walker,node_rag_chunker,node_rag_models,node_rag_generator toneIndigo
```

## Components

### C Libraries

- [libft Utilities](https://github.com/teemoteeo/quarantadue/tree/main/milestone_0/libft): `milestone_0/libft`
- [ft_printf](https://github.com/teemoteeo/quarantadue/blob/main/milestone_1/ft_printf/ft_printf.c): `milestone_1/ft_printf/ft_printf.c`
- [Line Reader](https://github.com/teemoteeo/quarantadue/blob/main/milestone_1/get_next_line/get_next_line.c): `milestone_1/get_next_line/get_next_line.c`
- [push_swap](https://github.com/teemoteeo/quarantadue/blob/main/milestone_2/push_swap/push_swap.h): `milestone_2/push_swap/push_swap.h`

### Python Projects

- [ExamShell](https://github.com/teemoteeo/quarantadue/blob/main/exam_training/42-Python-ExamShell-Rank03/examshell.py): `exam_training/42-Python-ExamShell-Rank03/examshell.py`
- [Data Pipeline](https://github.com/teemoteeo/quarantadue/blob/main/milestone_2/python05/ex2/data_pipeline.py): `milestone_2/python05/ex2/data_pipeline.py`
- [Data Processors](https://github.com/teemoteeo/quarantadue/blob/main/milestone_2/python05/ex0/data_processor.py): `milestone_2/python05/ex0/data_processor.py`
- [Data Stream](https://github.com/teemoteeo/quarantadue/blob/main/milestone_2/python05/ex1/data_stream.py): `milestone_2/python05/ex1/data_stream.py`
- [Creature Tournament](https://github.com/teemoteeo/quarantadue/blob/main/milestone_2/python07/tournament.py): `milestone_2/python07/tournament.py`
- [Creature Factories](https://github.com/teemoteeo/quarantadue/blob/main/milestone_2/python07/ex0/factory.py): `milestone_2/python07/ex0/factory.py`
- [Battle Strategy](https://github.com/teemoteeo/quarantadue/blob/main/milestone_2/python07/ex2/battle.py): `milestone_2/python07/ex2/battle.py`

### Simulation Tools

- [Maze Parser](https://github.com/teemoteeo/quarantadue/blob/main/milestone_2/amazeing/maze_parser.py): `milestone_2/amazeing/maze_parser.py`
- [Maze Solver](https://github.com/teemoteeo/quarantadue/blob/main/milestone_2/amazeing/solver.py): `milestone_2/amazeing/solver.py`
- [Maze Visualizer](https://github.com/teemoteeo/quarantadue/blob/main/milestone_2/amazeing/visual.py): `milestone_2/amazeing/visual.py`
- [Simulation CLI](https://github.com/teemoteeo/quarantadue/blob/main/milestone_3/codexion/src/main.c): `milestone_3/codexion/src/main.c`
- [Argument Parser](https://github.com/teemoteeo/quarantadue/blob/main/milestone_3/codexion/src/parser.c): `milestone_3/codexion/src/parser.c`
- [Codexion Simulation](https://github.com/teemoteeo/quarantadue/blob/main/milestone_3/codexion/src/simulation.c): `milestone_3/codexion/src/simulation.c`
- [Map Parser](https://github.com/teemoteeo/quarantadue/blob/main/milestone_3/fly-in/src/parser.py): `milestone_3/fly-in/src/parser.py`
- [Map Schemas](https://github.com/teemoteeo/quarantadue/blob/main/milestone_3/fly-in/src/schemas.py): `milestone_3/fly-in/src/schemas.py`
- [Fly-in Interface](https://github.com/teemoteeo/quarantadue/blob/main/milestone_3/fly-in/src/tui.py): `milestone_3/fly-in/src/tui.py`

### AI Applications

- [Function Decoder](https://github.com/teemoteeo/quarantadue/blob/main/milestone_3/call%20me%20maybe/src/decoder.py): `milestone_3/call me maybe/src/decoder.py`
- [Model Adapter](https://github.com/teemoteeo/quarantadue/blob/main/milestone_3/call%20me%20maybe/src/model.py): `milestone_3/call me maybe/src/model.py`
- [Call Schemas](https://github.com/teemoteeo/quarantadue/blob/main/milestone_3/call%20me%20maybe/src/schemas.py): `milestone_3/call me maybe/src/schemas.py`
- [LLM SDK](https://github.com/teemoteeo/quarantadue/blob/main/milestone_3/call%20me%20maybe/llm_sdk/llm_sdk/__init__.py): `milestone_3/call me maybe/llm_sdk/llm_sdk/__init__.py`

### RAG System

- [BM25 Retriever](https://github.com/teemoteeo/quarantadue/blob/main/milestone_4/RAG_against_the_machine/src/retriever.py): `milestone_4/RAG_against_the_machine/src/retriever.py`
- [Corpus Walker](https://github.com/teemoteeo/quarantadue/blob/main/milestone_4/RAG_against_the_machine/src/indexer/walker.py): `milestone_4/RAG_against_the_machine/src/indexer/walker.py`
- [Text Chunker](https://github.com/teemoteeo/quarantadue/blob/main/milestone_4/RAG_against_the_machine/src/indexer/chunker.py): `milestone_4/RAG_against_the_machine/src/indexer/chunker.py`
- [RAG Models](https://github.com/teemoteeo/quarantadue/blob/main/milestone_4/RAG_against_the_machine/src/models/rag_models.py): `milestone_4/RAG_against_the_machine/src/models/rag_models.py`
- [Answer Generator](https://github.com/teemoteeo/quarantadue/blob/main/milestone_4/RAG_against_the_machine/src/generator.py): `milestone_4/RAG_against_the_machine/src/generator.py`

### Other components

- **Project User**

## Connections

- Project User → Data Pipeline: submits batches (evidence: `milestone_2/python05/ex2/data_pipeline.py`)
- Data Pipeline → Data Stream: uses stream (evidence: `milestone_2/python05/ex2/data_pipeline.py`)
- Data Pipeline → Data Processors: registers processors (evidence: `milestone_2/python05/ex2/data_pipeline.py`)
- Data Pipeline → Data Processors: reads outputs (evidence: `milestone_2/python05/ex2/data_pipeline.py`)
- Creature Tournament → Creature Factories: creates opponents (evidence: `milestone_2/python07/tournament.py`)
- Creature Tournament → Battle Strategy: starts battles (evidence: `milestone_2/python07/tournament.py`)
- Simulation CLI → Argument Parser: validates arguments (evidence: `milestone_3/codexion/src/main.c`)
- Simulation CLI → Codexion Simulation: runs simulation (evidence: `milestone_3/codexion/src/main.c`)
- Map Parser → Map Schemas: builds models (evidence: `milestone_3/fly-in/src/parser.py`)
- Function Decoder → Model Adapter: uses model (evidence: `milestone_3/call me maybe/src/decoder.py`)
- Function Decoder → Call Schemas: uses schemas (evidence: `milestone_3/call me maybe/src/decoder.py`)
- Model Adapter → LLM SDK: uses SDK (evidence: `milestone_3/call me maybe/src/model.py`)
- BM25 Retriever → Corpus Walker: walks corpus (evidence: `milestone_4/RAG_against_the_machine/src/retriever.py`)
- BM25 Retriever → RAG Models: returns source models (evidence: `milestone_4/RAG_against_the_machine/src/retriever.py`)
- Project User → ExamShell: runs exercises
- Project User → Maze Parser: provides maze
- Maze Parser → Maze Solver: supplies maze data
- Maze Solver → Maze Visualizer: shows solution
- Project User → Map Parser: provides map
- Project User → BM25 Retriever: queries corpus
- BM25 Retriever → Text Chunker: chunks corpus
- BM25 Retriever → Answer Generator: supports answer generation
