# markostefanov/yellowpages architecture

> Architecture diagram of the GitHub repository markostefanov/yellowpages, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/markostefanov/yellowpages
- Repository: https://github.com/markostefanov/yellowpages

## Overview

UCL Yellow Pages is a Django directory for UCL students. Students request an email verification code, register with a UCL address and course, then create or edit contact and visibility settings. Logged-in students search profiles under visibility rules, open permitted profile pages, and can review recorded visits. The graph emphasizes those documented flows and the profile, verification, and visit state behind them. Source excerpts show view/form/model calls; templates and routing are represented only where the README or excerpts establish their role, so some UI-level links are omitted.

Main entry points: [`UCLYellowPages/profiles/views.py`](https://github.com/markostefanov/yellowpages/blob/master/UCLYellowPages/profiles/views.py) (Register and login), [`UCLYellowPages/templates`](https://github.com/markostefanov/yellowpages/tree/master/UCLYellowPages/templates) (Page templates), [`UCLYellowPages/UCLYellowPages/urls.py`](https://github.com/markostefanov/yellowpages/blob/master/UCLYellowPages/UCLYellowPages/urls.py) (URL routing), [`UCLYellowPages/profiles/urls.py`](https://github.com/markostefanov/yellowpages/blob/master/UCLYellowPages/profiles/urls.py) (Profile routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web entry and pages"]
  node_routing["URL routing<br/>[urls.py]"]
  node_app_routes["Profile routes<br/>[urls.py]"]
  node_pages["Page templates"]
end

subgraph group_accounts["Accounts and verification"]
  node_register["Register and login<br/>[views.py]"]
  node_registration_form["Registration form<br/>[forms.py]"]
  node_verification["Email verification<br/>[models.py]"]
end

subgraph group_directory["Directory and privacy"]
  node_search["Directory search<br/>[views.py]"]
  node_profile_page["Profile detail<br/>[views.py]"]
  node_privacy["Visibility rules<br/>[models.py]"]
  node_edit["Edit profile<br/>[views.py]"]
  node_history["View history<br/>[views.py]"]
  node_profile_form["Profile form<br/>[forms.py]"]
end

subgraph group_records["Profile records"]
  node_profiles[("Student profiles<br/>[models.py]")]
  node_academic[("Faculty and courses<br/>[models.py]")]
  node_visits[("Profile visits<br/>[models.py]")]
  node_verification_rows[("Verification codes<br/>[models.py]")]
end

node_student(("UCL student"))
node_mail["Email delivery"]

node_student -->|"requests pages"| node_routing
node_routing -->|"routes accounts"| node_register
node_routing -->|"includes profiles"| node_app_routes
node_app_routes -->|"routes search"| node_search
node_app_routes -->|"routes edits"| node_edit
node_app_routes -->|"routes history"| node_history
node_routing -->|"routes profile"| node_profile_page
node_register -->|"validates signup"| node_registration_form
node_registration_form -->|"checks code"| node_verification
node_register -->|"creates profile"| node_profiles
node_register -->|"renders signup"| node_pages
node_student -->|"requests code"| node_verification
node_verification -->|"stores code state"| node_verification_rows
node_register -->|"sends code"| node_mail
node_search -->|"queries profiles"| node_profiles
node_search -->|"filters visibility"| node_privacy
node_privacy -->|"compares course scope"| node_academic
node_profile_page -->|"loads profile"| node_profiles
node_profile_page -->|"checks visibility"| node_privacy
node_profile_page -->|"records visit"| node_visits
node_edit -->|"uses form"| node_profile_form
node_profile_form -->|"updates profile"| node_profiles
node_history -->|"reads visits"| node_visits
node_search -.->|"renders results"| node_pages
node_profile_page -.->|"renders detail"| node_pages
node_edit -.->|"renders editor"| node_pages
node_history -.->|"renders history"| node_pages

click node_routing "https://github.com/markostefanov/yellowpages/blob/master/UCLYellowPages/UCLYellowPages/urls.py"
click node_app_routes "https://github.com/markostefanov/yellowpages/blob/master/UCLYellowPages/profiles/urls.py"
click node_pages "https://github.com/markostefanov/yellowpages/tree/master/UCLYellowPages/templates"
click node_register "https://github.com/markostefanov/yellowpages/blob/master/UCLYellowPages/profiles/views.py"
click node_registration_form "https://github.com/markostefanov/yellowpages/blob/master/UCLYellowPages/profiles/forms.py"
click node_verification "https://github.com/markostefanov/yellowpages/blob/master/UCLYellowPages/profiles/models.py"
click node_search "https://github.com/markostefanov/yellowpages/blob/master/UCLYellowPages/profiles/views.py"
click node_profile_page "https://github.com/markostefanov/yellowpages/blob/master/UCLYellowPages/profiles/views.py"
click node_privacy "https://github.com/markostefanov/yellowpages/blob/master/UCLYellowPages/profiles/models.py"
click node_edit "https://github.com/markostefanov/yellowpages/blob/master/UCLYellowPages/profiles/views.py"
click node_history "https://github.com/markostefanov/yellowpages/blob/master/UCLYellowPages/profiles/views.py"
click node_profile_form "https://github.com/markostefanov/yellowpages/blob/master/UCLYellowPages/profiles/forms.py"
click node_profiles "https://github.com/markostefanov/yellowpages/blob/master/UCLYellowPages/profiles/models.py"
click node_academic "https://github.com/markostefanov/yellowpages/blob/master/UCLYellowPages/profiles/models.py"
click node_visits "https://github.com/markostefanov/yellowpages/blob/master/UCLYellowPages/profiles/models.py"
click node_verification_rows "https://github.com/markostefanov/yellowpages/blob/master/UCLYellowPages/profiles/models.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_routing,node_app_routes,node_pages toneBlue
class node_register,node_registration_form,node_verification toneAmber
class node_search,node_profile_page,node_privacy,node_edit,node_history,node_profile_form toneMint
class node_profiles,node_academic,node_visits,node_verification_rows toneRose
class node_student,node_mail toneIndigo
```

## Components

### Web entry and pages

- [URL routing](https://github.com/markostefanov/yellowpages/blob/master/UCLYellowPages/UCLYellowPages/urls.py): `UCLYellowPages/UCLYellowPages/urls.py`
- [Profile routes](https://github.com/markostefanov/yellowpages/blob/master/UCLYellowPages/profiles/urls.py): `UCLYellowPages/profiles/urls.py`
- [Page templates](https://github.com/markostefanov/yellowpages/tree/master/UCLYellowPages/templates): `UCLYellowPages/templates`

### Accounts and verification

- [Register and login](https://github.com/markostefanov/yellowpages/blob/master/UCLYellowPages/profiles/views.py): `UCLYellowPages/profiles/views.py`
- [Registration form](https://github.com/markostefanov/yellowpages/blob/master/UCLYellowPages/profiles/forms.py): `UCLYellowPages/profiles/forms.py`
- [Email verification](https://github.com/markostefanov/yellowpages/blob/master/UCLYellowPages/profiles/models.py): `UCLYellowPages/profiles/models.py`

### Directory and privacy

- [Directory search](https://github.com/markostefanov/yellowpages/blob/master/UCLYellowPages/profiles/views.py): `UCLYellowPages/profiles/views.py`
- [Profile detail](https://github.com/markostefanov/yellowpages/blob/master/UCLYellowPages/profiles/views.py): `UCLYellowPages/profiles/views.py`
- [Visibility rules](https://github.com/markostefanov/yellowpages/blob/master/UCLYellowPages/profiles/models.py): `UCLYellowPages/profiles/models.py`
- [Edit profile](https://github.com/markostefanov/yellowpages/blob/master/UCLYellowPages/profiles/views.py): `UCLYellowPages/profiles/views.py`
- [View history](https://github.com/markostefanov/yellowpages/blob/master/UCLYellowPages/profiles/views.py): `UCLYellowPages/profiles/views.py`
- [Profile form](https://github.com/markostefanov/yellowpages/blob/master/UCLYellowPages/profiles/forms.py): `UCLYellowPages/profiles/forms.py`

### Profile records

- [Student profiles](https://github.com/markostefanov/yellowpages/blob/master/UCLYellowPages/profiles/models.py): `UCLYellowPages/profiles/models.py`
- [Faculty and courses](https://github.com/markostefanov/yellowpages/blob/master/UCLYellowPages/profiles/models.py): `UCLYellowPages/profiles/models.py`
- [Profile visits](https://github.com/markostefanov/yellowpages/blob/master/UCLYellowPages/profiles/models.py): `UCLYellowPages/profiles/models.py`
- [Verification codes](https://github.com/markostefanov/yellowpages/blob/master/UCLYellowPages/profiles/models.py): `UCLYellowPages/profiles/models.py`

### Other components

- **UCL student**
- **Email delivery**

## Connections

- UCL student → URL routing: requests pages (evidence: `UCLYellowPages/UCLYellowPages/urls.py`)
- URL routing → Register and login: routes accounts (evidence: `UCLYellowPages/UCLYellowPages/urls.py`)
- URL routing → Profile routes: includes profiles (evidence: `UCLYellowPages/UCLYellowPages/urls.py`)
- Profile routes → Directory search: routes search (evidence: `UCLYellowPages/profiles/urls.py`)
- Profile routes → Edit profile: routes edits (evidence: `UCLYellowPages/profiles/urls.py`)
- Profile routes → View history: routes history (evidence: `UCLYellowPages/profiles/urls.py`)
- URL routing → Profile detail: routes profile (evidence: `UCLYellowPages/UCLYellowPages/urls.py`)
- Register and login → Registration form: validates signup (evidence: `UCLYellowPages/profiles/views.py`)
- Registration form → Email verification: checks code (evidence: `UCLYellowPages/profiles/forms.py`)
- Register and login → Student profiles: creates profile (evidence: `UCLYellowPages/profiles/views.py`)
- Register and login → Page templates: renders signup (evidence: `UCLYellowPages/profiles/views.py`)
- UCL student → Email verification: requests code (evidence: `README.md`)
- Email verification → Verification codes: stores code state (evidence: `UCLYellowPages/profiles/forms.py`)
- Register and login → Email delivery: sends code (evidence: `UCLYellowPages/profiles/views.py`)
- Directory search → Student profiles: queries profiles (evidence: `UCLYellowPages/profiles/views.py`)
- Directory search → Visibility rules: filters visibility (evidence: `UCLYellowPages/profiles/views.py`)
- Visibility rules → Faculty and courses: compares course scope (evidence: `UCLYellowPages/profiles/models.py`)
- Profile detail → Student profiles: loads profile (evidence: `UCLYellowPages/profiles/views.py`)
- Profile detail → Visibility rules: checks visibility (evidence: `UCLYellowPages/profiles/views.py`)
- Profile detail → Profile visits: records visit (evidence: `UCLYellowPages/profiles/views.py`)
- Edit profile → Profile form: uses form (evidence: `UCLYellowPages/profiles/views.py`)
- Profile form → Student profiles: updates profile (evidence: `UCLYellowPages/profiles/forms.py`)
- View history → Profile visits: reads visits (evidence: `UCLYellowPages/profiles/views.py`)
- Directory search → Page templates: renders results
- Profile detail → Page templates: renders detail
- Edit profile → Page templates: renders editor
- View history → Page templates: renders history
