# abde-sdk/1337 architecture

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

- Interactive diagram: https://gitdiagram.com/abde-sdk/1337
- Repository: https://github.com/abde-sdk/1337

## Overview

This repository is a small 1337 C utility collection: libft provides common string, memory, conversion, output, and linked-list routines; get_next_line reads one line from a file descriptor; and ft_printf formats supported conversions. The principal workflows are callers using these APIs to obtain a line or write formatted output. The excerpts show ft_printf dispatch and get_next_line's read/stash/extract stages. Other libft capabilities are represented by subsystem nodes; their internal call relationships are omitted where the supplied excerpts do not establish them.

Main entry points: [`CC/get_next_line/get_next_line.c`](https://github.com/abde-sdk/1337/blob/main/CC/get_next_line/get_next_line.c) (Line reader), [`CC/ft_printf/ft_printf.c`](https://github.com/abde-sdk/1337/blob/main/CC/ft_printf/ft_printf.c) (Format parser), [`CC/ft_printf/ft_putnbr.c`](https://github.com/abde-sdk/1337/blob/main/CC/ft_printf/ft_putnbr.c) (Conversion writers), [`CC/get_next_line/get_next_line_utils.c`](https://github.com/abde-sdk/1337/blob/main/CC/get_next_line/get_next_line_utils.c) (Stash utilities)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_printf["Formatted output"]
  node_formatter["Format parser<br/>[ft_printf.c]"]
  node_format_handlers["Conversion writers<br/>[ft_putnbr.c]"]
end

subgraph group_gnl["Line reading"]
  node_line_reader["Line reader<br/>[get_next_line.c]"]
  node_line_helpers["Stash utilities"]
  node_bonus_reader["Multi-fd reader"]
end

subgraph group_libft["C utility library"]
  node_libft_strings["String routines<br/>[ft_split.c]"]
  node_libft_memory["Memory routines<br/>[ft_memcpy.c]"]
  node_libft_conversion["Conversions<br/>[ft_itoa.c]"]
  node_libft_lists["Linked lists<br/>[ft_lstmap.c]"]
  node_libft_output["FD output<br/>[ft_putnbr_fd.c]"]
end

node_caller(("C caller"))
node_fd_caller(("File descriptor caller"))

node_caller -.->|"calls"| node_formatter
node_formatter -->|"dispatches"| node_format_handlers
node_fd_caller -.->|"requests line"| node_line_reader
node_line_reader -->|"uses utilities"| node_line_helpers
node_line_reader -->|"reads descriptor"| node_fd_caller

click node_formatter "https://github.com/abde-sdk/1337/blob/main/CC/ft_printf/ft_printf.c"
click node_format_handlers "https://github.com/abde-sdk/1337/blob/main/CC/ft_printf/ft_putnbr.c"
click node_line_reader "https://github.com/abde-sdk/1337/blob/main/CC/get_next_line/get_next_line.c"
click node_line_helpers "https://github.com/abde-sdk/1337/blob/main/CC/get_next_line/get_next_line_utils.c"
click node_bonus_reader "https://github.com/abde-sdk/1337/blob/main/CC/get_next_line/get_next_line_bonus.h"
click node_libft_strings "https://github.com/abde-sdk/1337/blob/main/CC/libft/ft_split.c"
click node_libft_memory "https://github.com/abde-sdk/1337/blob/main/CC/libft/ft_memcpy.c"
click node_libft_conversion "https://github.com/abde-sdk/1337/blob/main/CC/libft/ft_itoa.c"
click node_libft_lists "https://github.com/abde-sdk/1337/blob/main/CC/libft/ft_lstmap.c"
click node_libft_output "https://github.com/abde-sdk/1337/blob/main/CC/libft/ft_putnbr_fd.c"

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_formatter,node_format_handlers toneBlue
class node_line_reader,node_line_helpers,node_bonus_reader toneAmber
class node_libft_strings,node_libft_memory,node_libft_conversion,node_libft_lists,node_libft_output toneMint
class node_caller,node_fd_caller toneIndigo
```

## Components

### Formatted output

- [Format parser](https://github.com/abde-sdk/1337/blob/main/CC/ft_printf/ft_printf.c): `CC/ft_printf/ft_printf.c`
- [Conversion writers](https://github.com/abde-sdk/1337/blob/main/CC/ft_printf/ft_putnbr.c): `CC/ft_printf/ft_putnbr.c`

### Line reading

- [Line reader](https://github.com/abde-sdk/1337/blob/main/CC/get_next_line/get_next_line.c): `CC/get_next_line/get_next_line.c`
- [Stash utilities](https://github.com/abde-sdk/1337/blob/main/CC/get_next_line/get_next_line_utils.c): `CC/get_next_line/get_next_line_utils.c`
- [Multi-fd reader](https://github.com/abde-sdk/1337/blob/main/CC/get_next_line/get_next_line_bonus.h): `CC/get_next_line/get_next_line_bonus.h`

### C utility library

- [String routines](https://github.com/abde-sdk/1337/blob/main/CC/libft/ft_split.c): `CC/libft/ft_split.c`
- [Memory routines](https://github.com/abde-sdk/1337/blob/main/CC/libft/ft_memcpy.c): `CC/libft/ft_memcpy.c`
- [Conversions](https://github.com/abde-sdk/1337/blob/main/CC/libft/ft_itoa.c): `CC/libft/ft_itoa.c`
- [Linked lists](https://github.com/abde-sdk/1337/blob/main/CC/libft/ft_lstmap.c): `CC/libft/ft_lstmap.c`
- [FD output](https://github.com/abde-sdk/1337/blob/main/CC/libft/ft_putnbr_fd.c): `CC/libft/ft_putnbr_fd.c`

### Other components

- **C caller**
- **File descriptor caller**

## Connections

- C caller → Format parser: calls
- Format parser → Conversion writers: dispatches (evidence: `CC/ft_printf/ft_printf.c`)
- File descriptor caller → Line reader: requests line
- Line reader → Stash utilities: uses utilities (evidence: `CC/get_next_line/get_next_line.c`)
- Line reader → File descriptor caller: reads descriptor (evidence: `CC/get_next_line/get_next_line.c`)
