> ## Documentation Index
> Fetch the complete documentation index at: https://freelance-4888ed08.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Shared Utilities

> Common libraries and global configuration management

The system architecture cleanly separates core ML logic (`app-ml`) from the UI layer (`app-ui`). However, both rely on a set of shared utilities and configurations to ensure consistency in paths, logging, and environment management.

## Project Structure

The project root contains these shared assets:

**System 1 - demand-forecasting**

**common**

**utils.py**

**data\_manager.py**

**config**

**config.yaml**

**app-ml**

**app-ui**

## Global Configuration

The `config/config.yaml` file acts as the single source of truth for **infrastructure paths** and **service definitions** that cross the ML/UI boundary.

```yaml config/config.yaml theme={null}
# Used by both the Kedro pipeline and the Dash UI
data_manager:
  raw_data_path: "data/raw_data/raw_data_full.parquet"

ui:
  theme: "LUMEN"
  refresh_interval: 60
```

## Common Library (`common/`)

This lightweight library prevents code duplication between the separate Docker services.

### `utils.read_config`

A robust YAML reader used by the Dash app to load settings without hardcoding paths.

```python theme={null}
from common.utils import read_config
from pathlib import Path

# In app-ui/app.py
project_root = Path(__file__).parents[1]
config = read_config(project_root / 'config/config.yaml')
```

### `data_manager.py`

Standardizes DataFrame loading to ensure the UI reads Parquet files exactly as the model produced them (handling timestamp parsing and category types consistently).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.