# Component: Core Infrastructure

## Overview
Shared constants and utility classes that form the foundation for all other components. Provides path definitions, config file references, and helper data structures.

**Pattern**: Configuration constants + utility library
**Upstream**: None (leaf component)
**Downstream**: All other components

## Modules
- `constants` — filesystem paths, config keys, thresholds
- `utils` — Dotdict helper class

## Internal Interfaces

### constants (public symbols)
All path/string constants — see module doc for full list. Key exports:
- Directory paths: `data_dir`, `processed_dir`, `datasets_dir`, `models_dir` and their images/labels subdirectories
- Config references: `CONFIG_FILE`, `CDN_CONFIG`, `OFFSET_FILE`
- Model paths: `CURRENT_PT_MODEL`, `CURRENT_ONNX_MODEL`
- Thresholds: `SMALL_SIZE_KB = 3`

### utils.Dotdict
```python
class Dotdict(dict):
    # Enables config.url instead of config["url"]
```

## Data Access Patterns
None — pure constants, no I/O.

## Implementation Details
- All paths rooted at `/azaion/` — assumes a fixed deployment directory structure
- No environment-variable override for any path — paths are entirely static

## Caveats
- Hardcoded root `/azaion/` makes local development without that directory structure impossible
- No `.env` or environment-based configuration override mechanism
- `Dotdict.__getattr__` uses `dict.get` which returns `None` for missing keys instead of raising `AttributeError`

## Dependency Graph
```mermaid
graph TD
    constants --> api_client_comp[API & CDN]
    constants --> training_comp[Training]
    constants --> data_pipeline_comp[Data Pipeline]
    constants --> inference_comp[Inference]
    utils --> training_comp
    utils --> inference_comp
```

## Logging Strategy
None.
