# kawsarcodes/uiu-social architecture

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

- Interactive diagram: https://gitdiagram.com/kawsarcodes/uiu-social
- Repository: https://github.com/kawsarcodes/uiu-social

## Overview

UIU SOCIAL is a university social-network application. Its principal workflow is account registration or login, followed by social discovery and participation: users browse and publish posts, connect, join groups or clubs, attend events, message, and receive notifications; administrators moderate accounts and content. The API directories expose these distinct domain stages, while shared helpers and session/database code provide authentication, utility behavior, and persistence. The README names the product but gives no architecture details, and the sampled sources do not establish browser-to-API wiring, so those links are omitted.

Main entry points: [`config/helpers.php`](https://github.com/kawsarcodes/uiu-social/blob/main/config/helpers.php) (Application helpers), [`api/search/index.php`](https://github.com/kawsarcodes/uiu-social/blob/main/api/search/index.php) (Search and discovery), [`api/messages/stream.php`](https://github.com/kawsarcodes/uiu-social/blob/main/api/messages/stream.php) (Direct messaging), [`config/session.php`](https://github.com/kawsarcodes/uiu-social/blob/main/config/session.php) (Session services)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Identity and access"]
  node_auth["Account access<br/>[register.php]"]
  node_admin["Administration<br/>[delete_content.php]"]
end

subgraph group_social["Social activity"]
  node_feed["Social feed<br/>[get_posts.php]"]
  node_connections["Connections<br/>[send.php]"]
  node_discovery["Search and discovery<br/>[index.php]"]
  node_browser_search["Search interface<br/>[search.js]"]
end

subgraph group_communities["Communities and events"]
  node_groups["Groups<br/>[get.php]"]
  node_clubs["Clubs<br/>[get_posts.php]"]
  node_announcements["Announcements<br/>[list.php]"]
  node_events["Events<br/>[list.php]"]
end

subgraph group_communication["Communication"]
  node_messages["Direct messaging<br/>[stream.php]"]
  node_notifications["Notifications<br/>[index.php]"]
  node_browser_messages["Messaging interface<br/>[messages.js]"]
end

subgraph group_platform["Shared platform"]
  node_helpers["Application helpers<br/>[helpers.php]"]
  node_session["Session services<br/>[session.php]"]
  node_database[("Database connection<br/>[database.php]")]
  node_schema["Schema migration<br/>[migrate.php]"]
end

node_visitor(("University user"))

node_auth -->|"uses helpers"| node_helpers
node_admin -->|"uses helpers"| node_helpers
node_feed -->|"uses helpers"| node_helpers
node_connections -->|"uses helpers"| node_helpers
node_discovery -->|"uses helpers"| node_helpers
node_groups -->|"uses helpers"| node_helpers
node_clubs -->|"uses helpers"| node_helpers
node_announcements -->|"uses helpers"| node_helpers
node_events -->|"uses helpers"| node_helpers
node_messages -->|"uses helpers"| node_helpers
node_notifications -->|"uses helpers"| node_helpers
node_helpers -->|"loads session"| node_session
node_session -->|"loads connection"| node_database
node_schema -->|"loads helpers"| node_helpers
node_browser_messages -.-> node_messages
node_browser_search -.-> node_discovery

click node_auth "https://github.com/kawsarcodes/uiu-social/blob/main/api/auth/register.php"
click node_admin "https://github.com/kawsarcodes/uiu-social/blob/main/api/admin/delete_content.php"
click node_feed "https://github.com/kawsarcodes/uiu-social/blob/main/api/posts/get_posts.php"
click node_connections "https://github.com/kawsarcodes/uiu-social/blob/main/api/connections/send.php"
click node_discovery "https://github.com/kawsarcodes/uiu-social/blob/main/api/search/index.php"
click node_groups "https://github.com/kawsarcodes/uiu-social/blob/main/api/groups/get.php"
click node_clubs "https://github.com/kawsarcodes/uiu-social/blob/main/api/clubs/get_posts.php"
click node_announcements "https://github.com/kawsarcodes/uiu-social/blob/main/api/announcements/list.php"
click node_events "https://github.com/kawsarcodes/uiu-social/blob/main/api/events/list.php"
click node_messages "https://github.com/kawsarcodes/uiu-social/blob/main/api/messages/stream.php"
click node_notifications "https://github.com/kawsarcodes/uiu-social/blob/main/api/notifications/index.php"
click node_browser_messages "https://github.com/kawsarcodes/uiu-social/blob/main/js/messages.js"
click node_browser_search "https://github.com/kawsarcodes/uiu-social/blob/main/js/search.js"
click node_helpers "https://github.com/kawsarcodes/uiu-social/blob/main/config/helpers.php"
click node_session "https://github.com/kawsarcodes/uiu-social/blob/main/config/session.php"
click node_database "https://github.com/kawsarcodes/uiu-social/blob/main/config/database.php"
click node_schema "https://github.com/kawsarcodes/uiu-social/blob/main/database/migrate.php"

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_auth,node_admin,node_visitor toneBlue
class node_feed,node_connections,node_discovery,node_browser_search toneAmber
class node_groups,node_clubs,node_announcements,node_events toneMint
class node_messages,node_notifications,node_browser_messages toneRose
class node_helpers,node_session,node_database,node_schema toneIndigo
```

## Components

### Identity and access

- [Account access](https://github.com/kawsarcodes/uiu-social/blob/main/api/auth/register.php): `api/auth/register.php`
- [Administration](https://github.com/kawsarcodes/uiu-social/blob/main/api/admin/delete_content.php): `api/admin/delete_content.php`

### Social activity

- [Social feed](https://github.com/kawsarcodes/uiu-social/blob/main/api/posts/get_posts.php): `api/posts/get_posts.php`
- [Connections](https://github.com/kawsarcodes/uiu-social/blob/main/api/connections/send.php): `api/connections/send.php`
- [Search and discovery](https://github.com/kawsarcodes/uiu-social/blob/main/api/search/index.php): `api/search/index.php`
- [Search interface](https://github.com/kawsarcodes/uiu-social/blob/main/js/search.js): `js/search.js`

### Communities and events

- [Groups](https://github.com/kawsarcodes/uiu-social/blob/main/api/groups/get.php): `api/groups/get.php`
- [Clubs](https://github.com/kawsarcodes/uiu-social/blob/main/api/clubs/get_posts.php): `api/clubs/get_posts.php`
- [Announcements](https://github.com/kawsarcodes/uiu-social/blob/main/api/announcements/list.php): `api/announcements/list.php`
- [Events](https://github.com/kawsarcodes/uiu-social/blob/main/api/events/list.php): `api/events/list.php`

### Communication

- [Direct messaging](https://github.com/kawsarcodes/uiu-social/blob/main/api/messages/stream.php): `api/messages/stream.php`
- [Notifications](https://github.com/kawsarcodes/uiu-social/blob/main/api/notifications/index.php): `api/notifications/index.php`
- [Messaging interface](https://github.com/kawsarcodes/uiu-social/blob/main/js/messages.js): `js/messages.js`

### Shared platform

- [Application helpers](https://github.com/kawsarcodes/uiu-social/blob/main/config/helpers.php): `config/helpers.php`
- [Session services](https://github.com/kawsarcodes/uiu-social/blob/main/config/session.php): `config/session.php`
- [Database connection](https://github.com/kawsarcodes/uiu-social/blob/main/config/database.php): `config/database.php`
- [Schema migration](https://github.com/kawsarcodes/uiu-social/blob/main/database/migrate.php): `database/migrate.php`

### Other components

- **University user**

## Connections

- Account access → Application helpers: uses helpers (evidence: `api/auth/register.php`)
- Administration → Application helpers: uses helpers (evidence: `api/admin/delete_content.php`)
- Social feed → Application helpers: uses helpers (evidence: `api/posts/get_posts.php`)
- Connections → Application helpers: uses helpers (evidence: `api/connections/send.php`)
- Search and discovery → Application helpers: uses helpers (evidence: `api/search/index.php`)
- Groups → Application helpers: uses helpers (evidence: `api/groups/get.php`)
- Clubs → Application helpers: uses helpers (evidence: `api/clubs/get_posts.php`)
- Announcements → Application helpers: uses helpers (evidence: `api/announcements/list.php`)
- Events → Application helpers: uses helpers (evidence: `api/events/list.php`)
- Direct messaging → Application helpers: uses helpers (evidence: `api/messages/stream.php`)
- Notifications → Application helpers: uses helpers (evidence: `api/notifications/index.php`)
- Application helpers → Session services: loads session (evidence: `config/helpers.php`)
- Session services → Database connection: loads connection (evidence: `config/session.php`)
- Schema migration → Application helpers: loads helpers (evidence: `database/migrate.php`)
- Messaging interface → Direct messaging
- Search interface → Search and discovery
