# anthony-faria-dos-santos/tp_progc architecture

> Architecture diagram of the GitHub repository anthony-faria-dos-santos/tp_progc, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/anthony-faria-dos-santos/tp_progc
- Repository: https://github.com/anthony-faria-dos-santos/tp_progc

## Overview

##### Project type and purpose
- This is not a single deployed product but an educational **repository of six C lab assignments (TP1–TP6)**.
- Each “TPx” folder contains standalone exercises illustrating basic to intermediate C concepts: from simple I/O and control structures (TP1–TP3), to data structures and file I/O (TP4), to a client-server file exchange (TP5) and BMP-image transfer (TP6).
- The overall “system” is really a **collection of C programs**, a build toolchain (Makefiles, GCC), and some sample data (notes, BMP files).

##### File structure
- Top-level:
- Six TP directories (TP1–TP6)
- An “evaluation” script, a small “gdb” helper, and an “images” folder
- Per-TP patterns:
- A markdown spec (TPx.md)
- A src/ directory with .c, .h, Makefile (only in TP5, TP6)
- TP5 & TP6 include a classic **client ↔ server** pair and sample data directories.
- TP4 has simple modules for lists and files. TP1–TP3 are one-file small examples.

##### README for additional insights
- Describes the learning goals: GCC compilation chain, libraries, pointers, client-server sockets, BMP format.
- Emphasizes building, running, and testing C programs.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Code Modules
    subgraph "TP1 Module" 
        direction TB
        TP1src["TP1/src/*.c"]:::code
        TP1exe["TP1 Executable"]:::exe
        TP1src -->|Preprocess/Compile| TP1exe
    end
    subgraph "TP2 Module"
        direction TB
        TP2src["TP2/src/*.c"]:::code
        TP2exe["TP2 Executable"]:::exe
        TP2src -->|Preprocess/Compile| TP2exe
    end
    subgraph "TP3 Module"
        direction TB
        TP3src["TP3/src/*.c"]:::code
        TP3exe["TP3 Executable"]:::exe
        TP3src -->|Preprocess/Compile| TP3exe
    end
    subgraph "TP4 Module"
        direction TB
        TP4_main["TP4/src/main.c"]:::code
        TP4_liste["TP4/src/liste.c/.h"]:::code
        TP4_fichier["TP4/src/fichier.c/.h"]:::code
        TP4_operator["TP4/src/operator.c/.h"]:::code
        TP4_misc["TP4/src/*.c"]:::code
        TP4_exe["TP4 Executable"]:::exe
        TP4_main & TP4_liste & TP4_fichier & TP4_operator & TP4_misc -->|Compile/Link| TP4_exe
    end
    subgraph "TP5 Module"
        direction TB
        TP5_make["TP5/src/Makefile"]:::build
        TP5_client["TP5/src/client.c/.h"]:::code
        TP5_server["TP5/src/serveur.c/.h"]:::code
        TP5_data["TP5 Data Storage"]:::data
        TP5_exe["TP5 Client/Server Executables"]:::exe
        TP5_make --> TP5_client & TP5_server
        TP5_client -->|Link| TP5_exe
        TP5_server -->|Link| TP5_exe
        TP5_server -->|Reads notes| TP5_data
        TP5_client -.->|TCP Request/Response| TP5_server
    end
    subgraph "TP6 Module"
        direction TB
        TP6_make["TP6/src/Makefile"]:::build
        TP6_client["TP6/src/client.c/.h"]:::code
        TP6_server["TP6/src/serveur.c/.h"]:::code
        TP6_bmp["TP6/src/bmp.c/.h"]:::code
        TP6_color["TP6/src/couleur.c/.h"]:::code
        TP6_exe["TP6 Client/Server Executables"]:::exe
        TP6_data["TP6 Sample Images"]:::data
        TP6_make --> TP6_client & TP6_server & TP6_bmp & TP6_color
        TP6_client -->|Link| TP6_exe
        TP6_server -->|Link| TP6_exe
        TP6_server -->|Reads BMP| TP6_data
        TP6_client -.->|TCP Request/Response| TP6_server
    end
    subgraph "Support Utilities"
        direction TB
        Eval["evaluation/evaluation.sh"]:::script
        GDB["gdb/README.md"]:::script
    end
    %% Build Pipeline (generic)
    subgraph "Build Pipeline"
        direction TB
        Pre["Preprocessor"]:::build
        Comp["Compiler"]:::build
        Linker["Linker"]:::build
    end
    %% Connections to pipeline
    TP1src --> Pre
    TP2src --> Pre
    TP3src --> Pre
    TP4_main & TP4_liste & TP4_fichier & TP4_operator & TP4_misc --> Pre
    TP5_client & TP5_server --> Pre
    TP6_client & TP6_server & TP6_bmp & TP6_color --> Pre
    Pre --> Comp --> Linker

    %% Styles
    classDef code fill:#cce5ff,stroke:#3399ff,color:#000;
    classDef build fill:#d4edda,stroke:#28a745,color:#000;
    classDef exe fill:#e2e3e5,stroke:#6c757d,color:#000;
    classDef data fill:#f8f9fa,stroke:#6c757d,color:#000;
    classDef script fill:#fff3cd,stroke:#ffc107,color:#000;

    %% Click Events
    click TP1src "https://github.com/anthony-faria-dos-santos/tp_progc/blob/master/TP1/src/*.c"
    click TP2src "https://github.com/anthony-faria-dos-santos/tp_progc/blob/master/TP2/src/*.c"
    click TP3src "https://github.com/anthony-faria-dos-santos/tp_progc/blob/master/TP3/src/*.c"
    click TP4_main "https://github.com/anthony-faria-dos-santos/tp_progc/blob/master/TP4/src/main.c"
    click TP4_liste "https://github.com/anthony-faria-dos-santos/tp_progc/blob/master/TP4/src/liste.c"
    click TP4_fichier "https://github.com/anthony-faria-dos-santos/tp_progc/blob/master/TP4/src/fichier.c"
    click TP4_operator "https://github.com/anthony-faria-dos-santos/tp_progc/blob/master/TP4/src/operator.c"
    click TP4_misc "https://github.com/anthony-faria-dos-santos/tp_progc/blob/master/TP4/src/*.c"
    click TP5_make "https://github.com/anthony-faria-dos-santos/tp_progc/tree/master/TP5/src/Makefile"
    click TP5_client "https://github.com/anthony-faria-dos-santos/tp_progc/blob/master/TP5/src/client.c"
    click TP5_server "https://github.com/anthony-faria-dos-santos/tp_progc/blob/master/TP5/src/serveur.c"
    click TP5_data "https://github.com/anthony-faria-dos-santos/tp_progc/tree/master/TP5/etudiant/"
    click TP6_make "https://github.com/anthony-faria-dos-santos/tp_progc/tree/master/TP6/src/Makefile"
    click TP6_client "https://github.com/anthony-faria-dos-santos/tp_progc/blob/master/TP6/src/client.c"
    click TP6_server "https://github.com/anthony-faria-dos-santos/tp_progc/blob/master/TP6/src/serveur.c"
    click TP6_bmp "https://github.com/anthony-faria-dos-santos/tp_progc/blob/master/TP6/src/bmp.c"
    click TP6_color "https://github.com/anthony-faria-dos-santos/tp_progc/blob/master/TP6/src/couleur.c"
    click TP6_data "https://github.com/anthony-faria-dos-santos/tp_progc/tree/master/images/"
    click Eval "https://github.com/anthony-faria-dos-santos/tp_progc/blob/master/evaluation/evaluation.sh"
    click GDB "https://github.com/anthony-faria-dos-santos/tp_progc/blob/master/gdb/README.md"
```
