# ouerhani-syrine/recommendation-system architecture

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

- Interactive diagram: https://gitdiagram.com/ouerhani-syrine/recommendation-system
- Repository: https://github.com/ouerhani-syrine/recommendation-system

## Overview

This is a small, runnable LightGCN recommendation demo. Running `main.py` displays a hard-coded user/item interaction dataset, then computes two rounds of embedding propagation from its normalized interaction graph and initial random embeddings. The code does not train a model, score items, or produce recommendations. The dataset and propagation implementations are excerpted; the graph shows only relationships visible in those excerpts.

Main entry points: [`main.py`](https://github.com/ouerhani-syrine/recommendation-system/blob/main/main.py) (Demo script), [`src/dataset.py`](https://github.com/ouerhani-syrine/recommendation-system/blob/main/src/dataset.py) (User-item data), [`src/lightgcn.py`](https://github.com/ouerhani-syrine/recommendation-system/blob/main/src/lightgcn.py) (Layer propagation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime"]
  node_main["Demo script<br/>[main.py]"]
end

subgraph group_data["Data preparation"]
  node_interactions["User-item data<br/>[dataset.py]"]
  node_graph_inputs["Graph and embeddings<br/>[dataset.py]"]
end

subgraph group_model["Embedding propagation"]
  node_propagation["Layer propagation<br/>[lightgcn.py]"]
end

node_terminal(("Terminal output"))

node_main -->|"imports data"| node_interactions
node_interactions -->|"builds graph"| node_graph_inputs
node_main -->|"prints data"| node_terminal
node_main -->|"calls propagation"| node_propagation
node_main -->|"passes inputs"| node_graph_inputs

click node_main "https://github.com/ouerhani-syrine/recommendation-system/blob/main/main.py"
click node_interactions "https://github.com/ouerhani-syrine/recommendation-system/blob/main/src/dataset.py"
click node_graph_inputs "https://github.com/ouerhani-syrine/recommendation-system/blob/main/src/dataset.py"
click node_propagation "https://github.com/ouerhani-syrine/recommendation-system/blob/main/src/lightgcn.py"

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_main toneBlue
class node_interactions,node_graph_inputs toneAmber
class node_propagation toneMint
class node_terminal toneIndigo
```

## Components

### Runtime

- [Demo script](https://github.com/ouerhani-syrine/recommendation-system/blob/main/main.py): `main.py`

### Data preparation

- [User-item data](https://github.com/ouerhani-syrine/recommendation-system/blob/main/src/dataset.py): `src/dataset.py`
- [Graph and embeddings](https://github.com/ouerhani-syrine/recommendation-system/blob/main/src/dataset.py): `src/dataset.py`

### Embedding propagation

- [Layer propagation](https://github.com/ouerhani-syrine/recommendation-system/blob/main/src/lightgcn.py): `src/lightgcn.py`

### Other components

- **Terminal output**

## Connections

- Demo script → User-item data: imports data (evidence: `main.py`)
- User-item data → Graph and embeddings: builds graph (evidence: `src/dataset.py`)
- Demo script → Terminal output: prints data (evidence: `main.py`)
- Demo script → Layer propagation: calls propagation (evidence: `main.py`)
- Demo script → Graph and embeddings: passes inputs (evidence: `main.py`)
