# palisadoesfoundation/talawa-api architecture

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

- Interactive diagram: https://gitdiagram.com/palisadoesfoundation/talawa-api
- Repository: https://github.com/palisadoesfoundation/talawa-api

## Overview

Talawa API is the backend for a group-activity platform serving nonprofit organizations and businesses. The principal workflow is a client accessing the API to manage membership, groups, events and facilities; the README documents these capabilities, while the tree shows GraphQL, REST authentication, persistence and background-worker subsystems. The graph also preserves documented fundraising/social capabilities and visible plugin and notification components. Some domain implementations are unsampled, so their internal calls are omitted rather than inferred; dashed links mark unverified integration points.

Main entry points: [`src/drizzle/schema.ts`](https://github.com/palisadoesfoundation/talawa-api/blob/main/src/drizzle/schema.ts) (PostgreSQL data), [`src/workers/eventGeneration/eventGenerationPipeline.ts`](https://github.com/palisadoesfoundation/talawa-api/blob/main/src/workers/eventGeneration/eventGenerationPipeline.ts) (Event generation), [`src/graphql/schemaManager.ts`](https://github.com/palisadoesfoundation/talawa-api/blob/main/src/graphql/schemaManager.ts) (GraphQL schema), [`src/services/auth/authService.ts`](https://github.com/palisadoesfoundation/talawa-api/blob/main/src/services/auth/authService.ts) (Authentication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API access"]
  node_graphql["GraphQL endpoint<br/>[graphql.ts]"]
  node_schema["GraphQL schema<br/>[schemaManager.ts]"]
  node_context["Request context<br/>[context.ts]"]
end

subgraph group_identity["Identity and extensions"]
  node_auth["Authentication<br/>[authService.ts]"]
  node_oauth["OAuth providers"]
  node_plugins["Plugin lifecycle<br/>[lifecycle.ts]"]
end

subgraph group_domains["Organization features"]
  node_membership["Membership management"]
  node_groups["Groups management"]
  node_events["Event registration<br/>[Event.ts]"]
  node_recurrence["Recurring meetings<br/>[windowManager.ts]"]
  node_facilities["Facility registration"]
  node_fundraising["Funds and campaigns<br/>[Fund.ts]"]
  node_social["Chat and posts<br/>[Chat.ts]"]
end

subgraph group_runtime["Runtime services"]
  node_notifications["Notifications"]
  node_workers["Background workers"]
  node_generation["Event generation"]
  node_cache["Caching"]
  node_objectstore["File storage<br/>[minioClient.ts]"]
end

subgraph group_storage["Persistence"]
  node_database[("PostgreSQL data<br/>[schema.ts]")]
end

node_client(("Talawa clients"))

node_client -->|"accesses API"| node_graphql
node_schema -->|"uses context"| node_context
node_schema -->|"registers extensions"| node_plugins
node_auth -->|"reads and writes"| node_database
node_auth -.->|"uses providers"| node_oauth
node_workers -->|"runs generation"| node_generation
node_generation -->|"generates instances"| node_recurrence
node_generation -->|"uses schema"| node_database
node_notifications -->|"reads and writes"| node_database
node_context -.->|"provides cache"| node_cache
node_events -.->|"supports recurring events"| node_recurrence
node_facilities -.->|"persists registrations"| node_database
node_membership -.->|"persists membership"| node_database
node_groups -.->|"persists groups"| node_database
node_fundraising -.->|"persists campaigns"| node_database
node_social -.->|"persists content"| node_database

click node_graphql "https://github.com/palisadoesfoundation/talawa-api/blob/main/src/routes/graphql.ts"
click node_schema "https://github.com/palisadoesfoundation/talawa-api/blob/main/src/graphql/schemaManager.ts"
click node_context "https://github.com/palisadoesfoundation/talawa-api/blob/main/src/graphql/context.ts"
click node_auth "https://github.com/palisadoesfoundation/talawa-api/blob/main/src/services/auth/authService.ts"
click node_oauth "https://github.com/palisadoesfoundation/talawa-api/blob/main/src/utilities/auth/oauth/OAuthProviderRegistry.ts"
click node_plugins "https://github.com/palisadoesfoundation/talawa-api/blob/main/src/plugin/manager/lifecycle.ts"
click node_membership "https://github.com/palisadoesfoundation/talawa-api/tree/main/src/graphql/types"
click node_groups "https://github.com/palisadoesfoundation/talawa-api/tree/main/src/graphql/types"
click node_events "https://github.com/palisadoesfoundation/talawa-api/blob/main/src/graphql/types/Event/Event.ts"
click node_recurrence "https://github.com/palisadoesfoundation/talawa-api/blob/main/src/services/eventGeneration/windowManager.ts"
click node_facilities "https://github.com/palisadoesfoundation/talawa-api/tree/main/src/graphql/types"
click node_fundraising "https://github.com/palisadoesfoundation/talawa-api/blob/main/src/graphql/types/Fund/Fund.ts"
click node_social "https://github.com/palisadoesfoundation/talawa-api/blob/main/src/graphql/types/Chat/Chat.ts"
click node_notifications "https://github.com/palisadoesfoundation/talawa-api/blob/main/src/graphql/types/Notification/Notification_engine.ts"
click node_workers "https://github.com/palisadoesfoundation/talawa-api/blob/main/src/workers/backgroundWorkerService.ts"
click node_generation "https://github.com/palisadoesfoundation/talawa-api/blob/main/src/workers/eventGeneration/eventGenerationPipeline.ts"
click node_database "https://github.com/palisadoesfoundation/talawa-api/blob/main/src/drizzle/schema.ts"
click node_cache "https://github.com/palisadoesfoundation/talawa-api/blob/main/src/services/caching/RedisCacheService.ts"
click node_objectstore "https://github.com/palisadoesfoundation/talawa-api/blob/main/src/fastifyPlugins/minioClient.ts"

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_graphql,node_schema,node_context,node_client toneBlue
class node_auth,node_oauth,node_plugins toneAmber
class node_membership,node_groups,node_events,node_recurrence,node_facilities,node_fundraising,node_social toneMint
class node_notifications,node_workers,node_generation,node_cache,node_objectstore toneRose
class node_database toneIndigo
```

## Components

### API access

- [GraphQL endpoint](https://github.com/palisadoesfoundation/talawa-api/blob/main/src/routes/graphql.ts): `src/routes/graphql.ts`
- [GraphQL schema](https://github.com/palisadoesfoundation/talawa-api/blob/main/src/graphql/schemaManager.ts): `src/graphql/schemaManager.ts`
- [Request context](https://github.com/palisadoesfoundation/talawa-api/blob/main/src/graphql/context.ts): `src/graphql/context.ts`

### Identity and extensions

- [Authentication](https://github.com/palisadoesfoundation/talawa-api/blob/main/src/services/auth/authService.ts): `src/services/auth/authService.ts`
- [OAuth providers](https://github.com/palisadoesfoundation/talawa-api/blob/main/src/utilities/auth/oauth/OAuthProviderRegistry.ts): `src/utilities/auth/oauth/OAuthProviderRegistry.ts`
- [Plugin lifecycle](https://github.com/palisadoesfoundation/talawa-api/blob/main/src/plugin/manager/lifecycle.ts): `src/plugin/manager/lifecycle.ts`

### Organization features

- [Membership management](https://github.com/palisadoesfoundation/talawa-api/tree/main/src/graphql/types): `src/graphql/types`
- [Groups management](https://github.com/palisadoesfoundation/talawa-api/tree/main/src/graphql/types): `src/graphql/types`
- [Event registration](https://github.com/palisadoesfoundation/talawa-api/blob/main/src/graphql/types/Event/Event.ts): `src/graphql/types/Event/Event.ts`
- [Recurring meetings](https://github.com/palisadoesfoundation/talawa-api/blob/main/src/services/eventGeneration/windowManager.ts): `src/services/eventGeneration/windowManager.ts`
- [Facility registration](https://github.com/palisadoesfoundation/talawa-api/tree/main/src/graphql/types): `src/graphql/types`
- [Funds and campaigns](https://github.com/palisadoesfoundation/talawa-api/blob/main/src/graphql/types/Fund/Fund.ts): `src/graphql/types/Fund/Fund.ts`
- [Chat and posts](https://github.com/palisadoesfoundation/talawa-api/blob/main/src/graphql/types/Chat/Chat.ts): `src/graphql/types/Chat/Chat.ts`

### Runtime services

- [Notifications](https://github.com/palisadoesfoundation/talawa-api/blob/main/src/graphql/types/Notification/Notification_engine.ts): `src/graphql/types/Notification/Notification_engine.ts`
- [Background workers](https://github.com/palisadoesfoundation/talawa-api/blob/main/src/workers/backgroundWorkerService.ts): `src/workers/backgroundWorkerService.ts`
- [Event generation](https://github.com/palisadoesfoundation/talawa-api/blob/main/src/workers/eventGeneration/eventGenerationPipeline.ts): `src/workers/eventGeneration/eventGenerationPipeline.ts`
- [Caching](https://github.com/palisadoesfoundation/talawa-api/blob/main/src/services/caching/RedisCacheService.ts): `src/services/caching/RedisCacheService.ts`
- [File storage](https://github.com/palisadoesfoundation/talawa-api/blob/main/src/fastifyPlugins/minioClient.ts): `src/fastifyPlugins/minioClient.ts`

### Persistence

- [PostgreSQL data](https://github.com/palisadoesfoundation/talawa-api/blob/main/src/drizzle/schema.ts): `src/drizzle/schema.ts`

### Other components

- **Talawa clients**

## Connections

- Talawa clients → GraphQL endpoint: accesses API (evidence: `README.md`)
- GraphQL schema → Request context: uses context
- GraphQL schema → Plugin lifecycle: registers extensions (evidence: `src/graphql/schemaManager.ts`)
- Authentication → PostgreSQL data: reads and writes (evidence: `src/services/auth/authService.ts`)
- Authentication → OAuth providers: uses providers
- Background workers → Event generation: runs generation (evidence: `src/workers/backgroundWorkerService.ts`)
- Event generation → Recurring meetings: generates instances
- Event generation → PostgreSQL data: uses schema (evidence: `src/workers/eventGeneration/eventGenerationPipeline.ts`)
- Notifications → PostgreSQL data: reads and writes (evidence: `src/graphql/types/Notification/Notification_engine.ts`)
- Request context → Caching: provides cache
- Event registration → Recurring meetings: supports recurring events
- Facility registration → PostgreSQL data: persists registrations
- Membership management → PostgreSQL data: persists membership
- Groups management → PostgreSQL data: persists groups
- Funds and campaigns → PostgreSQL data: persists campaigns
- Chat and posts → PostgreSQL data: persists content
