# cpsc436c-2026w1/a1-starter architecture

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

- Interactive diagram: https://gitdiagram.com/cpsc436c-2026w1/a1-starter
- Repository: https://github.com/cpsc436c-2026w1/a1-starter

## Overview

This repository combines a course assignment with a rainfall-summary service. The student-facing workflow is to read the assignment and work through its notebook; the service separately accepts date ranges and returns per-model rainfall statistics through FastAPI or Lambda. The README also documents rebuilding the input dataset, but that build script is excluded from this runtime map. The assignment source and README describe notebook steps, but their detailed wiring is not sampled.

Main entry points: [`service.py`](https://github.com/cpsc436c-2026w1/a1-starter/blob/main/service.py) (Data loader), [`a1.qmd`](https://github.com/cpsc436c-2026w1/a1-starter/blob/main/a1.qmd) (Assignment source), [`docs/index.html`](https://github.com/cpsc436c-2026w1/a1-starter/blob/main/docs/index.html) (Rendered assignment), [`docs/a1.md`](https://github.com/cpsc436c-2026w1/a1-starter/blob/main/docs/a1.md) (Markdown assignment)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_learning["Assignment materials"]
  node_assignment_source["Assignment source<br/>[a1.qmd]"]
  node_assignment_rendered["Rendered assignment<br/>[index.html]"]
  node_assignment_markdown["Markdown assignment<br/>[a1.md]"]
  node_notebook["Work notebook<br/>[a1.ipynb]"]
end

subgraph group_analysis["Rainfall analysis"]
  node_summarise["Rainfall statistics<br/>[service.py]"]
  node_load_data["Data loader<br/>[service.py]"]
  node_local_data[("Local Parquet")]
end

subgraph group_runtime["Service interfaces"]
  node_fastapi["FastAPI app<br/>[service.py]"]
  node_lambda["Lambda handler<br/>[service.py]"]
  node_summary["Summary endpoint<br/>[service.py]"]
  node_lambda_dispatch["Event dispatch<br/>[service.py]"]
end

node_student(("Student"))
node_consumer(("Summary consumer"))
node_s3[("AWS S3")]
node_api_gateway(("API Gateway"))

node_assignment_source -->|"renders as"| node_assignment_rendered
node_assignment_source -->|"renders as"| node_assignment_markdown
node_student -->|"reads"| node_assignment_rendered
node_student -->|"works in"| node_notebook
node_consumer -->|"requests summary"| node_fastapi
node_fastapi -->|"serves"| node_summary
node_summary -->|"calls"| node_summarise
node_api_gateway -.->|"invokes"| node_lambda
node_lambda -->|"dispatches"| node_lambda_dispatch
node_lambda_dispatch -->|"calls"| node_summarise
node_summarise -->|"loads via"| node_load_data
node_load_data -->|"reads"| node_local_data
node_load_data -.->|"reads object"| node_s3
node_lambda_dispatch -.->|"reads request, writes result"| node_s3

click node_assignment_source "https://github.com/cpsc436c-2026w1/a1-starter/blob/main/a1.qmd"
click node_assignment_rendered "https://github.com/cpsc436c-2026w1/a1-starter/blob/main/docs/index.html"
click node_assignment_markdown "https://github.com/cpsc436c-2026w1/a1-starter/blob/main/docs/a1.md"
click node_notebook "https://github.com/cpsc436c-2026w1/a1-starter/blob/main/a1.ipynb"
click node_fastapi "https://github.com/cpsc436c-2026w1/a1-starter/blob/main/service.py"
click node_lambda "https://github.com/cpsc436c-2026w1/a1-starter/blob/main/service.py"
click node_summary "https://github.com/cpsc436c-2026w1/a1-starter/blob/main/service.py"
click node_lambda_dispatch "https://github.com/cpsc436c-2026w1/a1-starter/blob/main/service.py"
click node_summarise "https://github.com/cpsc436c-2026w1/a1-starter/blob/main/service.py"
click node_load_data "https://github.com/cpsc436c-2026w1/a1-starter/blob/main/service.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_assignment_source,node_assignment_rendered,node_assignment_markdown,node_notebook toneBlue
class node_summarise,node_load_data,node_local_data,node_s3 toneAmber
class node_fastapi,node_lambda,node_summary,node_lambda_dispatch,node_api_gateway toneMint
class node_student,node_consumer toneIndigo
```

## Components

### Assignment materials

- [Assignment source](https://github.com/cpsc436c-2026w1/a1-starter/blob/main/a1.qmd): `a1.qmd`
- [Rendered assignment](https://github.com/cpsc436c-2026w1/a1-starter/blob/main/docs/index.html): `docs/index.html`
- [Markdown assignment](https://github.com/cpsc436c-2026w1/a1-starter/blob/main/docs/a1.md): `docs/a1.md`
- [Work notebook](https://github.com/cpsc436c-2026w1/a1-starter/blob/main/a1.ipynb): `a1.ipynb`

### Rainfall analysis

- [Rainfall statistics](https://github.com/cpsc436c-2026w1/a1-starter/blob/main/service.py): `service.py`
- [Data loader](https://github.com/cpsc436c-2026w1/a1-starter/blob/main/service.py): `service.py`
- **Local Parquet**

### Service interfaces

- [FastAPI app](https://github.com/cpsc436c-2026w1/a1-starter/blob/main/service.py): `service.py`
- [Lambda handler](https://github.com/cpsc436c-2026w1/a1-starter/blob/main/service.py): `service.py`
- [Summary endpoint](https://github.com/cpsc436c-2026w1/a1-starter/blob/main/service.py): `service.py`
- [Event dispatch](https://github.com/cpsc436c-2026w1/a1-starter/blob/main/service.py): `service.py`

### Other components

- **Student**
- **Summary consumer**
- **AWS S3**
- **API Gateway**

## Connections

- Assignment source → Rendered assignment: renders as
- Assignment source → Markdown assignment: renders as
- Student → Rendered assignment: reads
- Student → Work notebook: works in
- Summary consumer → FastAPI app: requests summary
- FastAPI app → Summary endpoint: serves
- Summary endpoint → Rainfall statistics: calls
- API Gateway → Lambda handler: invokes
- Lambda handler → Event dispatch: dispatches
- Event dispatch → Rainfall statistics: calls
- Rainfall statistics → Data loader: loads via
- Data loader → Local Parquet: reads
- Data loader → AWS S3: reads object
- Event dispatch → AWS S3: reads request, writes result
