# pmj01/prepit architecture

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

- Interactive diagram: https://gitdiagram.com/pmj01/prepit
- Repository: https://github.com/pmj01/prepit

## Overview

PrepCore is a placement-preparation web app: students sign in, enter a dashboard, and access practice and interview-preparation features. The React dashboard also presents company plans, mock tests, Core CS, courses, and career tools. PHP provides account and practice-question endpoints backed by MySQL; a Java filter and coding-problems servlet are also present. The sampled excerpts show the frontend routing and PHP database calls, but not dashboard request implementations or Java wiring, so those connections are omitted or marked unverified.

Main entry points: [`src/components/Dashboard.jsx`](https://github.com/pmj01/prepit/blob/main/src/components/Dashboard.jsx) (Dashboard shell), [`backend-php/db_connect.php`](https://github.com/pmj01/prepit/blob/main/backend-php/db_connect.php) (Database connection), [`src/App.jsx`](https://github.com/pmj01/prepit/blob/main/src/App.jsx) (App routing), [`src/components/Login.jsx`](https://github.com/pmj01/prepit/blob/main/src/components/Login.jsx) (Sign-in)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_app["App routing<br/>[App.jsx]"]
  node_login["Sign-in<br/>[Login.jsx]"]
  node_dashboard["Dashboard shell<br/>[Dashboard.jsx]"]
  node_theme["Theme toggle<br/>[ThemeToggle.jsx]"]
  node_particles["Particle background"]
end

subgraph group_preparation["Preparation tools"]
  node_practice["Practice bank<br/>[Dashboard.jsx]"]
  node_company["Company plans<br/>[Dashboard.jsx]"]
  node_tests["Mock tests<br/>[Dashboard.jsx]"]
  node_career["Career tools<br/>[Dashboard.jsx]"]
end

subgraph group_php["PHP services"]
  node_php_login["Login endpoint<br/>[login.php]"]
  node_signup["Signup endpoint<br/>[signup.php]"]
  node_auth["Auth middleware"]
  node_notes["Notes endpoint<br/>[get_notes.php]"]
  node_questions["Question endpoint"]
  node_seeder["Question seeder"]
  node_dbconn["Database connection<br/>[db_connect.php]"]
  node_database[("MySQL database<br/>[schema.sql]")]
end

subgraph group_java["Java services"]
  node_java_filter["Auth filter<br/>[AuthFilter.java]"]
  node_java_problems["Coding problems"]
end

node_student(("Student"))

node_student -->|"opens"| node_app
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_dashboard
node_app -->|"renders"| node_particles
node_dashboard -->|"renders"| node_theme
node_login -->|"posts credentials"| node_php_login
node_login -->|"posts registration"| node_signup
node_php_login -->|"connects through"| node_dbconn
node_signup -->|"connects through"| node_dbconn
node_auth -->|"connects through"| node_dbconn
node_notes -->|"requires"| node_auth
node_questions -->|"connects through"| node_dbconn
node_seeder -->|"connects through"| node_dbconn
node_dbconn -.->|"accesses"| node_database
node_dashboard -->|"presents"| node_practice
node_dashboard -->|"presents"| node_company
node_dashboard -->|"presents"| node_tests
node_dashboard -->|"presents"| node_career

click node_app "https://github.com/pmj01/prepit/blob/main/src/App.jsx"
click node_login "https://github.com/pmj01/prepit/blob/main/src/components/Login.jsx"
click node_dashboard "https://github.com/pmj01/prepit/blob/main/src/components/Dashboard.jsx"
click node_practice "https://github.com/pmj01/prepit/blob/main/src/components/Dashboard.jsx"
click node_company "https://github.com/pmj01/prepit/blob/main/src/components/Dashboard.jsx"
click node_tests "https://github.com/pmj01/prepit/blob/main/src/components/Dashboard.jsx"
click node_career "https://github.com/pmj01/prepit/blob/main/src/components/Dashboard.jsx"
click node_theme "https://github.com/pmj01/prepit/blob/main/src/components/ThemeToggle.jsx"
click node_particles "https://github.com/pmj01/prepit/blob/main/src/components/ParticlesBackground.jsx"
click node_php_login "https://github.com/pmj01/prepit/blob/main/backend-php/login.php"
click node_signup "https://github.com/pmj01/prepit/blob/main/backend-php/signup.php"
click node_auth "https://github.com/pmj01/prepit/blob/main/backend-php/auth_middleware.php"
click node_notes "https://github.com/pmj01/prepit/blob/main/backend-php/get_notes.php"
click node_questions "https://github.com/pmj01/prepit/blob/main/backend-php/get_practice_questions.php"
click node_seeder "https://github.com/pmj01/prepit/blob/main/backend-php/seed_practice_questions.php"
click node_dbconn "https://github.com/pmj01/prepit/blob/main/backend-php/db_connect.php"
click node_database "https://github.com/pmj01/prepit/blob/main/database/schema.sql"
click node_java_filter "https://github.com/pmj01/prepit/blob/main/backend-java/AuthFilter.java"
click node_java_problems "https://github.com/pmj01/prepit/blob/main/backend-java/CodingProblemsServlet.java"

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_app,node_login,node_dashboard,node_theme,node_particles toneBlue
class node_practice,node_company,node_tests,node_career toneAmber
class node_php_login,node_signup,node_auth,node_notes,node_questions,node_seeder,node_dbconn,node_database toneMint
class node_java_filter,node_java_problems toneRose
class node_student toneIndigo
```

## Components

### Web application

- [App routing](https://github.com/pmj01/prepit/blob/main/src/App.jsx): `src/App.jsx`
- [Sign-in](https://github.com/pmj01/prepit/blob/main/src/components/Login.jsx): `src/components/Login.jsx`
- [Dashboard shell](https://github.com/pmj01/prepit/blob/main/src/components/Dashboard.jsx): `src/components/Dashboard.jsx`
- [Theme toggle](https://github.com/pmj01/prepit/blob/main/src/components/ThemeToggle.jsx): `src/components/ThemeToggle.jsx`
- [Particle background](https://github.com/pmj01/prepit/blob/main/src/components/ParticlesBackground.jsx): `src/components/ParticlesBackground.jsx`

### Preparation tools

- [Practice bank](https://github.com/pmj01/prepit/blob/main/src/components/Dashboard.jsx): `src/components/Dashboard.jsx`
- [Company plans](https://github.com/pmj01/prepit/blob/main/src/components/Dashboard.jsx): `src/components/Dashboard.jsx`
- [Mock tests](https://github.com/pmj01/prepit/blob/main/src/components/Dashboard.jsx): `src/components/Dashboard.jsx`
- [Career tools](https://github.com/pmj01/prepit/blob/main/src/components/Dashboard.jsx): `src/components/Dashboard.jsx`

### PHP services

- [Login endpoint](https://github.com/pmj01/prepit/blob/main/backend-php/login.php): `backend-php/login.php`
- [Signup endpoint](https://github.com/pmj01/prepit/blob/main/backend-php/signup.php): `backend-php/signup.php`
- [Auth middleware](https://github.com/pmj01/prepit/blob/main/backend-php/auth_middleware.php): `backend-php/auth_middleware.php`
- [Notes endpoint](https://github.com/pmj01/prepit/blob/main/backend-php/get_notes.php): `backend-php/get_notes.php`
- [Question endpoint](https://github.com/pmj01/prepit/blob/main/backend-php/get_practice_questions.php): `backend-php/get_practice_questions.php`
- [Question seeder](https://github.com/pmj01/prepit/blob/main/backend-php/seed_practice_questions.php): `backend-php/seed_practice_questions.php`
- [Database connection](https://github.com/pmj01/prepit/blob/main/backend-php/db_connect.php): `backend-php/db_connect.php`
- [MySQL database](https://github.com/pmj01/prepit/blob/main/database/schema.sql): `database/schema.sql`

### Java services

- [Auth filter](https://github.com/pmj01/prepit/blob/main/backend-java/AuthFilter.java): `backend-java/AuthFilter.java`
- [Coding problems](https://github.com/pmj01/prepit/blob/main/backend-java/CodingProblemsServlet.java): `backend-java/CodingProblemsServlet.java`

### Other components

- **Student**

## Connections

- Student → App routing: opens (evidence: `src/App.jsx`)
- App routing → Sign-in: routes to (evidence: `src/App.jsx`)
- App routing → Dashboard shell: routes to (evidence: `src/App.jsx`)
- App routing → Particle background: renders (evidence: `src/App.jsx`)
- Dashboard shell → Theme toggle: renders (evidence: `src/components/Dashboard.jsx`)
- Sign-in → Login endpoint: posts credentials (evidence: `src/components/Login.jsx`)
- Sign-in → Signup endpoint: posts registration (evidence: `src/components/Login.jsx`)
- Login endpoint → Database connection: connects through (evidence: `backend-php/login.php`)
- Signup endpoint → Database connection: connects through (evidence: `backend-php/signup.php`)
- Auth middleware → Database connection: connects through (evidence: `backend-php/auth_middleware.php`)
- Notes endpoint → Auth middleware: requires (evidence: `backend-php/get_notes.php`)
- Question endpoint → Database connection: connects through (evidence: `backend-php/get_practice_questions.php`)
- Question seeder → Database connection: connects through (evidence: `backend-php/seed_practice_questions.php`)
- Database connection → MySQL database: accesses
- Dashboard shell → Practice bank: presents (evidence: `src/components/Dashboard.jsx`)
- Dashboard shell → Company plans: presents (evidence: `src/components/Dashboard.jsx`)
- Dashboard shell → Mock tests: presents (evidence: `src/components/Dashboard.jsx`)
- Dashboard shell → Career tools: presents (evidence: `src/components/Dashboard.jsx`)
