# richarrrd53/1141_se_project architecture

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

- Interactive diagram: https://gitdiagram.com/richarrrd53/1141_se_project
- Repository: https://github.com/richarrrd53/1141_se_project

## Overview

This is a FastAPI freelance-project marketplace: clients post projects, freelancers browse and bid, clients select a freelancer, and work proceeds through delivery, issue resolution, and review. The main application coordinates the HTTP workflow and delegates persistence to domain models; templates and browser scripts provide the UI. The source excerpts show some route-to-model calls, but not all route implementations or frontend wiring, so the graph omits unverified links rather than assuming them.

Main entry points: [`main.py`](https://github.com/richarrrd53/1141_se_project/blob/main/main.py) (HTTP application), [`model/posts.py`](https://github.com/richarrrd53/1141_se_project/blob/main/model/posts.py) (Project listings), [`model/db.py`](https://github.com/richarrrd53/1141_se_project/blob/main/model/db.py) (Database connection pool), [`model/bids.py`](https://github.com/richarrrd53/1141_se_project/blob/main/model/bids.py) (Bids and selection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_app["HTTP application<br/>[main.py]"]
  node_browser["Browser interface<br/>[home.js]"]
  node_login["Login interface<br/>[login.js]"]
  node_templates["Page templates"]
end

subgraph group_market["Project marketplace"]
  node_projects["Project listings<br/>[posts.py]"]
  node_bids["Bids and selection<br/>[bids.py]"]
  node_users["User accounts<br/>[users.py]"]
  node_user_query["User lookup routes<br/>[dbQuery.py]"]
  node_security["Password security<br/>[security.py]"]
end

subgraph group_work["Work lifecycle"]
  node_issues["Issue discussion<br/>[issues.py]"]
  node_deliveries["Delivery versions<br/>[deliveries.py]"]
  node_reviews["Project reviews<br/>[reviews.py]"]
  node_notifications["Notifications<br/>[notifications.py]"]
  node_upload["Chunked uploads<br/>[upload.py]"]
end

subgraph group_data["Persistence"]
  node_db_access["Database connection pool<br/>[db.py]"]
  node_postgres[("PostgreSQL")]
end

node_client(("Client / freelancer"))

node_client -.->|"uses routes"| node_app
node_browser -.->|"requests pages"| node_app
node_login -.->|"submits login"| node_app
node_app -->|"renders page"| node_templates
node_app -->|"manages projects"| node_projects
node_app -->|"looks up users"| node_users
node_app -->|"reads bid details"| node_bids
node_app -->|"creates notifications"| node_notifications
node_app -->|"reads issues"| node_issues
node_app -.->|"handles reviews"| node_reviews
node_app -.->|"handles deliveries"| node_deliveries
node_app -.->|"routes uploads"| node_upload
node_app -.->|"registers routes"| node_user_query
node_app -.->|"checks passwords"| node_security
node_app -.->|"gets connections"| node_db_access
node_user_query -->|"gets connections"| node_db_access
node_upload -->|"uses project model"| node_projects
node_projects -->|"reads and writes"| node_postgres
node_bids -->|"reads and writes"| node_postgres
node_issues -->|"reads and writes"| node_postgres
node_deliveries -->|"reads and writes"| node_postgres
node_reviews -->|"reads and writes"| node_postgres
node_notifications -->|"reads and writes"| node_postgres
node_db_access -->|"opens connections"| node_postgres

click node_app "https://github.com/richarrrd53/1141_se_project/blob/main/main.py"
click node_browser "https://github.com/richarrrd53/1141_se_project/blob/main/html/js/home.js"
click node_login "https://github.com/richarrrd53/1141_se_project/blob/main/html/js/login.js"
click node_templates "https://github.com/richarrrd53/1141_se_project/tree/main/templates"
click node_projects "https://github.com/richarrrd53/1141_se_project/blob/main/model/posts.py"
click node_bids "https://github.com/richarrrd53/1141_se_project/blob/main/model/bids.py"
click node_users "https://github.com/richarrrd53/1141_se_project/blob/main/model/users.py"
click node_issues "https://github.com/richarrrd53/1141_se_project/blob/main/model/issues.py"
click node_deliveries "https://github.com/richarrrd53/1141_se_project/blob/main/model/deliveries.py"
click node_reviews "https://github.com/richarrrd53/1141_se_project/blob/main/model/reviews.py"
click node_notifications "https://github.com/richarrrd53/1141_se_project/blob/main/model/notifications.py"
click node_upload "https://github.com/richarrrd53/1141_se_project/blob/main/routes/upload.py"
click node_user_query "https://github.com/richarrrd53/1141_se_project/blob/main/routes/dbQuery.py"
click node_security "https://github.com/richarrrd53/1141_se_project/blob/main/security.py"
click node_db_access "https://github.com/richarrrd53/1141_se_project/blob/main/model/db.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_browser,node_login,node_templates,node_client toneBlue
class node_projects,node_bids,node_users,node_user_query,node_security toneAmber
class node_issues,node_deliveries,node_reviews,node_notifications,node_upload toneMint
class node_db_access,node_postgres toneRose
```

## Components

### Web application

- [HTTP application](https://github.com/richarrrd53/1141_se_project/blob/main/main.py): `main.py`
- [Browser interface](https://github.com/richarrrd53/1141_se_project/blob/main/html/js/home.js): `html/js/home.js`
- [Login interface](https://github.com/richarrrd53/1141_se_project/blob/main/html/js/login.js): `html/js/login.js`
- [Page templates](https://github.com/richarrrd53/1141_se_project/tree/main/templates): `templates`

### Project marketplace

- [Project listings](https://github.com/richarrrd53/1141_se_project/blob/main/model/posts.py): `model/posts.py`
- [Bids and selection](https://github.com/richarrrd53/1141_se_project/blob/main/model/bids.py): `model/bids.py`
- [User accounts](https://github.com/richarrrd53/1141_se_project/blob/main/model/users.py): `model/users.py`
- [User lookup routes](https://github.com/richarrrd53/1141_se_project/blob/main/routes/dbQuery.py): `routes/dbQuery.py`
- [Password security](https://github.com/richarrrd53/1141_se_project/blob/main/security.py): `security.py`

### Work lifecycle

- [Issue discussion](https://github.com/richarrrd53/1141_se_project/blob/main/model/issues.py): `model/issues.py`
- [Delivery versions](https://github.com/richarrrd53/1141_se_project/blob/main/model/deliveries.py): `model/deliveries.py`
- [Project reviews](https://github.com/richarrrd53/1141_se_project/blob/main/model/reviews.py): `model/reviews.py`
- [Notifications](https://github.com/richarrrd53/1141_se_project/blob/main/model/notifications.py): `model/notifications.py`
- [Chunked uploads](https://github.com/richarrrd53/1141_se_project/blob/main/routes/upload.py): `routes/upload.py`

### Persistence

- [Database connection pool](https://github.com/richarrrd53/1141_se_project/blob/main/model/db.py): `model/db.py`
- **PostgreSQL**

### Other components

- **Client / freelancer**

## Connections

- Client / freelancer → HTTP application: uses routes
- Browser interface → HTTP application: requests pages
- Login interface → HTTP application: submits login
- HTTP application → Page templates: renders page (evidence: `main.py`)
- HTTP application → Project listings: manages projects (evidence: `main.py`)
- HTTP application → User accounts: looks up users (evidence: `main.py`)
- HTTP application → Bids and selection: reads bid details (evidence: `main.py`)
- HTTP application → Notifications: creates notifications (evidence: `main.py`)
- HTTP application → Issue discussion: reads issues (evidence: `main.py`)
- HTTP application → Project reviews: handles reviews (evidence: `main.py`)
- HTTP application → Delivery versions: handles deliveries (evidence: `main.py`)
- HTTP application → Chunked uploads: routes uploads (evidence: `main.py`)
- HTTP application → User lookup routes: registers routes (evidence: `main.py`)
- HTTP application → Password security: checks passwords (evidence: `main.py`)
- HTTP application → Database connection pool: gets connections (evidence: `main.py`)
- User lookup routes → Database connection pool: gets connections (evidence: `routes/dbQuery.py`)
- Chunked uploads → Project listings: uses project model (evidence: `routes/upload.py`)
- Project listings → PostgreSQL: reads and writes (evidence: `model/posts.py`)
- Bids and selection → PostgreSQL: reads and writes (evidence: `model/bids.py`)
- Issue discussion → PostgreSQL: reads and writes (evidence: `model/issues.py`)
- Delivery versions → PostgreSQL: reads and writes (evidence: `model/deliveries.py`)
- Project reviews → PostgreSQL: reads and writes (evidence: `model/reviews.py`)
- Notifications → PostgreSQL: reads and writes (evidence: `model/notifications.py`)
- Database connection pool → PostgreSQL: opens connections (evidence: `model/db.py`)
