# ritesh3280/bitcamp25 architecture

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

- Interactive diagram: https://gitdiagram.com/ritesh3280/bitcamp25
- Repository: https://github.com/ritesh3280/bitcamp25

## Overview

ForensicAI analyzes live camera feeds and uploaded video, detects objects, selects and summarizes keyframes, and presents findings for forensic review. Its React interface exposes live analysis, session/frame browsing and chat, anomaly review, and a timeline; the frontend API communicates with the Flask backend. The excerpts show the backend entry point, processing components, and some frontend routes and API use. Other page-to-backend connections and the semantic-search implementation are not fully shown, so those relationships are omitted rather than inferred.

Main entry points: [`frontend/src/routes/index.jsx`](https://github.com/ritesh3280/bitcamp25/blob/main/frontend/src/routes/index.jsx) (Page routing), [`backend/frames/main4.py`](https://github.com/ritesh3280/bitcamp25/blob/main/backend/frames/main4.py) (Video processor), [`backend/frames/main.py`](https://github.com/ritesh3280/bitcamp25/blob/main/backend/frames/main.py) (API server), [`frontend/src/services/api.js`](https://github.com/ritesh3280/bitcamp25/blob/main/frontend/src/services/api.js) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_backend["Video analysis backend"]
  node_flask["API server<br/>[main.py]"]
  node_sessions[("Session artifacts")]
  node_vector["Vector search<br/>[pinecone_utils.py]"]
end

subgraph group_capture["Capture and processing"]
  node_processor["Video processor<br/>[main4.py]"]
  node_detection["Object detection<br/>[main4.py]"]
  node_keyframes["Keyframe selection<br/>[main4.py]"]
  node_summaries["LLM summaries<br/>[main4.py]"]
end

subgraph group_frontend["Frontend application"]
  node_app["React app<br/>[App.jsx]"]
  node_routes["Page routing<br/>[index.jsx]"]
  node_layout["Dashboard layout<br/>[MainLayout.jsx]"]
  node_api["API client<br/>[api.js]"]
end

subgraph group_review["Forensic review"]
  node_live["Live analysis<br/>[LiveAnalysis.jsx]"]
  node_frames["Frame explorer<br/>[VideoFrames.jsx]"]
  node_timeline["Forensic timeline<br/>[Timeline.jsx]"]
  node_anomalies["Anomaly review<br/>[Anomalies.jsx]"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_settings["Settings<br/>[Settings.jsx]"]
end

node_analyst(("Investigator"))
node_footage(("Camera or video"))

node_analyst -->|"uses"| node_app
node_app -->|"renders routes"| node_routes
node_routes -->|"wraps dashboard"| node_layout
node_routes -->|"routes to"| node_live
node_routes -->|"routes to"| node_frames
node_routes -->|"routes to"| node_timeline
node_routes -->|"routes to"| node_anomalies
node_routes -->|"routes to"| node_dashboard
node_routes -->|"routes to"| node_settings
node_layout -->|"hosts page"| node_live
node_live -->|"requests data"| node_api
node_frames -->|"requests frames"| node_api
node_api -->|"calls API"| node_flask
node_analyst -->|"provides"| node_footage
node_footage -->|"processed by"| node_processor
node_flask -->|"dispatches processing"| node_processor
node_processor -->|"detects objects"| node_detection
node_processor -->|"selects frames"| node_keyframes
node_processor -->|"summarizes frames"| node_summaries
node_flask -->|"reads session data"| node_sessions
node_processor -->|"writes keyframes"| node_sessions
node_flask -->|"uses helper"| node_vector

click node_flask "https://github.com/ritesh3280/bitcamp25/blob/main/backend/frames/main.py"
click node_processor "https://github.com/ritesh3280/bitcamp25/blob/main/backend/frames/main4.py"
click node_detection "https://github.com/ritesh3280/bitcamp25/blob/main/backend/frames/main4.py"
click node_keyframes "https://github.com/ritesh3280/bitcamp25/blob/main/backend/frames/main4.py"
click node_summaries "https://github.com/ritesh3280/bitcamp25/blob/main/backend/frames/main4.py"
click node_sessions "https://github.com/ritesh3280/bitcamp25/tree/main/backend/frames/video_insights"
click node_vector "https://github.com/ritesh3280/bitcamp25/blob/main/backend/frames/pinecone_utils.py"
click node_app "https://github.com/ritesh3280/bitcamp25/blob/main/frontend/src/App.jsx"
click node_routes "https://github.com/ritesh3280/bitcamp25/blob/main/frontend/src/routes/index.jsx"
click node_layout "https://github.com/ritesh3280/bitcamp25/blob/main/frontend/src/layouts/MainLayout.jsx"
click node_live "https://github.com/ritesh3280/bitcamp25/blob/main/frontend/src/pages/LiveAnalysis.jsx"
click node_frames "https://github.com/ritesh3280/bitcamp25/blob/main/frontend/src/pages/VideoFrames.jsx"
click node_timeline "https://github.com/ritesh3280/bitcamp25/blob/main/frontend/src/pages/Timeline.jsx"
click node_anomalies "https://github.com/ritesh3280/bitcamp25/blob/main/frontend/src/pages/Anomalies.jsx"
click node_dashboard "https://github.com/ritesh3280/bitcamp25/blob/main/frontend/src/pages/Dashboard.jsx"
click node_settings "https://github.com/ritesh3280/bitcamp25/blob/main/frontend/src/pages/Settings.jsx"
click node_api "https://github.com/ritesh3280/bitcamp25/blob/main/frontend/src/services/api.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_flask,node_sessions,node_vector toneBlue
class node_processor,node_detection,node_keyframes,node_summaries toneAmber
class node_app,node_routes,node_layout,node_api toneMint
class node_live,node_frames,node_timeline,node_anomalies,node_dashboard,node_settings toneRose
class node_analyst,node_footage toneIndigo
```

## Components

### Video analysis backend

- [API server](https://github.com/ritesh3280/bitcamp25/blob/main/backend/frames/main.py): `backend/frames/main.py`
- [Session artifacts](https://github.com/ritesh3280/bitcamp25/tree/main/backend/frames/video_insights): `backend/frames/video_insights`
- [Vector search](https://github.com/ritesh3280/bitcamp25/blob/main/backend/frames/pinecone_utils.py): `backend/frames/pinecone_utils.py`

### Capture and processing

- [Video processor](https://github.com/ritesh3280/bitcamp25/blob/main/backend/frames/main4.py): `backend/frames/main4.py`
- [Object detection](https://github.com/ritesh3280/bitcamp25/blob/main/backend/frames/main4.py): `backend/frames/main4.py`
- [Keyframe selection](https://github.com/ritesh3280/bitcamp25/blob/main/backend/frames/main4.py): `backend/frames/main4.py`
- [LLM summaries](https://github.com/ritesh3280/bitcamp25/blob/main/backend/frames/main4.py): `backend/frames/main4.py`

### Frontend application

- [React app](https://github.com/ritesh3280/bitcamp25/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Page routing](https://github.com/ritesh3280/bitcamp25/blob/main/frontend/src/routes/index.jsx): `frontend/src/routes/index.jsx`
- [Dashboard layout](https://github.com/ritesh3280/bitcamp25/blob/main/frontend/src/layouts/MainLayout.jsx): `frontend/src/layouts/MainLayout.jsx`
- [API client](https://github.com/ritesh3280/bitcamp25/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`

### Forensic review

- [Live analysis](https://github.com/ritesh3280/bitcamp25/blob/main/frontend/src/pages/LiveAnalysis.jsx): `frontend/src/pages/LiveAnalysis.jsx`
- [Frame explorer](https://github.com/ritesh3280/bitcamp25/blob/main/frontend/src/pages/VideoFrames.jsx): `frontend/src/pages/VideoFrames.jsx`
- [Forensic timeline](https://github.com/ritesh3280/bitcamp25/blob/main/frontend/src/pages/Timeline.jsx): `frontend/src/pages/Timeline.jsx`
- [Anomaly review](https://github.com/ritesh3280/bitcamp25/blob/main/frontend/src/pages/Anomalies.jsx): `frontend/src/pages/Anomalies.jsx`
- [Dashboard](https://github.com/ritesh3280/bitcamp25/blob/main/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`
- [Settings](https://github.com/ritesh3280/bitcamp25/blob/main/frontend/src/pages/Settings.jsx): `frontend/src/pages/Settings.jsx`

### Other components

- **Investigator**
- **Camera or video**

## Connections

- Investigator → React app: uses
- React app → Page routing: renders routes (evidence: `frontend/src/App.jsx`)
- Page routing → Dashboard layout: wraps dashboard (evidence: `frontend/src/routes/index.jsx`)
- Page routing → Live analysis: routes to (evidence: `frontend/src/routes/index.jsx`)
- Page routing → Frame explorer: routes to (evidence: `frontend/src/routes/index.jsx`)
- Page routing → Forensic timeline: routes to (evidence: `frontend/src/routes/index.jsx`)
- Page routing → Anomaly review: routes to (evidence: `frontend/src/routes/index.jsx`)
- Page routing → Dashboard: routes to (evidence: `frontend/src/routes/index.jsx`)
- Page routing → Settings: routes to (evidence: `frontend/src/routes/index.jsx`)
- Dashboard layout → Live analysis: hosts page (evidence: `frontend/src/routes/index.jsx`)
- Live analysis → API client: requests data (evidence: `frontend/src/pages/LiveAnalysis.jsx`)
- Frame explorer → API client: requests frames (evidence: `frontend/src/pages/VideoFrames.jsx`)
- API client → API server: calls API (evidence: `README.md`)
- Investigator → Camera or video: provides (evidence: `README.md`)
- Camera or video → Video processor: processed by (evidence: `README.md`)
- API server → Video processor: dispatches processing (evidence: `backend/frames/main.py`)
- Video processor → Object detection: detects objects (evidence: `README.md`)
- Video processor → Keyframe selection: selects frames (evidence: `backend/frames/main4.py`)
- Video processor → LLM summaries: summarizes frames (evidence: `backend/frames/main4.py`)
- API server → Session artifacts: reads session data (evidence: `backend/frames/main.py`)
- Video processor → Session artifacts: writes keyframes (evidence: `backend/frames/main4.py`)
- API server → Vector search: uses helper (evidence: `backend/frames/main.py`)
