# ploysumlees-670710743/padpadpad-swreqspec architecture

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

- Interactive diagram: https://gitdiagram.com/ploysumlees-670710743/padpadpad-swreqspec
- Repository: https://github.com/ploysumlees-670710743/padpadpad-swreqspec

## Overview

This repository is a camp-application prototype with a React frontend and FastAPI backend. Its main applicant workflow loads configured camp requirements, edits and saves a draft, submits it for validation, then views the submitted application. Separate capabilities support applicant lookup/editing, application-status review, and voting on camp locations; the README identifies voting as a prototype. The demo enrollment client uses simulated state instead of PostgreSQL. Some route and service code is only partially excerpted, so uncertain connections are omitted.

Main entry points: [`frontend/src/pages/CampEnrollmentPage.jsx`](https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/frontend/src/pages/CampEnrollmentPage.jsx) (Enrollment Page), [`backend/app/api/camp_enrollment.py`](https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/backend/app/api/camp_enrollment.py) (Enrollment Routes), [`frontend/src/api/client.js`](https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/frontend/src/api/client.js) (API Client), [`backend/app/main.py`](https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/backend/app/main.py) (FastAPI Entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_enrollment["Camp Enrollment"]
  node_enrollment_flow["Enrollment Flow<br/>[App.jsx]"]
  node_enrollment_page["Enrollment Page"]
  node_enrollment_form["Enrollment Form<br/>[EnrollmentForm.jsx]"]
  node_enrollment_preview["Submission Preview"]
  node_field_labels["Field Labels"]
  node_application_view["Application View"]
  node_enrollment_api["Enrollment Routes<br/>[camp_enrollment.py]"]
  node_camp_lookup["Camp Lookup"]
  node_draft_service["Draft Persistence"]
  node_submission_service["Submission"]
  node_enrollment_validation["Form Validation"]
  node_demo_client["Demo API<br/>[demoClient.js]"]
end

subgraph group_applicant["Applicant Records"]
  node_applicant_pages["Applicant Pages"]
  node_applicant_edit["Applicant Editor"]
  node_applicant_api["Applicant Routes<br/>[applicants.py]"]
  node_applicant_service["Applicant Service"]
  node_applicant_validation["Applicant Validation"]
end

subgraph group_statusvote["Status and Voting"]
  node_status_page["Application Status Page"]
  node_status_api["Status Routes"]
  node_status_service["Status Service"]
  node_vote_page["Location Voting"]
  node_vote_api["Vote Routes<br/>[votes.py]"]
  node_vote_service["Vote Service<br/>[vote_service.py]"]
end

subgraph group_platform["Application Platform"]
  node_api_client["API Client<br/>[client.js]"]
  node_app_entry["FastAPI Entry<br/>[main.py]"]
  node_database[("PostgreSQL<br/>[database.py]")]
  node_auth["Authentication<br/>[auth.py]"]
  node_authorization["Authorization<br/>[authz.py]"]
  node_models["Domain Models"]
end

node_applicant_actor(("Applicant"))
node_reviewer_actor(("Reviewer"))

node_applicant_actor -->|"starts"| node_enrollment_flow
node_enrollment_flow -->|"shows"| node_enrollment_page
node_enrollment_flow -->|"shows"| node_application_view
node_enrollment_page -->|"renders"| node_enrollment_form
node_enrollment_page -->|"renders"| node_enrollment_preview
node_enrollment_form -->|"uses"| node_field_labels
node_enrollment_preview -->|"uses"| node_field_labels
node_enrollment_page -->|"requests"| node_api_client
node_enrollment_page -.->|"uses in demo"| node_demo_client
node_enrollment_api -->|"calls"| node_camp_lookup
node_enrollment_api -->|"calls"| node_draft_service
node_enrollment_api -->|"calls"| node_submission_service
node_submission_service -->|"checks camp"| node_camp_lookup
node_submission_service -->|"validates"| node_enrollment_validation
node_camp_lookup -->|"reads required fields"| node_enrollment_validation
node_enrollment_api -->|"requires identity"| node_auth
node_applicant_pages -->|"requests"| node_api_client
node_applicant_pages -->|"renders editor"| node_applicant_edit
node_applicant_api -->|"calls"| node_applicant_service
node_applicant_api -->|"validates"| node_applicant_validation
node_applicant_api -->|"checks access"| node_authorization
node_status_page -->|"requests"| node_api_client
node_status_api -->|"calls"| node_status_service
node_status_api -->|"requires identity"| node_auth
node_vote_page -->|"requests"| node_api_client
node_api_client -->|"fetches locations"| node_vote_api
node_vote_api -->|"calls"| node_vote_service
node_vote_api -->|"checks access"| node_authorization
node_app_entry -->|"registers route"| node_applicant_api
node_app_entry -->|"registers route"| node_status_api
node_app_entry -->|"registers route"| node_vote_api
node_app_entry -->|"imports route"| node_enrollment_api
node_applicant_service -->|"uses transactions"| node_database
node_camp_lookup -.->|"queries"| node_database
node_draft_service -.->|"reads and writes"| node_database
node_submission_service -->|"reads and writes"| node_database
node_reviewer_actor -->|"checks status"| node_status_page
node_reviewer_actor -->|"votes"| node_vote_page

click node_enrollment_flow "https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/frontend/src/App.jsx"
click node_enrollment_page "https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/frontend/src/pages/CampEnrollmentPage.jsx"
click node_enrollment_form "https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/frontend/src/components/EnrollmentForm.jsx"
click node_enrollment_preview "https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/frontend/src/components/EnrollmentPreview.jsx"
click node_field_labels "https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/frontend/src/components/enrollmentLabels.js"
click node_application_view "https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/frontend/src/pages/ApplicantApplicationPage.jsx"
click node_enrollment_api "https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/backend/app/api/camp_enrollment.py"
click node_camp_lookup "https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/backend/app/services/camp_enrollment_service.py"
click node_draft_service "https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/backend/app/services/enrollment_draft_service.py"
click node_submission_service "https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/backend/app/services/enrollment_submission_service.py"
click node_enrollment_validation "https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/backend/app/validators/enrollment_validator.py"
click node_demo_client "https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/frontend/src/api/demoClient.js"
click node_applicant_pages "https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/frontend/src/pages/ApplicantSearchPage.jsx"
click node_applicant_edit "https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/frontend/src/components/ApplicantEditForm.jsx"
click node_applicant_api "https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/backend/app/api/applicants.py"
click node_applicant_service "https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/backend/app/services/applicant_service.py"
click node_applicant_validation "https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/backend/app/validators/applicant_validator.py"
click node_status_page "https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/frontend/src/pages/ApplicationStatusPage.jsx"
click node_status_api "https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/backend/app/api/application_status.py"
click node_status_service "https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/backend/app/services/application_status_service.py"
click node_vote_page "https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/frontend/src/pages/VoteLocationPage.jsx"
click node_vote_api "https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/backend/app/api/votes.py"
click node_vote_service "https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/backend/app/services/vote_service.py"
click node_api_client "https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/frontend/src/api/client.js"
click node_app_entry "https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/backend/app/main.py"
click node_database "https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/backend/app/db/database.py"
click node_auth "https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/backend/app/middleware/auth.py"
click node_authorization "https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/backend/app/middleware/authz.py"
click node_models "https://github.com/ploysumlees-670710743/padpadpad-swreqspec/tree/main/backend/app/models"

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_enrollment_flow,node_enrollment_page,node_enrollment_form,node_enrollment_preview,node_field_labels,node_application_view,node_enrollment_api,node_camp_lookup,node_draft_service,node_submission_service,node_enrollment_validation,node_demo_client,node_reviewer_actor toneBlue
class node_applicant_pages,node_applicant_edit,node_applicant_api,node_applicant_service,node_applicant_validation toneAmber
class node_status_page,node_status_api,node_status_service,node_vote_page,node_vote_api,node_vote_service toneMint
class node_api_client,node_app_entry,node_database,node_auth,node_authorization,node_models toneRose
class node_applicant_actor toneIndigo
```

## Components

### Camp Enrollment

- [Enrollment Flow](https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Enrollment Page](https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/frontend/src/pages/CampEnrollmentPage.jsx): `frontend/src/pages/CampEnrollmentPage.jsx`
- [Enrollment Form](https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/frontend/src/components/EnrollmentForm.jsx): `frontend/src/components/EnrollmentForm.jsx`
- [Submission Preview](https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/frontend/src/components/EnrollmentPreview.jsx): `frontend/src/components/EnrollmentPreview.jsx`
- [Field Labels](https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/frontend/src/components/enrollmentLabels.js): `frontend/src/components/enrollmentLabels.js`
- [Application View](https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/frontend/src/pages/ApplicantApplicationPage.jsx): `frontend/src/pages/ApplicantApplicationPage.jsx`
- [Enrollment Routes](https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/backend/app/api/camp_enrollment.py): `backend/app/api/camp_enrollment.py`
- [Camp Lookup](https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/backend/app/services/camp_enrollment_service.py): `backend/app/services/camp_enrollment_service.py`
- [Draft Persistence](https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/backend/app/services/enrollment_draft_service.py): `backend/app/services/enrollment_draft_service.py`
- [Submission](https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/backend/app/services/enrollment_submission_service.py): `backend/app/services/enrollment_submission_service.py`
- [Form Validation](https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/backend/app/validators/enrollment_validator.py): `backend/app/validators/enrollment_validator.py`
- [Demo API](https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/frontend/src/api/demoClient.js): `frontend/src/api/demoClient.js`

### Applicant Records

- [Applicant Pages](https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/frontend/src/pages/ApplicantSearchPage.jsx): `frontend/src/pages/ApplicantSearchPage.jsx`
- [Applicant Editor](https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/frontend/src/components/ApplicantEditForm.jsx): `frontend/src/components/ApplicantEditForm.jsx`
- [Applicant Routes](https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/backend/app/api/applicants.py): `backend/app/api/applicants.py`
- [Applicant Service](https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/backend/app/services/applicant_service.py): `backend/app/services/applicant_service.py`
- [Applicant Validation](https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/backend/app/validators/applicant_validator.py): `backend/app/validators/applicant_validator.py`

### Status and Voting

- [Application Status Page](https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/frontend/src/pages/ApplicationStatusPage.jsx): `frontend/src/pages/ApplicationStatusPage.jsx`
- [Status Routes](https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/backend/app/api/application_status.py): `backend/app/api/application_status.py`
- [Status Service](https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/backend/app/services/application_status_service.py): `backend/app/services/application_status_service.py`
- [Location Voting](https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/frontend/src/pages/VoteLocationPage.jsx): `frontend/src/pages/VoteLocationPage.jsx`
- [Vote Routes](https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/backend/app/api/votes.py): `backend/app/api/votes.py`
- [Vote Service](https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/backend/app/services/vote_service.py): `backend/app/services/vote_service.py`

### Application Platform

- [API Client](https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/frontend/src/api/client.js): `frontend/src/api/client.js`
- [FastAPI Entry](https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/backend/app/main.py): `backend/app/main.py`
- [PostgreSQL](https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/backend/app/db/database.py): `backend/app/db/database.py`
- [Authentication](https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/backend/app/middleware/auth.py): `backend/app/middleware/auth.py`
- [Authorization](https://github.com/ploysumlees-670710743/padpadpad-swreqspec/blob/main/backend/app/middleware/authz.py): `backend/app/middleware/authz.py`
- [Domain Models](https://github.com/ploysumlees-670710743/padpadpad-swreqspec/tree/main/backend/app/models): `backend/app/models`

### Other components

- **Applicant**
- **Reviewer**

## Connections

- Applicant → Enrollment Flow: starts (evidence: `frontend/src/App.jsx`)
- Enrollment Flow → Enrollment Page: shows (evidence: `frontend/src/App.jsx`)
- Enrollment Flow → Application View: shows (evidence: `frontend/src/App.jsx`)
- Enrollment Page → Enrollment Form: renders (evidence: `frontend/src/pages/CampEnrollmentPage.jsx`)
- Enrollment Page → Submission Preview: renders (evidence: `frontend/src/pages/CampEnrollmentPage.jsx`)
- Enrollment Form → Field Labels: uses (evidence: `frontend/src/components/EnrollmentForm.jsx`)
- Submission Preview → Field Labels: uses (evidence: `frontend/src/components/EnrollmentPreview.jsx`)
- Enrollment Page → API Client: requests (evidence: `frontend/src/pages/CampEnrollmentPage.jsx`)
- Enrollment Page → Demo API: uses in demo (evidence: `frontend/src/App.jsx`)
- Enrollment Routes → Camp Lookup: calls (evidence: `backend/app/api/camp_enrollment.py`)
- Enrollment Routes → Draft Persistence: calls (evidence: `backend/app/api/camp_enrollment.py`)
- Enrollment Routes → Submission: calls (evidence: `backend/app/api/camp_enrollment.py`)
- Submission → Camp Lookup: checks camp (evidence: `backend/app/services/enrollment_submission_service.py`)
- Submission → Form Validation: validates (evidence: `backend/app/services/enrollment_submission_service.py`)
- Camp Lookup → Form Validation: reads required fields (evidence: `backend/app/services/camp_enrollment_service.py`)
- Enrollment Routes → Authentication: requires identity (evidence: `backend/app/api/camp_enrollment.py`)
- Applicant Pages → API Client: requests (evidence: `frontend/src/pages/ApplicantSearchPage.jsx`)
- Applicant Pages → Applicant Editor: renders editor
- Applicant Routes → Applicant Service: calls (evidence: `backend/app/api/applicants.py`)
- Applicant Routes → Applicant Validation: validates (evidence: `backend/app/api/applicants.py`)
- Applicant Routes → Authorization: checks access (evidence: `backend/app/api/applicants.py`)
- Application Status Page → API Client: requests (evidence: `frontend/src/pages/ApplicationStatusPage.jsx`)
- Status Routes → Status Service: calls (evidence: `backend/app/api/application_status.py`)
- Status Routes → Authentication: requires identity (evidence: `backend/app/api/application_status.py`)
- Location Voting → API Client: requests (evidence: `frontend/src/pages/VoteLocationPage.jsx`)
- API Client → Vote Routes: fetches locations (evidence: `frontend/src/api/client.js`)
- Vote Routes → Vote Service: calls (evidence: `backend/app/api/votes.py`)
- Vote Routes → Authorization: checks access (evidence: `backend/app/api/votes.py`)
- FastAPI Entry → Applicant Routes: registers route (evidence: `backend/app/main.py`)
- FastAPI Entry → Status Routes: registers route (evidence: `backend/app/main.py`)
- FastAPI Entry → Vote Routes: registers route (evidence: `backend/app/main.py`)
- FastAPI Entry → Enrollment Routes: imports route
- Applicant Service → PostgreSQL: uses transactions (evidence: `backend/app/services/applicant_service.py`)
- Camp Lookup → PostgreSQL: queries
- Draft Persistence → PostgreSQL: reads and writes
- Submission → PostgreSQL: reads and writes (evidence: `backend/app/services/enrollment_submission_service.py`)
- Reviewer → Application Status Page: checks status (evidence: `frontend/src/pages/ApplicationStatusPage.jsx`)
- Reviewer → Location Voting: votes (evidence: `README.md`)
