# kafelek69/prisma-app architecture

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

- Interactive diagram: https://gitdiagram.com/kafelek69/prisma-app
- Repository: https://github.com/kafelek69/prisma-app

## Overview

Prisma is an LGBTQ+ dating and social platform. Its main user journey is account creation and profile setup, followed by discovering profiles and forming matches; users can then chat and manage their account. The PHP pages and shared services are the main runtime, with a separate database layer. The README also describes safer messaging and premium features; its local-events map is explicitly marked “TO DO.” Several page-to-page runtime calls were not sampled, so those connections are left out rather than inferred.

Main entry points: [`php/auth.php`](https://github.com/kafelek69/prisma-app/blob/main/php/auth.php) (Authentication), [`php/db.php`](https://github.com/kafelek69/prisma-app/blob/main/php/db.php) (MySQL database), [`php/badges.php`](https://github.com/kafelek69/prisma-app/blob/main/php/badges.php) (Badges), [`admin.php`](https://github.com/kafelek69/prisma-app/blob/main/admin.php) (Administration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_accounts["Accounts &amp; Profiles"]
  node_registration["Registration<br/>[register.php]"]
  node_login["Login<br/>[login.php]"]
  node_auth["Authentication<br/>[auth.php]"]
  node_profile["Profile view<br/>[profile.php]"]
  node_profile_edit["Profile editing<br/>[edit-profile.php]"]
  node_preferences["Preferences<br/>[preferences.php]"]
  node_settings["Account settings<br/>[settings.php]"]
end

subgraph group_discovery["Discovery &amp; Social"]
  node_swipe["Profile discovery<br/>[swipe.php]"]
  node_matcher["Matching engine<br/>[matchmaker.php]"]
  node_likes["Likes<br/>[likes.php]"]
  node_matches["Matches<br/>[matches.php]"]
  node_chat["Chat<br/>[chat.php]"]
  node_messages["Message handling<br/>[messages.php]"]
  node_node_chat["Realtime chat server<br/>[server.js]"]
end

subgraph group_platform["Platform Services"]
  node_content_filter["Content filtering<br/>[content_filter.php]"]
  node_badges["Badges<br/>[badges.php]"]
  node_database[("MySQL database<br/>[db.php]")]
  node_verification["Identity verification<br/>[verify.php]"]
  node_face_match["Face matching API<br/>[face_match_api.py]"]
  node_header["Site navigation<br/>[header.php]"]
end

subgraph group_operations["Admin &amp; Monetization"]
  node_admin["Administration<br/>[admin.php]"]
  node_premium["Premium plans<br/>[premium.php]"]
  node_payment["Payment processing"]
  node_ads["Ad display<br/>[ads.php]"]
end

node_user(("User"))

node_user -->|"creates account"| node_registration
node_user -->|"signs in"| node_login
node_registration -->|"registers with"| node_auth
node_login -->|"authenticates with"| node_auth
node_auth -->|"reads and writes"| node_database
node_profile_edit -->|"filters content"| node_content_filter
node_profile_edit -->|"evaluates badges"| node_badges
node_profile -->|"loads badges"| node_badges
node_badges -->|"reads and writes"| node_database
node_matcher -->|"queries matches"| node_database
node_profile -->|"loads user"| node_auth
node_admin -->|"uses authentication"| node_auth
node_admin -->|"uses badges"| node_badges
node_admin -->|"accesses data"| node_database
node_payment -->|"checks session"| node_auth
node_payment -->|"accesses data"| node_database
node_ads -->|"checks premium status"| node_database
node_user -->|"discovers profiles"| node_swipe
node_user -->|"messages matches"| node_chat
node_user -.->|"verifies identity"| node_verification
node_verification -.->|"requests face match"| node_face_match
node_premium -.->|"initiates payment"| node_payment
node_chat -.->|"uses realtime transport"| node_node_chat

click node_registration "https://github.com/kafelek69/prisma-app/blob/main/register.php"
click node_login "https://github.com/kafelek69/prisma-app/blob/main/login.php"
click node_auth "https://github.com/kafelek69/prisma-app/blob/main/php/auth.php"
click node_profile "https://github.com/kafelek69/prisma-app/blob/main/profile.php"
click node_profile_edit "https://github.com/kafelek69/prisma-app/blob/main/edit-profile.php"
click node_preferences "https://github.com/kafelek69/prisma-app/blob/main/preferences.php"
click node_settings "https://github.com/kafelek69/prisma-app/blob/main/settings.php"
click node_swipe "https://github.com/kafelek69/prisma-app/blob/main/swipe.php"
click node_matcher "https://github.com/kafelek69/prisma-app/blob/main/php/matchmaker.php"
click node_likes "https://github.com/kafelek69/prisma-app/blob/main/likes.php"
click node_matches "https://github.com/kafelek69/prisma-app/blob/main/matches.php"
click node_chat "https://github.com/kafelek69/prisma-app/blob/main/chat.php"
click node_messages "https://github.com/kafelek69/prisma-app/blob/main/messages.php"
click node_content_filter "https://github.com/kafelek69/prisma-app/blob/main/php/content_filter.php"
click node_badges "https://github.com/kafelek69/prisma-app/blob/main/php/badges.php"
click node_database "https://github.com/kafelek69/prisma-app/blob/main/php/db.php"
click node_verification "https://github.com/kafelek69/prisma-app/blob/main/api/verify.php"
click node_face_match "https://github.com/kafelek69/prisma-app/blob/main/api/face_match_api.py"
click node_admin "https://github.com/kafelek69/prisma-app/blob/main/admin.php"
click node_premium "https://github.com/kafelek69/prisma-app/blob/main/premium.php"
click node_payment "https://github.com/kafelek69/prisma-app/blob/main/api/process_payment.php"
click node_ads "https://github.com/kafelek69/prisma-app/blob/main/templates/components/ads.php"
click node_header "https://github.com/kafelek69/prisma-app/blob/main/templates/components/header.php"
click node_node_chat "https://github.com/kafelek69/prisma-app/blob/main/node_server/server.js"

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_registration,node_login,node_auth,node_profile,node_profile_edit,node_preferences,node_settings,node_user toneBlue
class node_swipe,node_matcher,node_likes,node_matches,node_chat,node_messages,node_node_chat toneAmber
class node_content_filter,node_badges,node_database,node_verification,node_face_match,node_header toneMint
class node_admin,node_premium,node_payment,node_ads toneRose
```

## Components

### Accounts & Profiles

- [Registration](https://github.com/kafelek69/prisma-app/blob/main/register.php): `register.php`
- [Login](https://github.com/kafelek69/prisma-app/blob/main/login.php): `login.php`
- [Authentication](https://github.com/kafelek69/prisma-app/blob/main/php/auth.php): `php/auth.php`
- [Profile view](https://github.com/kafelek69/prisma-app/blob/main/profile.php): `profile.php`
- [Profile editing](https://github.com/kafelek69/prisma-app/blob/main/edit-profile.php): `edit-profile.php`
- [Preferences](https://github.com/kafelek69/prisma-app/blob/main/preferences.php): `preferences.php`
- [Account settings](https://github.com/kafelek69/prisma-app/blob/main/settings.php): `settings.php`

### Discovery & Social

- [Profile discovery](https://github.com/kafelek69/prisma-app/blob/main/swipe.php): `swipe.php`
- [Matching engine](https://github.com/kafelek69/prisma-app/blob/main/php/matchmaker.php): `php/matchmaker.php`
- [Likes](https://github.com/kafelek69/prisma-app/blob/main/likes.php): `likes.php`
- [Matches](https://github.com/kafelek69/prisma-app/blob/main/matches.php): `matches.php`
- [Chat](https://github.com/kafelek69/prisma-app/blob/main/chat.php): `chat.php`
- [Message handling](https://github.com/kafelek69/prisma-app/blob/main/messages.php): `messages.php`
- [Realtime chat server](https://github.com/kafelek69/prisma-app/blob/main/node_server/server.js): `node_server/server.js`

### Platform Services

- [Content filtering](https://github.com/kafelek69/prisma-app/blob/main/php/content_filter.php): `php/content_filter.php`
- [Badges](https://github.com/kafelek69/prisma-app/blob/main/php/badges.php): `php/badges.php`
- [MySQL database](https://github.com/kafelek69/prisma-app/blob/main/php/db.php): `php/db.php`
- [Identity verification](https://github.com/kafelek69/prisma-app/blob/main/api/verify.php): `api/verify.php`
- [Face matching API](https://github.com/kafelek69/prisma-app/blob/main/api/face_match_api.py): `api/face_match_api.py`
- [Site navigation](https://github.com/kafelek69/prisma-app/blob/main/templates/components/header.php): `templates/components/header.php`

### Admin & Monetization

- [Administration](https://github.com/kafelek69/prisma-app/blob/main/admin.php): `admin.php`
- [Premium plans](https://github.com/kafelek69/prisma-app/blob/main/premium.php): `premium.php`
- [Payment processing](https://github.com/kafelek69/prisma-app/blob/main/api/process_payment.php): `api/process_payment.php`
- [Ad display](https://github.com/kafelek69/prisma-app/blob/main/templates/components/ads.php): `templates/components/ads.php`

### Other components

- **User**

## Connections

- User → Registration: creates account
- User → Login: signs in
- Registration → Authentication: registers with (evidence: `register.php`)
- Login → Authentication: authenticates with (evidence: `php/auth.php`)
- Authentication → MySQL database: reads and writes (evidence: `php/auth.php`)
- Profile editing → Content filtering: filters content (evidence: `edit-profile.php`)
- Profile editing → Badges: evaluates badges (evidence: `edit-profile.php`)
- Profile view → Badges: loads badges (evidence: `profile.php`)
- Badges → MySQL database: reads and writes (evidence: `php/badges.php`)
- Matching engine → MySQL database: queries matches (evidence: `php/matchmaker.php`)
- Profile view → Authentication: loads user (evidence: `profile.php`)
- Administration → Authentication: uses authentication (evidence: `admin.php`)
- Administration → Badges: uses badges (evidence: `admin.php`)
- Administration → MySQL database: accesses data (evidence: `admin.php`)
- Payment processing → Authentication: checks session (evidence: `api/process_payment.php`)
- Payment processing → MySQL database: accesses data (evidence: `api/process_payment.php`)
- Ad display → MySQL database: checks premium status (evidence: `templates/components/ads.php`)
- User → Profile discovery: discovers profiles
- User → Chat: messages matches
- User → Identity verification: verifies identity
- Identity verification → Face matching API: requests face match
- Premium plans → Payment processing: initiates payment
- Chat → Realtime chat server: uses realtime transport
