# ericalcode/job-market architecture

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

- Interactive diagram: https://gitdiagram.com/ericalcode/job-market
- Repository: https://github.com/ericalcode/job-market

## Overview

CareerConnect is a PHP/MySQL job-market platform. Users choose a role, register or log in, then reach a role-based dashboard for job seeking, employer hiring, or administration. Account settings manage profiles and security; directory and reports expose platform information. Dashboard, settings, and authentication excerpts show database access through a shared mysqli connector. The README documents additional application, subscription, and administrator capabilities. Some dashboard logic and other source files were not fully sampled, so those capabilities are represented without speculative internal call chains.

Main entry points: [`dashboard.php`](https://github.com/ericalcode/job-market/blob/main/dashboard.php) (Role dashboard), [`db.php`](https://github.com/ericalcode/job-market/blob/main/db.php) (MySQL connector), [`login.php`](https://github.com/ericalcode/job-market/blob/main/login.php) (Authentication), [`register.php`](https://github.com/ericalcode/job-market/blob/main/register.php) (Registration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and access"]
  node_landing["Role selection<br/>[index.php]"]
  node_registration["Registration<br/>[register.php]"]
  node_login["Authentication<br/>[login.php]"]
  node_session_exit["Logout<br/>[logout.php]"]
  node_shared_header["Shared navigation<br/>[header.php]"]
  node_styles["Shared styles<br/>[style.css]"]
end

subgraph group_market["Jobs and subscriptions"]
  node_dashboard["Role dashboard<br/>[dashboard.php]"]
  node_job_workflow["Job posts and applications<br/>[dashboard.php]"]
  node_pro_subscription["Pro subscriptions<br/>[dashboard.php]"]
end

subgraph group_accounts["Accounts and profiles"]
  node_profile_settings["Profile and security<br/>[settings.php]"]
  node_profile_editor["Profile editor<br/>[profile.php]"]
  node_member_directory["Member directory<br/>[directory.php]"]
end

subgraph group_admin["Administration and data"]
  node_admin_tools["Admin management<br/>[dashboard.php]"]
  node_reporting["Platform reports<br/>[reports.php]"]
  node_db_connector["MySQL connector<br/>[db.php]"]
  node_schema["Relational schema<br/>[schema.sql]"]
  node_database[("MySQL / TiDB")]
end

node_visitor(("Visitor / user"))
node_mpesa["MPesa payment"]

node_visitor -->|"opens"| node_landing
node_landing -->|"links to"| node_registration
node_registration -->|"redirects to"| node_login
node_login -->|"redirects to"| node_dashboard
node_visitor -->|"submits credentials"| node_login
node_visitor -->|"requests logout"| node_session_exit
node_dashboard -->|"redirects unauthenticated"| node_login
node_dashboard -->|"serves role views"| node_job_workflow
node_dashboard -->|"shows status"| node_pro_subscription
node_pro_subscription -->|"gives payment steps"| node_mpesa
node_dashboard -->|"serves admin actions"| node_admin_tools
node_dashboard -->|"links to"| node_member_directory
node_dashboard -->|"links to"| node_reporting
node_dashboard -->|"links to"| node_profile_settings
node_profile_settings -->|"queries"| node_db_connector
node_profile_editor -->|"queries"| node_db_connector
node_member_directory -->|"queries"| node_db_connector
node_reporting -->|"queries"| node_db_connector
node_dashboard -->|"queries"| node_db_connector
node_registration -->|"creates account"| node_db_connector
node_login -->|"checks credentials"| node_db_connector
node_db_connector -->|"connects to"| node_database
node_schema -->|"defines tables"| node_database
node_shared_header -->|"loads stylesheet"| node_styles

click node_landing "https://github.com/ericalcode/job-market/blob/main/index.php"
click node_registration "https://github.com/ericalcode/job-market/blob/main/register.php"
click node_login "https://github.com/ericalcode/job-market/blob/main/login.php"
click node_session_exit "https://github.com/ericalcode/job-market/blob/main/logout.php"
click node_shared_header "https://github.com/ericalcode/job-market/blob/main/header.php"
click node_dashboard "https://github.com/ericalcode/job-market/blob/main/dashboard.php"
click node_job_workflow "https://github.com/ericalcode/job-market/blob/main/dashboard.php"
click node_pro_subscription "https://github.com/ericalcode/job-market/blob/main/dashboard.php"
click node_profile_settings "https://github.com/ericalcode/job-market/blob/main/settings.php"
click node_profile_editor "https://github.com/ericalcode/job-market/blob/main/profile.php"
click node_member_directory "https://github.com/ericalcode/job-market/blob/main/directory.php"
click node_admin_tools "https://github.com/ericalcode/job-market/blob/main/dashboard.php"
click node_reporting "https://github.com/ericalcode/job-market/blob/main/reports.php"
click node_db_connector "https://github.com/ericalcode/job-market/blob/main/db.php"
click node_schema "https://github.com/ericalcode/job-market/blob/main/schema.sql"
click node_styles "https://github.com/ericalcode/job-market/blob/main/style.css"

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_landing,node_registration,node_login,node_session_exit,node_shared_header,node_styles,node_visitor toneBlue
class node_dashboard,node_job_workflow,node_pro_subscription toneAmber
class node_profile_settings,node_profile_editor,node_member_directory toneMint
class node_admin_tools,node_reporting,node_db_connector,node_schema,node_database toneRose
class node_mpesa toneIndigo
```

## Components

### Entry and access

- [Role selection](https://github.com/ericalcode/job-market/blob/main/index.php): `index.php`
- [Registration](https://github.com/ericalcode/job-market/blob/main/register.php): `register.php`
- [Authentication](https://github.com/ericalcode/job-market/blob/main/login.php): `login.php`
- [Logout](https://github.com/ericalcode/job-market/blob/main/logout.php): `logout.php`
- [Shared navigation](https://github.com/ericalcode/job-market/blob/main/header.php): `header.php`
- [Shared styles](https://github.com/ericalcode/job-market/blob/main/style.css): `style.css`

### Jobs and subscriptions

- [Role dashboard](https://github.com/ericalcode/job-market/blob/main/dashboard.php): `dashboard.php`
- [Job posts and applications](https://github.com/ericalcode/job-market/blob/main/dashboard.php): `dashboard.php`
- [Pro subscriptions](https://github.com/ericalcode/job-market/blob/main/dashboard.php): `dashboard.php`

### Accounts and profiles

- [Profile and security](https://github.com/ericalcode/job-market/blob/main/settings.php): `settings.php`
- [Profile editor](https://github.com/ericalcode/job-market/blob/main/profile.php): `profile.php`
- [Member directory](https://github.com/ericalcode/job-market/blob/main/directory.php): `directory.php`

### Administration and data

- [Admin management](https://github.com/ericalcode/job-market/blob/main/dashboard.php): `dashboard.php`
- [Platform reports](https://github.com/ericalcode/job-market/blob/main/reports.php): `reports.php`
- [MySQL connector](https://github.com/ericalcode/job-market/blob/main/db.php): `db.php`
- [Relational schema](https://github.com/ericalcode/job-market/blob/main/schema.sql): `schema.sql`
- **MySQL / TiDB**

### Other components

- **Visitor / user**
- **MPesa payment**

## Connections

- Visitor / user → Role selection: opens (evidence: `index.php`)
- Role selection → Registration: links to (evidence: `index.php`)
- Registration → Authentication: redirects to (evidence: `register.php`)
- Authentication → Role dashboard: redirects to (evidence: `login.php`)
- Visitor / user → Authentication: submits credentials (evidence: `login.php`)
- Visitor / user → Logout: requests logout (evidence: `logout.php`)
- Role dashboard → Authentication: redirects unauthenticated (evidence: `dashboard.php`)
- Role dashboard → Job posts and applications: serves role views (evidence: `dashboard.php`)
- Role dashboard → Pro subscriptions: shows status (evidence: `dashboard.php`)
- Pro subscriptions → MPesa payment: gives payment steps (evidence: `dashboard.php`)
- Role dashboard → Admin management: serves admin actions (evidence: `dashboard.php`)
- Role dashboard → Member directory: links to (evidence: `dashboard.php`)
- Role dashboard → Platform reports: links to (evidence: `dashboard.php`)
- Role dashboard → Profile and security: links to (evidence: `dashboard.php`)
- Profile and security → MySQL connector: queries (evidence: `settings.php`)
- Profile editor → MySQL connector: queries (evidence: `profile.php`)
- Member directory → MySQL connector: queries (evidence: `directory.php`)
- Platform reports → MySQL connector: queries (evidence: `reports.php`)
- Role dashboard → MySQL connector: queries (evidence: `dashboard.php`)
- Registration → MySQL connector: creates account (evidence: `register.php`)
- Authentication → MySQL connector: checks credentials (evidence: `login.php`)
- MySQL connector → MySQL / TiDB: connects to (evidence: `db.php`)
- Relational schema → MySQL / TiDB: defines tables (evidence: `README.md`)
- Shared navigation → Shared styles: loads stylesheet (evidence: `header.php`)
