# tg11-org/freeparty architecture

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

- Interactive diagram: https://gitdiagram.com/tg11-org/freeparty
- Repository: https://github.com/tg11-org/freeparty

## Overview

Freeparty is a Django social-network foundation: people register and establish identities, publish and interact with posts, then receive timeline and notification updates. Separate branches cover moderation, realtime notifications, encrypted direct messages, and federation-ready exchange. Shared core services support URI and network handling, health checks, and reliable asynchronous work. The README describes many capabilities, but sampled source does not show most request routing or cross-app calls; those relationships are omitted or marked unverified rather than inferred as certain.

Main entry points: [`apps/notifications/tasks.py`](https://github.com/tg11-org/freeparty/blob/master/apps/notifications/tasks.py) (Notification delivery), [`apps/federation/tasks.py`](https://github.com/tg11-org/freeparty/blob/master/apps/federation/tasks.py) (Federation delivery), [`apps/timelines/services.py`](https://github.com/tg11-org/freeparty/blob/master/apps/timelines/services.py) (Timelines), [`apps/posts/models.py`](https://github.com/tg11-org/freeparty/blob/master/apps/posts/models.py) (Posts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Accounts and identity"]
  node_accounts["Accounts"]
  node_actors["Actors<br/>[models.py]"]
  node_profiles["Profiles<br/>[models.py]"]
end

subgraph group_content["Social content"]
  node_posts[("Posts<br/>[models.py]")]
  node_media["Media processing<br/>[tasks.py]"]
  node_social[("Social actions<br/>[models.py]")]
  node_timelines["Timelines<br/>[services.py]"]
end

subgraph group_communication["Communication"]
  node_notifications[("Notifications<br/>[models.py]")]
  node_notification_delivery["Notification delivery<br/>[tasks.py]"]
  node_private_messages[("Private messages<br/>[models.py]")]
  node_message_services["Message services<br/>[services.py]"]
end

subgraph group_trust["Trust and federation"]
  node_moderation["Moderation<br/>[services.py]"]
  node_moderation_api["Moderation API<br/>[api_views.py]"]
  node_federation[("Federation objects<br/>[models.py]")]
  node_federation_services["Federation services<br/>[services.py]"]
  node_federation_delivery["Federation delivery<br/>[tasks.py]"]
end

subgraph group_platform["Shared platform"]
  node_core_network["Safe networking<br/>[network.py]"]
  node_task_reliability["Task reliability"]
  node_task_observability["Task observability"]
  node_task_queue["Celery runtime<br/>[celery.py]"]
end

node_person(("Person"))
node_remote_instances(("Remote instances"))

node_person -.->|"registers"| node_accounts
node_accounts -.->|"establishes identity"| node_actors
node_actors -.->|"has profile"| node_profiles
node_person -.->|"publishes"| node_posts
node_posts -.->|"queues processing"| node_media
node_person -.->|"follows and engages"| node_social
node_person -.->|"views timeline"| node_timelines
node_timelines -->|"queries visible posts"| node_posts
node_timelines -->|"queries remote posts"| node_federation
node_person -.->|"receives updates"| node_notifications
node_notifications -->|"queues tasks"| node_notification_delivery
node_person -.->|"uses messaging"| node_private_messages
node_message_services -->|"stores envelopes"| node_private_messages
node_person -.->|"triages reports"| node_moderation_api
node_moderation_api -.->|"handles moderation"| node_moderation
node_federation_services -->|"records activities"| node_federation
node_federation_services -->|"queues deliveries"| node_federation_delivery
node_federation_delivery -->|"delivers activities"| node_remote_instances
node_federation_delivery -->|"sends safely"| node_core_network
node_notification_delivery -->|"tracks execution"| node_task_reliability
node_notification_delivery -->|"observes lifecycle"| node_task_observability
node_task_queue -->|"discovers tasks"| node_notification_delivery
node_task_queue -->|"discovers tasks"| node_federation_delivery

click node_accounts "https://github.com/tg11-org/freeparty/tree/master/apps/accounts"
click node_actors "https://github.com/tg11-org/freeparty/blob/master/apps/actors/models.py"
click node_profiles "https://github.com/tg11-org/freeparty/blob/master/apps/profiles/models.py"
click node_posts "https://github.com/tg11-org/freeparty/blob/master/apps/posts/models.py"
click node_media "https://github.com/tg11-org/freeparty/blob/master/apps/posts/tasks.py"
click node_social "https://github.com/tg11-org/freeparty/blob/master/apps/social/models.py"
click node_timelines "https://github.com/tg11-org/freeparty/blob/master/apps/timelines/services.py"
click node_notifications "https://github.com/tg11-org/freeparty/blob/master/apps/notifications/models.py"
click node_notification_delivery "https://github.com/tg11-org/freeparty/blob/master/apps/notifications/tasks.py"
click node_private_messages "https://github.com/tg11-org/freeparty/blob/master/apps/private_messages/models.py"
click node_message_services "https://github.com/tg11-org/freeparty/blob/master/apps/private_messages/services.py"
click node_moderation "https://github.com/tg11-org/freeparty/blob/master/apps/moderation/services.py"
click node_moderation_api "https://github.com/tg11-org/freeparty/blob/master/apps/moderation/api_views.py"
click node_federation "https://github.com/tg11-org/freeparty/blob/master/apps/federation/models.py"
click node_federation_services "https://github.com/tg11-org/freeparty/blob/master/apps/federation/services.py"
click node_federation_delivery "https://github.com/tg11-org/freeparty/blob/master/apps/federation/tasks.py"
click node_core_network "https://github.com/tg11-org/freeparty/blob/master/apps/core/network.py"
click node_task_reliability "https://github.com/tg11-org/freeparty/blob/master/apps/core/services/task_reliability.py"
click node_task_observability "https://github.com/tg11-org/freeparty/blob/master/apps/core/services/task_observability.py"
click node_task_queue "https://github.com/tg11-org/freeparty/blob/master/config/celery.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_accounts,node_actors,node_profiles toneBlue
class node_posts,node_media,node_social,node_timelines toneAmber
class node_notifications,node_notification_delivery,node_private_messages,node_message_services toneMint
class node_moderation,node_moderation_api,node_federation,node_federation_services,node_federation_delivery toneRose
class node_core_network,node_task_reliability,node_task_observability,node_task_queue,node_person,node_remote_instances toneIndigo
```

## Components

### Accounts and identity

- [Accounts](https://github.com/tg11-org/freeparty/tree/master/apps/accounts): `apps/accounts`
- [Actors](https://github.com/tg11-org/freeparty/blob/master/apps/actors/models.py): `apps/actors/models.py`
- [Profiles](https://github.com/tg11-org/freeparty/blob/master/apps/profiles/models.py): `apps/profiles/models.py`

### Social content

- [Posts](https://github.com/tg11-org/freeparty/blob/master/apps/posts/models.py): `apps/posts/models.py`
- [Media processing](https://github.com/tg11-org/freeparty/blob/master/apps/posts/tasks.py): `apps/posts/tasks.py`
- [Social actions](https://github.com/tg11-org/freeparty/blob/master/apps/social/models.py): `apps/social/models.py`
- [Timelines](https://github.com/tg11-org/freeparty/blob/master/apps/timelines/services.py): `apps/timelines/services.py`

### Communication

- [Notifications](https://github.com/tg11-org/freeparty/blob/master/apps/notifications/models.py): `apps/notifications/models.py`
- [Notification delivery](https://github.com/tg11-org/freeparty/blob/master/apps/notifications/tasks.py): `apps/notifications/tasks.py`
- [Private messages](https://github.com/tg11-org/freeparty/blob/master/apps/private_messages/models.py): `apps/private_messages/models.py`
- [Message services](https://github.com/tg11-org/freeparty/blob/master/apps/private_messages/services.py): `apps/private_messages/services.py`

### Trust and federation

- [Moderation](https://github.com/tg11-org/freeparty/blob/master/apps/moderation/services.py): `apps/moderation/services.py`
- [Moderation API](https://github.com/tg11-org/freeparty/blob/master/apps/moderation/api_views.py): `apps/moderation/api_views.py`
- [Federation objects](https://github.com/tg11-org/freeparty/blob/master/apps/federation/models.py): `apps/federation/models.py`
- [Federation services](https://github.com/tg11-org/freeparty/blob/master/apps/federation/services.py): `apps/federation/services.py`
- [Federation delivery](https://github.com/tg11-org/freeparty/blob/master/apps/federation/tasks.py): `apps/federation/tasks.py`

### Shared platform

- [Safe networking](https://github.com/tg11-org/freeparty/blob/master/apps/core/network.py): `apps/core/network.py`
- [Task reliability](https://github.com/tg11-org/freeparty/blob/master/apps/core/services/task_reliability.py): `apps/core/services/task_reliability.py`
- [Task observability](https://github.com/tg11-org/freeparty/blob/master/apps/core/services/task_observability.py): `apps/core/services/task_observability.py`
- [Celery runtime](https://github.com/tg11-org/freeparty/blob/master/config/celery.py): `config/celery.py`

### Other components

- **Person**
- **Remote instances**

## Connections

- Person → Accounts: registers
- Accounts → Actors: establishes identity (evidence: `apps/accounts/signals.py`)
- Actors → Profiles: has profile
- Person → Posts: publishes
- Posts → Media processing: queues processing (evidence: `apps/posts/tasks.py`)
- Person → Social actions: follows and engages
- Person → Timelines: views timeline
- Timelines → Posts: queries visible posts (evidence: `apps/timelines/services.py`)
- Timelines → Federation objects: queries remote posts (evidence: `apps/timelines/services.py`)
- Person → Notifications: receives updates
- Notifications → Notification delivery: queues tasks (evidence: `apps/notifications/tasks.py`)
- Person → Private messages: uses messaging
- Message services → Private messages: stores envelopes (evidence: `apps/private_messages/services.py`)
- Person → Moderation API: triages reports
- Moderation API → Moderation: handles moderation
- Federation services → Federation objects: records activities (evidence: `apps/federation/services.py`)
- Federation services → Federation delivery: queues deliveries (evidence: `apps/federation/services.py`)
- Federation delivery → Remote instances: delivers activities (evidence: `apps/federation/tasks.py`)
- Federation delivery → Safe networking: sends safely (evidence: `apps/federation/tasks.py`)
- Notification delivery → Task reliability: tracks execution (evidence: `apps/notifications/tasks.py`)
- Notification delivery → Task observability: observes lifecycle (evidence: `apps/notifications/tasks.py`)
- Celery runtime → Notification delivery: discovers tasks (evidence: `config/celery.py`)
- Celery runtime → Federation delivery: discovers tasks (evidence: `config/celery.py`)
