# gayatrichirmade24/campusskillshare architecture

> Architecture diagram of the GitHub repository gayatrichirmade24/campusskillshare, 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/gayatrichirmade24/campusskillshare
- Repository: https://github.com/gayatrichirmade24/campusskillshare

## Overview

Campus SkillShare is a college-focused platform for discovering peers with complementary skills. Students sign in, edit a skill-first profile, browse ranked candidates, and pass or connect; the API creates a match only for reciprocal likes. Matched users can then exchange messages. The graph reflects the sampled API and browser code; the README describes JSON persistence, while the sampled database module configures SQLAlchemy from DATABASE_URL, so the backing store is shown generically.

Main entry points: [`main.py`](https://github.com/gayatrichirmade24/campusskillshare/blob/main/main.py) (FastAPI routes), [`auth.py`](https://github.com/gayatrichirmade24/campusskillshare/blob/main/auth.py) (Token and password auth), [`public/index.html`](https://github.com/gayatrichirmade24/campusskillshare/blob/main/public/index.html) (Web UI), [`database.py`](https://github.com/gayatrichirmade24/campusskillshare/blob/main/database.py) (Database sessions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Browser experience"]
  node_web_ui["Web UI<br/>[index.html]"]
  node_browser_logic["Browser interactions<br/>[app.js]"]
end

subgraph group_api["API workflows"]
  node_auth_flow["Sign-in and signup<br/>[main.py]"]
  node_profile_flow["Profile editing<br/>[main.py]"]
  node_discovery["Ranked discovery<br/>[main.py]"]
  node_swipes["Swipe and matching<br/>[main.py]"]
  node_match_list["Match inbox<br/>[main.py]"]
  node_messaging["Matched chat<br/>[main.py]"]
  node_api_routes["FastAPI routes<br/>[main.py]"]
end

subgraph group_identity["Identity and contracts"]
  node_auth["Token and password auth<br/>[auth.py]"]
  node_request_schemas["Request validation<br/>[schemas.py]"]
end

subgraph group_persistence["Persistence"]
  node_orm_models["User and activity models<br/>[models.py]"]
  node_db_session["Database sessions<br/>[database.py]"]
  node_sql_store[("Configured database")]
end

node_student(("Student"))

node_student -->|"uses"| node_web_ui
node_web_ui -->|"loads"| node_browser_logic
node_browser_logic -->|"calls REST"| node_api_routes
node_api_routes -->|"serves static"| node_web_ui
node_api_routes -->|"routes"| node_auth_flow
node_api_routes -->|"routes"| node_profile_flow
node_api_routes -->|"routes"| node_discovery
node_api_routes -->|"routes"| node_swipes
node_api_routes -->|"routes"| node_match_list
node_api_routes -->|"routes"| node_messaging
node_api_routes -->|"uses auth"| node_auth
node_auth -->|"gets session"| node_db_session
node_auth -->|"loads user"| node_orm_models
node_api_routes -->|"validates input"| node_request_schemas
node_api_routes -->|"queries and updates"| node_orm_models
node_api_routes -->|"gets session"| node_db_session
node_db_session -->|"connects"| node_sql_store

click node_web_ui "https://github.com/gayatrichirmade24/campusskillshare/blob/main/public/index.html"
click node_browser_logic "https://github.com/gayatrichirmade24/campusskillshare/blob/main/public/app.js"
click node_auth_flow "https://github.com/gayatrichirmade24/campusskillshare/blob/main/main.py"
click node_profile_flow "https://github.com/gayatrichirmade24/campusskillshare/blob/main/main.py"
click node_discovery "https://github.com/gayatrichirmade24/campusskillshare/blob/main/main.py"
click node_swipes "https://github.com/gayatrichirmade24/campusskillshare/blob/main/main.py"
click node_match_list "https://github.com/gayatrichirmade24/campusskillshare/blob/main/main.py"
click node_messaging "https://github.com/gayatrichirmade24/campusskillshare/blob/main/main.py"
click node_api_routes "https://github.com/gayatrichirmade24/campusskillshare/blob/main/main.py"
click node_auth "https://github.com/gayatrichirmade24/campusskillshare/blob/main/auth.py"
click node_request_schemas "https://github.com/gayatrichirmade24/campusskillshare/blob/main/schemas.py"
click node_orm_models "https://github.com/gayatrichirmade24/campusskillshare/blob/main/models.py"
click node_db_session "https://github.com/gayatrichirmade24/campusskillshare/blob/main/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_web_ui,node_browser_logic toneBlue
class node_auth_flow,node_profile_flow,node_discovery,node_swipes,node_match_list,node_messaging,node_api_routes toneAmber
class node_auth,node_request_schemas toneMint
class node_orm_models,node_db_session,node_sql_store toneRose
class node_student toneIndigo
```

## Components

### Browser experience

- [Web UI](https://github.com/gayatrichirmade24/campusskillshare/blob/main/public/index.html): `public/index.html`
- [Browser interactions](https://github.com/gayatrichirmade24/campusskillshare/blob/main/public/app.js): `public/app.js`

### API workflows

- [Sign-in and signup](https://github.com/gayatrichirmade24/campusskillshare/blob/main/main.py): `main.py`
- [Profile editing](https://github.com/gayatrichirmade24/campusskillshare/blob/main/main.py): `main.py`
- [Ranked discovery](https://github.com/gayatrichirmade24/campusskillshare/blob/main/main.py): `main.py`
- [Swipe and matching](https://github.com/gayatrichirmade24/campusskillshare/blob/main/main.py): `main.py`
- [Match inbox](https://github.com/gayatrichirmade24/campusskillshare/blob/main/main.py): `main.py`
- [Matched chat](https://github.com/gayatrichirmade24/campusskillshare/blob/main/main.py): `main.py`
- [FastAPI routes](https://github.com/gayatrichirmade24/campusskillshare/blob/main/main.py): `main.py`

### Identity and contracts

- [Token and password auth](https://github.com/gayatrichirmade24/campusskillshare/blob/main/auth.py): `auth.py`
- [Request validation](https://github.com/gayatrichirmade24/campusskillshare/blob/main/schemas.py): `schemas.py`

### Persistence

- [User and activity models](https://github.com/gayatrichirmade24/campusskillshare/blob/main/models.py): `models.py`
- [Database sessions](https://github.com/gayatrichirmade24/campusskillshare/blob/main/database.py): `database.py`
- **Configured database**

### Other components

- **Student**

## Connections

- Student → Web UI: uses (evidence: `README.md`)
- Web UI → Browser interactions: loads (evidence: `README.md`)
- Browser interactions → FastAPI routes: calls REST (evidence: `public/app.js`)
- FastAPI routes → Web UI: serves static (evidence: `main.py`)
- FastAPI routes → Sign-in and signup: routes (evidence: `main.py`)
- FastAPI routes → Profile editing: routes (evidence: `main.py`)
- FastAPI routes → Ranked discovery: routes (evidence: `main.py`)
- FastAPI routes → Swipe and matching: routes (evidence: `main.py`)
- FastAPI routes → Match inbox: routes (evidence: `main.py`)
- FastAPI routes → Matched chat: routes (evidence: `main.py`)
- FastAPI routes → Token and password auth: uses auth (evidence: `main.py`)
- Token and password auth → Database sessions: gets session (evidence: `auth.py`)
- Token and password auth → User and activity models: loads user (evidence: `auth.py`)
- FastAPI routes → Request validation: validates input (evidence: `main.py`)
- FastAPI routes → User and activity models: queries and updates (evidence: `main.py`)
- FastAPI routes → Database sessions: gets session (evidence: `main.py`)
- Database sessions → Configured database: connects (evidence: `database.py`)
