# twcrews/planningcenter-api architecture

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

- Interactive diagram: https://gitdiagram.com/twcrews/planningcenter-api
- Repository: https://github.com/twcrews/planningcenter-api

## Overview

This repository is a strongly typed .NET client for Planning Center’s API. The main workflow is that an application uses a generated product/resource client to construct fluent requests; the client sends HTTP requests and returns typed JSON:API responses, with pagination and query controls. Supporting tooling fetches Planning Center’s API schema and writes versioned JSON that the source generators use to create clients. The runtime and generator links follow the README, sampled source, and explicit generator behavior; unsampled implementation details are not expanded.

Main entry points: [`Crews.PlanningCenter.Api.Generators/PlanningCenterResourceClientsGenerator.cs`](https://github.com/twcrews/planningcenter-api/blob/master/Crews.PlanningCenter.Api.Generators/PlanningCenterResourceClientsGenerator.cs) (Resource clients), [`Crews.PlanningCenter.Api.Generators/PlanningCenterRootClientsGenerator.cs`](https://github.com/twcrews/planningcenter-api/blob/master/Crews.PlanningCenter.Api.Generators/PlanningCenterRootClientsGenerator.cs) (Product clients), [`Crews.PlanningCenter.Api.Generators/Providers.cs`](https://github.com/twcrews/planningcenter-api/blob/master/Crews.PlanningCenter.Api.Generators/Providers.cs) (Schema providers), [`Crews.PlanningCenter.Api.DocParser/Services/PlanningCenterClient.cs`](https://github.com/twcrews/planningcenter-api/blob/master/Crews.PlanningCenter.Api.DocParser/Services/PlanningCenterClient.cs) (Documentation client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["API client runtime"]
  node_products["Product clients"]
  node_resources["Resource clients"]
  node_pagination["Pagination client"]
  node_di["DI registration"]
end

subgraph group_generation["Client generation"]
  node_providers["Schema providers<br/>[Providers.cs]"]
  node_rootgen["Root client generator"]
  node_resourcegen["Resource client generator"]
  node_modelgen["Resource model generator"]
end

subgraph group_docs["Schema documentation"]
  node_docapp["Parser application<br/>[Application.cs]"]
  node_builder["Documentation builder"]
  node_docclient["Documentation client"]
  node_json["Versioned schema JSON<br/>[Application.cs]"]
end

node_app(("Application"))
node_pco(("Planning Center API"))
node_schema(("API schema"))

node_app -->|"uses"| node_products
node_products -->|"creates clients"| node_resources
node_resources -->|"inherits behavior"| node_pagination
node_resources -->|"sends HTTP"| node_pco
node_pco -->|"returns JSON:API"| node_resources
node_di -->|"registers clients"| node_products
node_docapp -->|"builds schemas"| node_builder
node_builder -->|"requests documentation"| node_docclient
node_docclient -->|"fetches schema"| node_schema
node_schema -->|"returns documentation"| node_docclient
node_docapp -->|"writes versions"| node_json
node_json -->|"provides metadata"| node_providers
node_rootgen -->|"reads metadata"| node_providers
node_resourcegen -->|"reads metadata"| node_providers
node_modelgen -->|"reads metadata"| node_providers
node_rootgen -->|"generates"| node_products
node_resourcegen -->|"generates"| node_resources
node_modelgen -->|"generates models"| node_resources

click node_products "https://github.com/twcrews/planningcenter-api/blob/master/Crews.PlanningCenter.Api.Generators/PlanningCenterRootClientsGenerator.cs"
click node_resources "https://github.com/twcrews/planningcenter-api/blob/master/Crews.PlanningCenter.Api.Generators/PlanningCenterResourceClientsGenerator.cs"
click node_pagination "https://github.com/twcrews/planningcenter-api/blob/master/Crews.PlanningCenter.Api/Models/PaginatedResourceClient.cs"
click node_di "https://github.com/twcrews/planningcenter-api/blob/master/Crews.PlanningCenter.Api/Extensions/ServiceCollectionExtensions.cs"
click node_docapp "https://github.com/twcrews/planningcenter-api/blob/master/Crews.PlanningCenter.Api.DocParser/Application.cs"
click node_builder "https://github.com/twcrews/planningcenter-api/blob/master/Crews.PlanningCenter.Api.DocParser/Services/DocumentationBuilder.cs"
click node_docclient "https://github.com/twcrews/planningcenter-api/blob/master/Crews.PlanningCenter.Api.DocParser/Services/PlanningCenterClient.cs"
click node_json "https://github.com/twcrews/planningcenter-api/blob/master/Crews.PlanningCenter.Api.DocParser/Application.cs"
click node_providers "https://github.com/twcrews/planningcenter-api/blob/master/Crews.PlanningCenter.Api.Generators/Providers.cs"
click node_rootgen "https://github.com/twcrews/planningcenter-api/blob/master/Crews.PlanningCenter.Api.Generators/PlanningCenterRootClientsGenerator.cs"
click node_resourcegen "https://github.com/twcrews/planningcenter-api/blob/master/Crews.PlanningCenter.Api.Generators/PlanningCenterResourceClientsGenerator.cs"
click node_modelgen "https://github.com/twcrews/planningcenter-api/blob/master/Crews.PlanningCenter.Api.Generators/PlanningCenterResourcesGenerator.cs"

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_products,node_resources,node_pagination,node_di toneBlue
class node_providers,node_rootgen,node_resourcegen,node_modelgen toneAmber
class node_docapp,node_builder,node_docclient,node_json,node_pco,node_schema toneMint
class node_app toneIndigo
```

## Components

### API client runtime

- [Product clients](https://github.com/twcrews/planningcenter-api/blob/master/Crews.PlanningCenter.Api.Generators/PlanningCenterRootClientsGenerator.cs): `Crews.PlanningCenter.Api.Generators/PlanningCenterRootClientsGenerator.cs`
- [Resource clients](https://github.com/twcrews/planningcenter-api/blob/master/Crews.PlanningCenter.Api.Generators/PlanningCenterResourceClientsGenerator.cs): `Crews.PlanningCenter.Api.Generators/PlanningCenterResourceClientsGenerator.cs`
- [Pagination client](https://github.com/twcrews/planningcenter-api/blob/master/Crews.PlanningCenter.Api/Models/PaginatedResourceClient.cs): `Crews.PlanningCenter.Api/Models/PaginatedResourceClient.cs`
- [DI registration](https://github.com/twcrews/planningcenter-api/blob/master/Crews.PlanningCenter.Api/Extensions/ServiceCollectionExtensions.cs): `Crews.PlanningCenter.Api/Extensions/ServiceCollectionExtensions.cs`

### Client generation

- [Schema providers](https://github.com/twcrews/planningcenter-api/blob/master/Crews.PlanningCenter.Api.Generators/Providers.cs): `Crews.PlanningCenter.Api.Generators/Providers.cs`
- [Root client generator](https://github.com/twcrews/planningcenter-api/blob/master/Crews.PlanningCenter.Api.Generators/PlanningCenterRootClientsGenerator.cs): `Crews.PlanningCenter.Api.Generators/PlanningCenterRootClientsGenerator.cs`
- [Resource client generator](https://github.com/twcrews/planningcenter-api/blob/master/Crews.PlanningCenter.Api.Generators/PlanningCenterResourceClientsGenerator.cs): `Crews.PlanningCenter.Api.Generators/PlanningCenterResourceClientsGenerator.cs`
- [Resource model generator](https://github.com/twcrews/planningcenter-api/blob/master/Crews.PlanningCenter.Api.Generators/PlanningCenterResourcesGenerator.cs): `Crews.PlanningCenter.Api.Generators/PlanningCenterResourcesGenerator.cs`

### Schema documentation

- [Parser application](https://github.com/twcrews/planningcenter-api/blob/master/Crews.PlanningCenter.Api.DocParser/Application.cs): `Crews.PlanningCenter.Api.DocParser/Application.cs`
- [Documentation builder](https://github.com/twcrews/planningcenter-api/blob/master/Crews.PlanningCenter.Api.DocParser/Services/DocumentationBuilder.cs): `Crews.PlanningCenter.Api.DocParser/Services/DocumentationBuilder.cs`
- [Documentation client](https://github.com/twcrews/planningcenter-api/blob/master/Crews.PlanningCenter.Api.DocParser/Services/PlanningCenterClient.cs): `Crews.PlanningCenter.Api.DocParser/Services/PlanningCenterClient.cs`
- [Versioned schema JSON](https://github.com/twcrews/planningcenter-api/blob/master/Crews.PlanningCenter.Api.DocParser/Application.cs): `Crews.PlanningCenter.Api.DocParser/Application.cs`

### Other components

- **Application**
- **Planning Center API**
- **API schema**

## Connections

- Application → Product clients: uses
- Product clients → Resource clients: creates clients
- Resource clients → Pagination client: inherits behavior
- Resource clients → Planning Center API: sends HTTP
- Planning Center API → Resource clients: returns JSON:API
- DI registration → Product clients: registers clients
- Parser application → Documentation builder: builds schemas
- Documentation builder → Documentation client: requests documentation
- Documentation client → API schema: fetches schema
- API schema → Documentation client: returns documentation
- Parser application → Versioned schema JSON: writes versions
- Versioned schema JSON → Schema providers: provides metadata
- Root client generator → Schema providers: reads metadata
- Resource client generator → Schema providers: reads metadata
- Resource model generator → Schema providers: reads metadata
- Root client generator → Product clients: generates
- Resource client generator → Resource clients: generates
- Resource model generator → Resource clients: generates models
