# correspondenceadg-cmyk/pulse architecture

> Architecture diagram of the GitHub repository correspondenceadg-cmyk/pulse, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/correspondenceadg-cmyk/pulse
- Repository: https://github.com/correspondenceadg-cmyk/pulse

## Overview

Pulse is an incomplete web-app scaffold: a React frontend with a placeholder home screen and a Go HTTP server exposing health and placeholder API routing. The shown runtime path is browser startup into the frontend, and server startup through configuration into the router and its HTTP helpers. The router comments name planned auth, events, votes, polls, and audit routes, but do not implement them. Migration contents and database wiring were not shown, so their role is left unconnected.

Main entry points: [`internal/httpx/router.go`](https://github.com/correspondenceadg-cmyk/pulse/blob/main/internal/httpx/router.go) (HTTP router), [`frontend/src/main.tsx`](https://github.com/correspondenceadg-cmyk/pulse/blob/main/frontend/src/main.tsx) (Frontend entry), [`cmd/pulse/main.go`](https://github.com/correspondenceadg-cmyk/pulse/blob/main/cmd/pulse/main.go) (Server startup), [`internal/httpx/errors.go`](https://github.com/correspondenceadg-cmyk/pulse/blob/main/internal/httpx/errors.go) (Error responses)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend"]
  node_frontend_entry["Frontend entry<br/>[main.tsx]"]
  node_app["App shell<br/>[App.tsx]"]
  node_query_client["Query client<br/>[queryClient.ts]"]
end

subgraph group_server["Server runtime"]
  node_server_entry["Server startup<br/>[main.go]"]
  node_config["Runtime config<br/>[config.go]"]
end

subgraph group_http["HTTP infrastructure"]
  node_router["HTTP router<br/>[router.go]"]
  node_middleware["HTTP middleware<br/>[middleware.go]"]
  node_json_helpers["JSON helpers<br/>[json.go]"]
  node_errors["Error responses<br/>[errors.go]"]
end

subgraph group_data["Data scaffold"]
  node_migrations["SQL migrations"]
end

node_browser(("Browser"))

node_browser -->|"opens"| node_frontend_entry
node_frontend_entry -->|"renders"| node_app
node_frontend_entry -->|"provides"| node_query_client
node_server_entry -->|"loads"| node_config
node_server_entry -->|"configures"| node_router
node_router -->|"registers"| node_middleware
node_router -->|"writes health"| node_json_helpers
node_router -->|"reports not-found"| node_errors
node_errors -->|"encodes"| node_json_helpers

click node_frontend_entry "https://github.com/correspondenceadg-cmyk/pulse/blob/main/frontend/src/main.tsx"
click node_app "https://github.com/correspondenceadg-cmyk/pulse/blob/main/frontend/src/App.tsx"
click node_query_client "https://github.com/correspondenceadg-cmyk/pulse/blob/main/frontend/src/lib/queryClient.ts"
click node_server_entry "https://github.com/correspondenceadg-cmyk/pulse/blob/main/cmd/pulse/main.go"
click node_config "https://github.com/correspondenceadg-cmyk/pulse/blob/main/internal/config/config.go"
click node_router "https://github.com/correspondenceadg-cmyk/pulse/blob/main/internal/httpx/router.go"
click node_middleware "https://github.com/correspondenceadg-cmyk/pulse/blob/main/internal/httpx/middleware.go"
click node_json_helpers "https://github.com/correspondenceadg-cmyk/pulse/blob/main/internal/httpx/json.go"
click node_errors "https://github.com/correspondenceadg-cmyk/pulse/blob/main/internal/httpx/errors.go"
click node_migrations "https://github.com/correspondenceadg-cmyk/pulse/tree/main/migrations"

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_frontend_entry,node_app,node_query_client,node_browser toneBlue
class node_server_entry,node_config toneAmber
class node_router,node_middleware,node_json_helpers,node_errors toneMint
class node_migrations toneRose
```

## Components

### Frontend

- [Frontend entry](https://github.com/correspondenceadg-cmyk/pulse/blob/main/frontend/src/main.tsx): `frontend/src/main.tsx`
- [App shell](https://github.com/correspondenceadg-cmyk/pulse/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Query client](https://github.com/correspondenceadg-cmyk/pulse/blob/main/frontend/src/lib/queryClient.ts): `frontend/src/lib/queryClient.ts`

### Server runtime

- [Server startup](https://github.com/correspondenceadg-cmyk/pulse/blob/main/cmd/pulse/main.go): `cmd/pulse/main.go`
- [Runtime config](https://github.com/correspondenceadg-cmyk/pulse/blob/main/internal/config/config.go): `internal/config/config.go`

### HTTP infrastructure

- [HTTP router](https://github.com/correspondenceadg-cmyk/pulse/blob/main/internal/httpx/router.go): `internal/httpx/router.go`
- [HTTP middleware](https://github.com/correspondenceadg-cmyk/pulse/blob/main/internal/httpx/middleware.go): `internal/httpx/middleware.go`
- [JSON helpers](https://github.com/correspondenceadg-cmyk/pulse/blob/main/internal/httpx/json.go): `internal/httpx/json.go`
- [Error responses](https://github.com/correspondenceadg-cmyk/pulse/blob/main/internal/httpx/errors.go): `internal/httpx/errors.go`

### Data scaffold

- [SQL migrations](https://github.com/correspondenceadg-cmyk/pulse/tree/main/migrations): `migrations`

### Other components

- **Browser**

## Connections

- Browser → Frontend entry: opens (evidence: `frontend/src/main.tsx`)
- Frontend entry → App shell: renders (evidence: `frontend/src/main.tsx`)
- Frontend entry → Query client: provides (evidence: `frontend/src/main.tsx`)
- Server startup → Runtime config: loads (evidence: `cmd/pulse/main.go`)
- Server startup → HTTP router: configures (evidence: `cmd/pulse/main.go`)
- HTTP router → HTTP middleware: registers (evidence: `internal/httpx/router.go`)
- HTTP router → JSON helpers: writes health (evidence: `internal/httpx/router.go`)
- HTTP router → Error responses: reports not-found (evidence: `internal/httpx/router.go`)
- Error responses → JSON helpers: encodes (evidence: `internal/httpx/errors.go`)
