# zaevotic/katsikashell architecture

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

- Interactive diagram: https://gitdiagram.com/zaevotic/katsikashell
- Repository: https://github.com/zaevotic/katsikashell

## Overview

PrepClutch is a student exam-preparation platform: students find a course and its materials, then request AI topic predictions informed by course materials and professor style. Admins maintain course/persona data and upload papers; the backend stores and extracts material text, then generates ranked predictions. The README also describes target-based study plans and emergency revision, but their distinct implementation was not visible in the excerpts, so they are represented as documented capabilities within the app. Relationships reflect shown calls and README statements; unsampled frontend-to-backend wiring is documented rather than source-verified.

Main entry points: [`src/App.tsx`](https://github.com/zaevotic/katsikashell/blob/main/src/App.tsx) (Dashboard and Strategy), [`backend/routes/materials.js`](https://github.com/zaevotic/katsikashell/blob/main/backend/routes/materials.js) (Materials API), [`backend/server.js`](https://github.com/zaevotic/katsikashell/blob/main/backend/server.js) (HTTP Server), [`backend/routes/generate.js`](https://github.com/zaevotic/katsikashell/blob/main/backend/routes/generate.js) (Prediction Request)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Student and Admin App"]
  node_app["Dashboard and Strategy<br/>[App.tsx]"]
  node_landing["Landing and Access<br/>[LandingPage.tsx]"]
  node_course_admin["Course and Persona Setup<br/>[App.tsx]"]
  node_archive_ui["Course Materials View<br/>[App.tsx]"]
  node_prediction_ui["Prediction and Study Focus<br/>[App.tsx]"]
end

subgraph group_archive["Materials Archive"]
  node_materials_api["Materials API<br/>[materials.js]"]
  node_pdf_extract["PDF Text Extraction<br/>[materials.js]"]
end

subgraph group_analysis["Prediction Analysis"]
  node_server["HTTP Server<br/>[server.js]"]
  node_generate_api["Prediction Request<br/>[generate.js]"]
  node_ai_engine["Prediction Engine<br/>[aiEngine.js]"]
end

subgraph group_services["Persistence and Integrations"]
  node_frontend_firebase["Frontend Firebase Setup<br/>[firebase.ts]"]
  node_firestore_admin["Backend Firebase Setup<br/>[firebase.js]"]
  node_firestore[("Firestore")]
  node_cloudinary[("Cloudinary Storage")]
  node_gemini["Gemini API"]
end

node_student(("Student or Admin"))

node_student -->|"opens"| node_landing
node_student -->|"uses"| node_app
node_app -->|"renders"| node_landing
node_app -->|"manages"| node_course_admin
node_app -->|"shows"| node_archive_ui
node_app -->|"shows"| node_prediction_ui
node_course_admin -->|"writes"| node_frontend_firebase
node_archive_ui -->|"subscribes"| node_frontend_firebase
node_frontend_firebase -->|"connects"| node_firestore
node_app -.->|"requests analysis"| node_server
node_server -->|"routes"| node_materials_api
node_server -->|"routes"| node_generate_api
node_materials_api -->|"reads and writes"| node_firestore_admin
node_materials_api -->|"extracts text"| node_pdf_extract
node_materials_api -->|"uploads files"| node_cloudinary
node_generate_api -->|"loads course data"| node_firestore_admin
node_generate_api -->|"requests predictions"| node_ai_engine
node_ai_engine -->|"generates content"| node_gemini
node_firestore_admin -->|"connects"| node_firestore
node_prediction_ui -.->|"presents priorities"| node_student

click node_app "https://github.com/zaevotic/katsikashell/blob/main/src/App.tsx"
click node_landing "https://github.com/zaevotic/katsikashell/blob/main/src/pages/LandingPage.tsx"
click node_course_admin "https://github.com/zaevotic/katsikashell/blob/main/src/App.tsx"
click node_archive_ui "https://github.com/zaevotic/katsikashell/blob/main/src/App.tsx"
click node_prediction_ui "https://github.com/zaevotic/katsikashell/blob/main/src/App.tsx"
click node_server "https://github.com/zaevotic/katsikashell/blob/main/backend/server.js"
click node_materials_api "https://github.com/zaevotic/katsikashell/blob/main/backend/routes/materials.js"
click node_pdf_extract "https://github.com/zaevotic/katsikashell/blob/main/backend/routes/materials.js"
click node_generate_api "https://github.com/zaevotic/katsikashell/blob/main/backend/routes/generate.js"
click node_ai_engine "https://github.com/zaevotic/katsikashell/blob/main/backend/services/aiEngine.js"
click node_frontend_firebase "https://github.com/zaevotic/katsikashell/blob/main/src/firebase.ts"
click node_firestore_admin "https://github.com/zaevotic/katsikashell/blob/main/backend/config/firebase.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_app,node_landing,node_course_admin,node_archive_ui,node_prediction_ui toneBlue
class node_materials_api,node_pdf_extract toneAmber
class node_server,node_generate_api,node_ai_engine toneMint
class node_frontend_firebase,node_firestore_admin,node_firestore,node_cloudinary,node_gemini toneRose
class node_student toneIndigo
```

## Components

### Student and Admin App

- [Dashboard and Strategy](https://github.com/zaevotic/katsikashell/blob/main/src/App.tsx): `src/App.tsx`
- [Landing and Access](https://github.com/zaevotic/katsikashell/blob/main/src/pages/LandingPage.tsx): `src/pages/LandingPage.tsx`
- [Course and Persona Setup](https://github.com/zaevotic/katsikashell/blob/main/src/App.tsx): `src/App.tsx`
- [Course Materials View](https://github.com/zaevotic/katsikashell/blob/main/src/App.tsx): `src/App.tsx`
- [Prediction and Study Focus](https://github.com/zaevotic/katsikashell/blob/main/src/App.tsx): `src/App.tsx`

### Materials Archive

- [Materials API](https://github.com/zaevotic/katsikashell/blob/main/backend/routes/materials.js): `backend/routes/materials.js`
- [PDF Text Extraction](https://github.com/zaevotic/katsikashell/blob/main/backend/routes/materials.js): `backend/routes/materials.js`

### Prediction Analysis

- [HTTP Server](https://github.com/zaevotic/katsikashell/blob/main/backend/server.js): `backend/server.js`
- [Prediction Request](https://github.com/zaevotic/katsikashell/blob/main/backend/routes/generate.js): `backend/routes/generate.js`
- [Prediction Engine](https://github.com/zaevotic/katsikashell/blob/main/backend/services/aiEngine.js): `backend/services/aiEngine.js`

### Persistence and Integrations

- [Frontend Firebase Setup](https://github.com/zaevotic/katsikashell/blob/main/src/firebase.ts): `src/firebase.ts`
- [Backend Firebase Setup](https://github.com/zaevotic/katsikashell/blob/main/backend/config/firebase.js): `backend/config/firebase.js`
- **Firestore**
- **Cloudinary Storage**
- **Gemini API**

### Other components

- **Student or Admin**

## Connections

- Student or Admin → Landing and Access: opens (evidence: `src/pages/LandingPage.tsx`)
- Student or Admin → Dashboard and Strategy: uses (evidence: `README.md`)
- Dashboard and Strategy → Landing and Access: renders (evidence: `src/App.tsx`)
- Dashboard and Strategy → Course and Persona Setup: manages (evidence: `src/App.tsx`)
- Dashboard and Strategy → Course Materials View: shows (evidence: `src/App.tsx`)
- Dashboard and Strategy → Prediction and Study Focus: shows (evidence: `README.md`)
- Course and Persona Setup → Frontend Firebase Setup: writes (evidence: `src/App.tsx`)
- Course Materials View → Frontend Firebase Setup: subscribes (evidence: `src/App.tsx`)
- Frontend Firebase Setup → Firestore: connects (evidence: `src/firebase.ts`)
- Dashboard and Strategy → HTTP Server: requests analysis (evidence: `README.md`)
- HTTP Server → Materials API: routes (evidence: `backend/server.js`)
- HTTP Server → Prediction Request: routes (evidence: `backend/server.js`)
- Materials API → Backend Firebase Setup: reads and writes (evidence: `backend/routes/materials.js`)
- Materials API → PDF Text Extraction: extracts text (evidence: `backend/routes/materials.js`)
- Materials API → Cloudinary Storage: uploads files (evidence: `backend/routes/materials.js`)
- Prediction Request → Backend Firebase Setup: loads course data (evidence: `backend/routes/generate.js`)
- Prediction Request → Prediction Engine: requests predictions (evidence: `backend/routes/generate.js`)
- Prediction Engine → Gemini API: generates content (evidence: `backend/services/aiEngine.js`)
- Backend Firebase Setup → Firestore: connects (evidence: `backend/config/firebase.js`)
- Prediction and Study Focus → Student or Admin: presents priorities (evidence: `README.md`)
