# owjash/campus-study-group-finder architecture

> Architecture diagram of the GitHub repository owjash/campus-study-group-finder, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/owjash/campus-study-group-finder
- Repository: https://github.com/owjash/campus-study-group-finder

## Overview

Campus Study Group Finder is a React frontend backed by FastAPI and SQLite. A student registers or logs in, then searches the loaded groups by course/topic, optionally filters to joined groups, creates a group, or joins/leaves one; membership updates reload the list. Authentication uses hashed passwords and expiring bearer-token sessions, with logout invalidation. The sampled sources show the frontend component calls and backend database access; README documents the HTTP boundary and key capabilities. Search filtering runs in the frontend; no dedicated search endpoint is shown.

Main entry points: [`backend/main.py`](https://github.com/owjash/campus-study-group-finder/blob/main/backend/main.py) (FastAPI routes), [`frontend/src/App.jsx`](https://github.com/owjash/campus-study-group-finder/blob/main/frontend/src/App.jsx) (App and group search), [`frontend/src/GroupMembership.jsx`](https://github.com/owjash/campus-study-group-finder/blob/main/frontend/src/GroupMembership.jsx) (Membership controls), [`backend/database.py`](https://github.com/owjash/campus-study-group-finder/blob/main/backend/database.py) (SQLite data store)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Student interface"]
  node_app["App and group search<br/>[App.jsx]"]
  node_register_form["Registration form<br/>[Register.jsx]"]
  node_login_form["Login form<br/>[Login.jsx]"]
  node_group_form["Create group form<br/>[CreateSession.jsx]"]
  node_membership_controls["Membership controls"]
end

subgraph group_identity["Identity and access"]
  node_api["FastAPI routes<br/>[main.py]"]
  node_auth["Authentication and tokens<br/>[main.py]"]
end

subgraph group_groups_domain["Study groups"]
  node_session_ops["Group and membership operations<br/>[main.py]"]
end

subgraph group_persistence["SQLite persistence"]
  node_sqlite[("SQLite data store<br/>[database.py]")]
end

node_student(("Student"))

node_student -->|"uses"| node_app
node_app -->|"renders"| node_register_form
node_app -->|"renders"| node_login_form
node_app -->|"renders"| node_group_form
node_app -->|"renders"| node_membership_controls
node_register_form -->|"registers via HTTP"| node_api
node_login_form -->|"logs in via HTTP"| node_api
node_app -->|"loads groups"| node_api
node_app -->|"logs out via HTTP"| node_api
node_group_form -->|"creates via HTTP"| node_api
node_membership_controls -->|"joins or leaves"| node_api
node_membership_controls -->|"reloads groups"| node_api
node_api -->|"routes auth requests"| node_auth
node_api -->|"routes group requests"| node_session_ops
node_auth -->|"reads and writes"| node_sqlite
node_session_ops -->|"reads and writes"| node_sqlite
node_api -->|"initializes schema"| node_sqlite

click node_app "https://github.com/owjash/campus-study-group-finder/blob/main/frontend/src/App.jsx"
click node_register_form "https://github.com/owjash/campus-study-group-finder/blob/main/frontend/src/Register.jsx"
click node_login_form "https://github.com/owjash/campus-study-group-finder/blob/main/frontend/src/Login.jsx"
click node_group_form "https://github.com/owjash/campus-study-group-finder/blob/main/frontend/src/CreateSession.jsx"
click node_membership_controls "https://github.com/owjash/campus-study-group-finder/blob/main/frontend/src/GroupMembership.jsx"
click node_api "https://github.com/owjash/campus-study-group-finder/blob/main/backend/main.py"
click node_auth "https://github.com/owjash/campus-study-group-finder/blob/main/backend/main.py"
click node_session_ops "https://github.com/owjash/campus-study-group-finder/blob/main/backend/main.py"
click node_sqlite "https://github.com/owjash/campus-study-group-finder/blob/main/backend/database.py"

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_register_form,node_login_form,node_group_form,node_membership_controls toneBlue
class node_api,node_auth toneAmber
class node_session_ops toneMint
class node_sqlite toneRose
class node_student toneIndigo
```

## Components

### Student interface

- [App and group search](https://github.com/owjash/campus-study-group-finder/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Registration form](https://github.com/owjash/campus-study-group-finder/blob/main/frontend/src/Register.jsx): `frontend/src/Register.jsx`
- [Login form](https://github.com/owjash/campus-study-group-finder/blob/main/frontend/src/Login.jsx): `frontend/src/Login.jsx`
- [Create group form](https://github.com/owjash/campus-study-group-finder/blob/main/frontend/src/CreateSession.jsx): `frontend/src/CreateSession.jsx`
- [Membership controls](https://github.com/owjash/campus-study-group-finder/blob/main/frontend/src/GroupMembership.jsx): `frontend/src/GroupMembership.jsx`

### Identity and access

- [FastAPI routes](https://github.com/owjash/campus-study-group-finder/blob/main/backend/main.py): `backend/main.py`
- [Authentication and tokens](https://github.com/owjash/campus-study-group-finder/blob/main/backend/main.py): `backend/main.py`

### Study groups

- [Group and membership operations](https://github.com/owjash/campus-study-group-finder/blob/main/backend/main.py): `backend/main.py`

### SQLite persistence

- [SQLite data store](https://github.com/owjash/campus-study-group-finder/blob/main/backend/database.py): `backend/database.py`

### Other components

- **Student**

## Connections

- Student → App and group search: uses (evidence: `README.md`)
- App and group search → Registration form: renders (evidence: `frontend/src/App.jsx`)
- App and group search → Login form: renders (evidence: `frontend/src/App.jsx`)
- App and group search → Create group form: renders (evidence: `frontend/src/App.jsx`)
- App and group search → Membership controls: renders (evidence: `frontend/src/App.jsx`)
- Registration form → FastAPI routes: registers via HTTP (evidence: `frontend/src/Register.jsx`)
- Login form → FastAPI routes: logs in via HTTP (evidence: `frontend/src/Login.jsx`)
- App and group search → FastAPI routes: loads groups (evidence: `frontend/src/App.jsx`)
- App and group search → FastAPI routes: logs out via HTTP (evidence: `frontend/src/App.jsx`)
- Create group form → FastAPI routes: creates via HTTP (evidence: `frontend/src/CreateSession.jsx`)
- Membership controls → FastAPI routes: joins or leaves (evidence: `frontend/src/GroupMembership.jsx`)
- Membership controls → FastAPI routes: reloads groups (evidence: `frontend/src/GroupMembership.jsx`)
- FastAPI routes → Authentication and tokens: routes auth requests (evidence: `backend/main.py`)
- FastAPI routes → Group and membership operations: routes group requests (evidence: `backend/main.py`)
- Authentication and tokens → SQLite data store: reads and writes (evidence: `backend/main.py`)
- Group and membership operations → SQLite data store: reads and writes (evidence: `backend/main.py`)
- FastAPI routes → SQLite data store: initializes schema (evidence: `backend/main.py`)
