# parthoprobal/decksynth-370-project architecture

> Architecture diagram of the GitHub repository parthoprobal/decksynth-370-project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/parthoprobal/decksynth-370-project
- Repository: https://github.com/parthoprobal/decksynth-370-project

## Overview

DeckSynth is a PHP cardistry and magic community/commerce website: visitors browse decks, courses and tutorials; members can register, learn, publish and discuss, and buy cards. The homepage is the main discovery entry point; signed-in users also manage profiles, enrollments, videos and orders. Recommendations use tracked interests and catalog data. The tree and sampled source support these capabilities, but many endpoint implementations and the database schema were not inspected, so uncertain internal wiring is omitted.

Main entry points: [`config/database.php`](https://github.com/parthoprobal/decksynth-370-project/blob/main/config/database.php) (PDO connection), [`index.php`](https://github.com/parthoprobal/decksynth-370-project/blob/main/index.php) (Homepage), [`home_template.php`](https://github.com/parthoprobal/decksynth-370-project/blob/main/home_template.php) (Discovery catalog), [`ai_recommendation_engine.php`](https://github.com/parthoprobal/decksynth-370-project/blob/main/ai_recommendation_engine.php) (AI recommendations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Discovery and learning"]
  node_home["Homepage<br/>[index.php]"]
  node_homeview["Discovery catalog<br/>[home_template.php]"]
  node_courses["Course enrollment<br/>[enroll_course.php]"]
  node_magicians["Magician finder<br/>[find_magician.php]"]
  node_recommend["AI recommendations"]
  node_recommendapi["Recommendation endpoint"]
end

subgraph group_identity["Accounts and profiles"]
  node_authui["Login and registration<br/>[login.php]"]
  node_authprocess["Account processing"]
  node_profile["Member dashboard<br/>[your_info.php]"]
end

subgraph group_commerce["Commerce"]
  node_cart["Shopping cart<br/>[cart.php]"]
  node_cartadd["Add to cart<br/>[add_to_cart.php]"]
  node_checkout["Checkout<br/>[checkout.php]"]
end

subgraph group_community["Community and media"]
  node_community["Community forum<br/>[blog.php]"]
  node_posts["Post management<br/>[create_post.php]"]
  node_comments["Comment handling<br/>[add_comment.php]"]
  node_video["Video tutorials<br/>[watch_video.php]"]
  node_upload["Video publishing<br/>[upload_video.php]"]
  node_notifications["Notifications<br/>[notifications.php]"]
end

subgraph group_platform["Persistence"]
  node_dbconfig["PDO connection<br/>[database.php]"]
  node_database[("DeckSynth database")]
end

node_visitor(("Visitor or member"))

node_visitor -->|"visits"| node_home
node_home -->|"loads user data"| node_dbconfig
node_home -->|"renders"| node_homeview
node_homeview -->|"requests suggestions"| node_recommendapi
node_recommendapi -->|"generates"| node_recommend
node_recommend -->|"reads activity and catalog"| node_dbconfig
node_visitor -->|"signs in or registers"| node_authui
node_authui -->|"submits registration"| node_authprocess
node_authprocess -->|"checks and creates account"| node_dbconfig
node_visitor -->|"manages account"| node_profile
node_visitor -->|"enrolls"| node_courses
node_visitor -->|"finds mentors"| node_magicians
node_visitor -->|"adds deck"| node_cartadd
node_cartadd -->|"updates cart"| node_cart
node_visitor -->|"places order"| node_checkout
node_visitor -->|"reads and votes"| node_community
node_visitor -->|"publishes post"| node_posts
node_visitor -->|"comments"| node_comments
node_visitor -->|"watches tutorial"| node_video
node_visitor -->|"publishes tutorial"| node_upload
node_visitor -->|"checks updates"| node_notifications
node_dbconfig -->|"connects"| node_database

click node_home "https://github.com/parthoprobal/decksynth-370-project/blob/main/index.php"
click node_homeview "https://github.com/parthoprobal/decksynth-370-project/blob/main/home_template.php"
click node_courses "https://github.com/parthoprobal/decksynth-370-project/blob/main/enroll_course.php"
click node_magicians "https://github.com/parthoprobal/decksynth-370-project/blob/main/find_magician.php"
click node_recommend "https://github.com/parthoprobal/decksynth-370-project/blob/main/ai_recommendation_engine.php"
click node_recommendapi "https://github.com/parthoprobal/decksynth-370-project/blob/main/get_ai_recommendations_ajax.php"
click node_authui "https://github.com/parthoprobal/decksynth-370-project/blob/main/auth/login.php"
click node_authprocess "https://github.com/parthoprobal/decksynth-370-project/blob/main/auth/process_register.php"
click node_profile "https://github.com/parthoprobal/decksynth-370-project/blob/main/your_info.php"
click node_cart "https://github.com/parthoprobal/decksynth-370-project/blob/main/cart.php"
click node_cartadd "https://github.com/parthoprobal/decksynth-370-project/blob/main/add_to_cart.php"
click node_checkout "https://github.com/parthoprobal/decksynth-370-project/blob/main/checkout.php"
click node_community "https://github.com/parthoprobal/decksynth-370-project/blob/main/blog.php"
click node_posts "https://github.com/parthoprobal/decksynth-370-project/blob/main/create_post.php"
click node_comments "https://github.com/parthoprobal/decksynth-370-project/blob/main/add_comment.php"
click node_video "https://github.com/parthoprobal/decksynth-370-project/blob/main/watch_video.php"
click node_upload "https://github.com/parthoprobal/decksynth-370-project/blob/main/upload_video.php"
click node_notifications "https://github.com/parthoprobal/decksynth-370-project/blob/main/notifications.php"
click node_dbconfig "https://github.com/parthoprobal/decksynth-370-project/blob/main/config/database.php"
click node_database "https://github.com/parthoprobal/decksynth-370-project/blob/main/DeckSynth%20Database.sql"

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_home,node_homeview,node_courses,node_magicians,node_recommend,node_recommendapi toneBlue
class node_authui,node_authprocess,node_profile toneAmber
class node_cart,node_cartadd,node_checkout toneMint
class node_community,node_posts,node_comments,node_video,node_upload,node_notifications toneRose
class node_dbconfig,node_database,node_visitor toneIndigo
```

## Components

### Discovery and learning

- [Homepage](https://github.com/parthoprobal/decksynth-370-project/blob/main/index.php): `index.php`
- [Discovery catalog](https://github.com/parthoprobal/decksynth-370-project/blob/main/home_template.php): `home_template.php`
- [Course enrollment](https://github.com/parthoprobal/decksynth-370-project/blob/main/enroll_course.php): `enroll_course.php`
- [Magician finder](https://github.com/parthoprobal/decksynth-370-project/blob/main/find_magician.php): `find_magician.php`
- [AI recommendations](https://github.com/parthoprobal/decksynth-370-project/blob/main/ai_recommendation_engine.php): `ai_recommendation_engine.php`
- [Recommendation endpoint](https://github.com/parthoprobal/decksynth-370-project/blob/main/get_ai_recommendations_ajax.php): `get_ai_recommendations_ajax.php`

### Accounts and profiles

- [Login and registration](https://github.com/parthoprobal/decksynth-370-project/blob/main/auth/login.php): `auth/login.php`
- [Account processing](https://github.com/parthoprobal/decksynth-370-project/blob/main/auth/process_register.php): `auth/process_register.php`
- [Member dashboard](https://github.com/parthoprobal/decksynth-370-project/blob/main/your_info.php): `your_info.php`

### Commerce

- [Shopping cart](https://github.com/parthoprobal/decksynth-370-project/blob/main/cart.php): `cart.php`
- [Add to cart](https://github.com/parthoprobal/decksynth-370-project/blob/main/add_to_cart.php): `add_to_cart.php`
- [Checkout](https://github.com/parthoprobal/decksynth-370-project/blob/main/checkout.php): `checkout.php`

### Community and media

- [Community forum](https://github.com/parthoprobal/decksynth-370-project/blob/main/blog.php): `blog.php`
- [Post management](https://github.com/parthoprobal/decksynth-370-project/blob/main/create_post.php): `create_post.php`
- [Comment handling](https://github.com/parthoprobal/decksynth-370-project/blob/main/add_comment.php): `add_comment.php`
- [Video tutorials](https://github.com/parthoprobal/decksynth-370-project/blob/main/watch_video.php): `watch_video.php`
- [Video publishing](https://github.com/parthoprobal/decksynth-370-project/blob/main/upload_video.php): `upload_video.php`
- [Notifications](https://github.com/parthoprobal/decksynth-370-project/blob/main/notifications.php): `notifications.php`

### Persistence

- [PDO connection](https://github.com/parthoprobal/decksynth-370-project/blob/main/config/database.php): `config/database.php`
- [DeckSynth database](https://github.com/parthoprobal/decksynth-370-project/blob/main/DeckSynth%20Database.sql): `DeckSynth Database.sql`

### Other components

- **Visitor or member**

## Connections

- Visitor or member → Homepage: visits
- Homepage → PDO connection: loads user data
- Homepage → Discovery catalog: renders
- Discovery catalog → Recommendation endpoint: requests suggestions
- Recommendation endpoint → AI recommendations: generates
- AI recommendations → PDO connection: reads activity and catalog
- Visitor or member → Login and registration: signs in or registers
- Login and registration → Account processing: submits registration
- Account processing → PDO connection: checks and creates account
- Visitor or member → Member dashboard: manages account
- Visitor or member → Course enrollment: enrolls
- Visitor or member → Magician finder: finds mentors
- Visitor or member → Add to cart: adds deck
- Add to cart → Shopping cart: updates cart
- Visitor or member → Checkout: places order
- Visitor or member → Community forum: reads and votes
- Visitor or member → Post management: publishes post
- Visitor or member → Comment handling: comments
- Visitor or member → Video tutorials: watches tutorial
- Visitor or member → Video publishing: publishes tutorial
- Visitor or member → Notifications: checks updates
- PDO connection → DeckSynth database: connects
