# nabilzowilgit/smart-home-project architecture

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

- Interactive diagram: https://gitdiagram.com/nabilzowilgit/smart-home-project
- Repository: https://github.com/nabilzowilgit/smart-home-project

## Overview

This repository is a low-level AVR smart-home project foundation, not a complete user-facing smart-home application: the README gives no workflow or capabilities, and the sampled tree contains ADC, EEPROM, and digital-I/O drivers. The visible runtime path is hardware-facing driver calls and interrupt callbacks; no application entry point or device-control orchestration is present. Evidence is limited to the README, SOURCE INDEX, and sampled files, so no higher-level smart-home workflow is inferred.

Main entry points: [`HAL/HAL_ADC/ADC_prog.c`](https://github.com/nabilzowilgit/smart-home-project/blob/main/HAL/HAL_ADC/ADC_prog.c) (ADC driver), [`HAL/HAL_EEPROM/HAL_EEPROM_prog.c`](https://github.com/nabilzowilgit/smart-home-project/blob/main/HAL/HAL_EEPROM/HAL_EEPROM_prog.c) (EEPROM driver), [`MCAL/DIO/dio_prog.c`](https://github.com/nabilzowilgit/smart-home-project/blob/main/MCAL/DIO/dio_prog.c) (Digital I/O), [`SERVICE/std_types.h`](https://github.com/nabilzowilgit/smart-home-project/blob/main/SERVICE/std_types.h) (Shared types)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_hal["HAL drivers"]
  node_adc_hal["ADC driver<br/>[ADC_prog.c]"]
  node_adc_config["ADC configuration<br/>[ADC_config.h]"]
  node_adc_api["ADC API<br/>[ADC_init.h]"]
  node_eeprom_hal["EEPROM driver<br/>[HAL_EEPROM_prog.c]"]
  node_eeprom_api["EEPROM API<br/>[HAL_EEPROM_init.h]"]
end

subgraph group_mcal["MCAL hardware"]
  node_dio["Digital I/O<br/>[dio_prog.c]"]
  node_dio_api["DIO API<br/>[dio_init.h]"]
  node_dio_regs["DIO registers<br/>[dio_registers.h]"]
  node_adc_regs["ADC registers"]
  node_eeprom_regs["EEPROM registers"]
end

subgraph group_service["Shared primitives"]
  node_types["Shared types<br/>[std_types.h]"]
  node_bit_math["Bit operations<br/>[bit_math.h]"]
end

node_adc_hal -->|"uses settings"| node_adc_config
node_adc_hal -->|"implements API"| node_adc_api
node_adc_hal -->|"accesses registers"| node_adc_regs
node_adc_hal -->|"uses types"| node_types
node_adc_hal -->|"uses macros"| node_bit_math
node_eeprom_hal -->|"implements API"| node_eeprom_api
node_eeprom_hal -->|"accesses registers"| node_eeprom_regs
node_eeprom_hal -->|"uses types"| node_types
node_eeprom_hal -->|"uses macros"| node_bit_math
node_dio -->|"implements API"| node_dio_api
node_dio -->|"accesses registers"| node_dio_regs
node_dio -->|"uses types"| node_types
node_dio -->|"uses macros"| node_bit_math

click node_adc_hal "https://github.com/nabilzowilgit/smart-home-project/blob/main/HAL/HAL_ADC/ADC_prog.c"
click node_adc_config "https://github.com/nabilzowilgit/smart-home-project/blob/main/HAL/HAL_ADC/ADC_config.h"
click node_adc_api "https://github.com/nabilzowilgit/smart-home-project/blob/main/HAL/HAL_ADC/ADC_init.h"
click node_eeprom_hal "https://github.com/nabilzowilgit/smart-home-project/blob/main/HAL/HAL_EEPROM/HAL_EEPROM_prog.c"
click node_eeprom_api "https://github.com/nabilzowilgit/smart-home-project/blob/main/HAL/HAL_EEPROM/HAL_EEPROM_init.h"
click node_dio "https://github.com/nabilzowilgit/smart-home-project/blob/main/MCAL/DIO/dio_prog.c"
click node_dio_api "https://github.com/nabilzowilgit/smart-home-project/blob/main/MCAL/DIO/dio_init.h"
click node_dio_regs "https://github.com/nabilzowilgit/smart-home-project/blob/main/MCAL/DIO/dio_registers.h"
click node_adc_regs "https://github.com/nabilzowilgit/smart-home-project/blob/main/MCAL/MCAL_ADC/MCAL_ADC_registers.h"
click node_eeprom_regs "https://github.com/nabilzowilgit/smart-home-project/blob/main/MCAL/MCAL_EEPROM/MCAL_EEPROM_registers.h"
click node_types "https://github.com/nabilzowilgit/smart-home-project/blob/main/SERVICE/std_types.h"
click node_bit_math "https://github.com/nabilzowilgit/smart-home-project/blob/main/SERVICE/bit_math.h"

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_adc_hal,node_adc_config,node_adc_api,node_eeprom_hal,node_eeprom_api toneBlue
class node_dio,node_dio_api,node_dio_regs,node_adc_regs,node_eeprom_regs toneAmber
class node_types,node_bit_math toneMint
```

## Components

### HAL drivers

- [ADC driver](https://github.com/nabilzowilgit/smart-home-project/blob/main/HAL/HAL_ADC/ADC_prog.c): `HAL/HAL_ADC/ADC_prog.c`
- [ADC configuration](https://github.com/nabilzowilgit/smart-home-project/blob/main/HAL/HAL_ADC/ADC_config.h): `HAL/HAL_ADC/ADC_config.h`
- [ADC API](https://github.com/nabilzowilgit/smart-home-project/blob/main/HAL/HAL_ADC/ADC_init.h): `HAL/HAL_ADC/ADC_init.h`
- [EEPROM driver](https://github.com/nabilzowilgit/smart-home-project/blob/main/HAL/HAL_EEPROM/HAL_EEPROM_prog.c): `HAL/HAL_EEPROM/HAL_EEPROM_prog.c`
- [EEPROM API](https://github.com/nabilzowilgit/smart-home-project/blob/main/HAL/HAL_EEPROM/HAL_EEPROM_init.h): `HAL/HAL_EEPROM/HAL_EEPROM_init.h`

### MCAL hardware

- [Digital I/O](https://github.com/nabilzowilgit/smart-home-project/blob/main/MCAL/DIO/dio_prog.c): `MCAL/DIO/dio_prog.c`
- [DIO API](https://github.com/nabilzowilgit/smart-home-project/blob/main/MCAL/DIO/dio_init.h): `MCAL/DIO/dio_init.h`
- [DIO registers](https://github.com/nabilzowilgit/smart-home-project/blob/main/MCAL/DIO/dio_registers.h): `MCAL/DIO/dio_registers.h`
- [ADC registers](https://github.com/nabilzowilgit/smart-home-project/blob/main/MCAL/MCAL_ADC/MCAL_ADC_registers.h): `MCAL/MCAL_ADC/MCAL_ADC_registers.h`
- [EEPROM registers](https://github.com/nabilzowilgit/smart-home-project/blob/main/MCAL/MCAL_EEPROM/MCAL_EEPROM_registers.h): `MCAL/MCAL_EEPROM/MCAL_EEPROM_registers.h`

### Shared primitives

- [Shared types](https://github.com/nabilzowilgit/smart-home-project/blob/main/SERVICE/std_types.h): `SERVICE/std_types.h`
- [Bit operations](https://github.com/nabilzowilgit/smart-home-project/blob/main/SERVICE/bit_math.h): `SERVICE/bit_math.h`

## Connections

- ADC driver → ADC configuration: uses settings (evidence: `HAL/HAL_ADC/ADC_prog.c`)
- ADC driver → ADC API: implements API (evidence: `HAL/HAL_ADC/ADC_prog.c`)
- ADC driver → ADC registers: accesses registers (evidence: `HAL/HAL_ADC/ADC_prog.c`)
- ADC driver → Shared types: uses types (evidence: `HAL/HAL_ADC/ADC_prog.c`)
- ADC driver → Bit operations: uses macros (evidence: `HAL/HAL_ADC/ADC_prog.c`)
- EEPROM driver → EEPROM API: implements API (evidence: `HAL/HAL_EEPROM/HAL_EEPROM_prog.c`)
- EEPROM driver → EEPROM registers: accesses registers (evidence: `HAL/HAL_EEPROM/HAL_EEPROM_prog.c`)
- EEPROM driver → Shared types: uses types (evidence: `HAL/HAL_EEPROM/HAL_EEPROM_prog.c`)
- EEPROM driver → Bit operations: uses macros (evidence: `HAL/HAL_EEPROM/HAL_EEPROM_prog.c`)
- Digital I/O → DIO API: implements API (evidence: `MCAL/DIO/dio_prog.c`)
- Digital I/O → DIO registers: accesses registers (evidence: `MCAL/DIO/dio_prog.c`)
- Digital I/O → Shared types: uses types (evidence: `MCAL/DIO/dio_prog.c`)
- Digital I/O → Bit operations: uses macros (evidence: `MCAL/DIO/dio_prog.c`)
