# nahian-19/project_planner architecture

> Architecture diagram of the GitHub repository nahian-19/project_planner, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nahian-19/project_planner
- Repository: https://github.com/nahian-19/project_planner

## Overview

#### Purpose and entry points
Project Planner is a Django/DRF backend for authenticated project, task, subscription, and notification workflows. HTTP entry is `manage.py` through Django URL routing at `project_planner/urls.py`; WSGI and ASGI deployment entry points are `project_planner/wsgi.py` and `project_planner/asgi.py`. The versioned REST surface is documented in `Project Planner API.yaml`.

#### Application composition
Domain logic is organized as Django apps with the conventional model → serializer → view → URL boundary:
- Users and JWT-based identity/profile lifecycle: `apps/users/models.py`, `apps/users/views.py`, `apps/users/urls.py`.
- Projects, memberships, ownership, invitations, and project querying: `apps/projects/models.py`, `apps/projects/views.py`, `apps/projects/filters.py`.
- Tasks and their project-associated lifecycle/status querying: `apps/tasks/models.py`, `apps/tasks/views.py`, `apps/tasks/filters.py`.
- Administrative project oversight is separately exposed through `apps/admins/views.py` and `apps/admins/urls.py`.

#### Request, authorization, and data flow
Requests enter the root URL configuration, are dispatched to app views, validated/represented by DRF serializers, and persist through Django models. Authentication establishes the user context; shared authorization rules are centralized in `core/permissions.py`. Project and task filters form the query boundary for list/search-style endpoints. Django admin registrations across app `admin.py` files provide a separate staff-operated data-management path.

#### Project collaboration workflow
A project is created or managed by an authorized user, with members represented in the projects domain. Tasks belong to the planning workflow and are listed, updated, and status-tracked through the tasks API. Invitation and registration flows cross domains: user lifecycle handling in `apps/users/views.py` and reusable email delivery in `core/services/mail_service.py` support emailed project invitations and subsequent membership completion.

#### Notifications and realtime delivery
Notifications are a distinct persistence/API domain in `apps/notifications/models.py`, `apps/notifications/views.py`, and `apps/notifications/urls.py`. WebSocket consumers and routing in `apps/notifications/consumers.py` and `apps/notifications/routing.py` provide realtime delivery under the ASGI runtime. Notification filtering is isolated at `apps/notifications/filters.py`.

#### Subscription and asynchronous processing
Subscription records and HTTP operations reside in `apps/subscriptions/models.py`, `apps/subscriptions/views.py`, and `apps/subscriptions/signals.py`; the README identifies payment integration and Stripe credentials as external dependencies. Celery is configured by `project_planner/celery.py`; shared background work is located in `core/tasks.py`. Redis is the material broker/backing service for Celery and the realtime stack, while SQLite is the stated primary database.

#### Runtime and operational boundaries
`project_planner/settings.py` is the integration point for Django, DRF, Channels, Redis, Celery, JWT, email, and schema documentation configuration. Run the HTTP service with Django, a Celery worker and beat for asynchronous/scheduled work, and Redis separately. API schema UIs are served under the documented Swagger/ReDoc routes; email delivery requires configured email credentials, and payment operations require Stripe keys.

Main entry points: [`project_planner/urls.py`](https://github.com/nahian-19/project_planner/blob/main/project_planner/urls.py) (Root URL routing), [`apps/projects/views.py`](https://github.com/nahian-19/project_planner/blob/main/apps/projects/views.py) (Projects & membership), [`apps/tasks/views.py`](https://github.com/nahian-19/project_planner/blob/main/apps/tasks/views.py) (Task lifecycle), [`apps/users/views.py`](https://github.com/nahian-19/project_planner/blob/main/apps/users/views.py) (Users & identity)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime"]
  node_django{{"Django HTTP service<br/>runtime<br/>[manage.py]"}}
  node_root_urls["Root URL routing<br/>Django URLs<br/>[urls.py]"]
  node_settings["Integration settings<br/>Django settings<br/>[settings.py]"]
  node_api_schema["OpenAPI specification<br/>API contract"]
end

subgraph group_domains["Django domains"]
  node_users["Users &amp; identity<br/>Django app<br/>[views.py]"]
  node_projects["Projects &amp; membership<br/>Django app<br/>[views.py]"]
  node_project_filters["Project query filters<br/>DRF filters<br/>[filters.py]"]
  node_tasks["Task lifecycle<br/>Django app<br/>[views.py]"]
  node_task_filters["Task query filters<br/>DRF filters<br/>[filters.py]"]
  node_notifications["Notifications API<br/>Django app<br/>[views.py]"]
  node_subscriptions["Subscriptions<br/>Django app<br/>[views.py]"]
  node_admin_api["Administrative oversight<br/>Django app<br/>[views.py]"]
  node_permissions["Shared authorization<br/>permission policy<br/>[permissions.py]"]
end

subgraph group_async["Async &amp; realtime"]
  node_asgi{{"ASGI application<br/>realtime runtime<br/>[asgi.py]"}}
  node_ws_routing["Notification WebSocket routing<br/>Channels routing<br/>[routing.py]"]
  node_ws_consumers["Notification consumers<br/>Channels consumers<br/>[consumers.py]"]
  node_celery{{"Celery worker &amp; beat<br/>background runtime<br/>[celery.py]"}}
  node_background_tasks["Shared background work<br/>Celery tasks<br/>[tasks.py]"]
end

subgraph group_external["External services"]
  node_database[("SQLite database<br/>primary database")]
  node_redis[("Redis<br/>broker &amp; realtime backing")]
  node_mail["Email delivery<br/>mail service<br/>[mail_service.py]"]
  node_stripe["Stripe<br/>payment provider"]
end

node_django -->|"routes requests"| node_root_urls
node_root_urls -->|"dispatches"| node_users
node_root_urls -->|"dispatches"| node_projects
node_root_urls -->|"dispatches"| node_tasks
node_root_urls -->|"dispatches"| node_notifications
node_root_urls -->|"dispatches"| node_subscriptions
node_root_urls -->|"dispatches"| node_admin_api
node_projects -->|"queries with"| node_project_filters
node_tasks -->|"queries with"| node_task_filters
node_projects -->|"authorizes via"| node_permissions
node_tasks -->|"authorizes via"| node_permissions
node_users -->|"persists"| node_database
node_projects -->|"persists"| node_database
node_tasks -->|"persists"| node_database
node_notifications -->|"persists"| node_database
node_subscriptions -->|"persists"| node_database
node_projects -->|"sends invitations"| node_mail
node_users -->|"sends lifecycle email"| node_mail
node_subscriptions -->|"payment operations"| node_stripe
node_asgi -->|"routes WebSockets"| node_ws_routing
node_ws_routing -->|"dispatches"| node_ws_consumers
node_ws_consumers -->|"delivers persisted notifications"| node_notifications
node_ws_consumers -->|"uses realtime backing"| node_redis
node_celery -->|"executes"| node_background_tasks
node_celery -->|"uses broker"| node_redis
node_settings -.->|"configures"| node_django
node_settings -.->|"configures"| node_asgi
node_api_schema -.->|"documents REST surface"| node_root_urls

click node_django "https://github.com/nahian-19/project_planner/blob/main/manage.py"
click node_root_urls "https://github.com/nahian-19/project_planner/blob/main/project_planner/urls.py"
click node_settings "https://github.com/nahian-19/project_planner/blob/main/project_planner/settings.py"
click node_api_schema "https://github.com/nahian-19/project_planner/blob/main/Project%20Planner%20API.yaml"
click node_users "https://github.com/nahian-19/project_planner/blob/main/apps/users/views.py"
click node_projects "https://github.com/nahian-19/project_planner/blob/main/apps/projects/views.py"
click node_project_filters "https://github.com/nahian-19/project_planner/blob/main/apps/projects/filters.py"
click node_tasks "https://github.com/nahian-19/project_planner/blob/main/apps/tasks/views.py"
click node_task_filters "https://github.com/nahian-19/project_planner/blob/main/apps/tasks/filters.py"
click node_notifications "https://github.com/nahian-19/project_planner/blob/main/apps/notifications/views.py"
click node_subscriptions "https://github.com/nahian-19/project_planner/blob/main/apps/subscriptions/views.py"
click node_admin_api "https://github.com/nahian-19/project_planner/blob/main/apps/admins/views.py"
click node_permissions "https://github.com/nahian-19/project_planner/blob/main/core/permissions.py"
click node_asgi "https://github.com/nahian-19/project_planner/blob/main/project_planner/asgi.py"
click node_ws_routing "https://github.com/nahian-19/project_planner/blob/main/apps/notifications/routing.py"
click node_ws_consumers "https://github.com/nahian-19/project_planner/blob/main/apps/notifications/consumers.py"
click node_celery "https://github.com/nahian-19/project_planner/blob/main/project_planner/celery.py"
click node_background_tasks "https://github.com/nahian-19/project_planner/blob/main/core/tasks.py"
click node_mail "https://github.com/nahian-19/project_planner/blob/main/core/services/mail_service.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_django,node_root_urls,node_settings,node_api_schema toneBlue
class node_users,node_projects,node_project_filters,node_tasks,node_task_filters,node_notifications,node_subscriptions,node_admin_api,node_permissions toneAmber
class node_asgi,node_ws_routing,node_ws_consumers,node_celery,node_background_tasks toneMint
class node_database,node_redis,node_mail,node_stripe toneRose
```

## Components

### Runtime

- [Django HTTP service](https://github.com/nahian-19/project_planner/blob/main/manage.py): runtime · Runs the authenticated REST API and schema UIs. · `manage.py`
- [Root URL routing](https://github.com/nahian-19/project_planner/blob/main/project_planner/urls.py): Django URLs · `project_planner/urls.py`
- [Integration settings](https://github.com/nahian-19/project_planner/blob/main/project_planner/settings.py): Django settings · Configures DRF, Channels, JWT, Redis, Celery, email, and schema tooling. · `project_planner/settings.py`
- [OpenAPI specification](https://github.com/nahian-19/project_planner/blob/main/Project%20Planner%20API.yaml): API contract · `Project Planner API.yaml`

### Django domains

- [Users & identity](https://github.com/nahian-19/project_planner/blob/main/apps/users/views.py): Django app · JWT identity and profile lifecycle. · `apps/users/views.py`
- [Projects & membership](https://github.com/nahian-19/project_planner/blob/main/apps/projects/views.py): Django app · Ownership, memberships, invitations, and project management. · `apps/projects/views.py`
- [Project query filters](https://github.com/nahian-19/project_planner/blob/main/apps/projects/filters.py): DRF filters · `apps/projects/filters.py`
- [Task lifecycle](https://github.com/nahian-19/project_planner/blob/main/apps/tasks/views.py): Django app · Project-associated task updates and status tracking. · `apps/tasks/views.py`
- [Task query filters](https://github.com/nahian-19/project_planner/blob/main/apps/tasks/filters.py): DRF filters · `apps/tasks/filters.py`
- [Notifications API](https://github.com/nahian-19/project_planner/blob/main/apps/notifications/views.py): Django app · Persistent notification HTTP operations. · `apps/notifications/views.py`
- [Subscriptions](https://github.com/nahian-19/project_planner/blob/main/apps/subscriptions/views.py): Django app · Subscription HTTP operations and payment integration. · `apps/subscriptions/views.py`
- [Administrative oversight](https://github.com/nahian-19/project_planner/blob/main/apps/admins/views.py): Django app · `apps/admins/views.py`
- [Shared authorization](https://github.com/nahian-19/project_planner/blob/main/core/permissions.py): permission policy · `core/permissions.py`

### Async & realtime

- [ASGI application](https://github.com/nahian-19/project_planner/blob/main/project_planner/asgi.py): realtime runtime · `project_planner/asgi.py`
- [Notification WebSocket routing](https://github.com/nahian-19/project_planner/blob/main/apps/notifications/routing.py): Channels routing · `apps/notifications/routing.py`
- [Notification consumers](https://github.com/nahian-19/project_planner/blob/main/apps/notifications/consumers.py): Channels consumers · Delivers realtime notifications. · `apps/notifications/consumers.py`
- [Celery worker & beat](https://github.com/nahian-19/project_planner/blob/main/project_planner/celery.py): background runtime · `project_planner/celery.py`
- [Shared background work](https://github.com/nahian-19/project_planner/blob/main/core/tasks.py): Celery tasks · `core/tasks.py`

### External services

- **SQLite database**: primary database
- **Redis**: broker & realtime backing · Backs Celery and the realtime stack.
- [Email delivery](https://github.com/nahian-19/project_planner/blob/main/core/services/mail_service.py): mail service · Sends invitation and lifecycle email. · `core/services/mail_service.py`
- **Stripe**: payment provider

## Connections

- Django HTTP service → Root URL routing: routes requests
- Root URL routing → Users & identity: dispatches
- Root URL routing → Projects & membership: dispatches
- Root URL routing → Task lifecycle: dispatches
- Root URL routing → Notifications API: dispatches
- Root URL routing → Subscriptions: dispatches
- Root URL routing → Administrative oversight: dispatches
- Projects & membership → Project query filters: queries with
- Task lifecycle → Task query filters: queries with
- Projects & membership → Shared authorization: authorizes via
- Task lifecycle → Shared authorization: authorizes via
- Users & identity → SQLite database: persists
- Projects & membership → SQLite database: persists
- Task lifecycle → SQLite database: persists
- Notifications API → SQLite database: persists
- Subscriptions → SQLite database: persists
- Projects & membership → Email delivery: sends invitations
- Users & identity → Email delivery: sends lifecycle email
- Subscriptions → Stripe: payment operations
- ASGI application → Notification WebSocket routing: routes WebSockets
- Notification WebSocket routing → Notification consumers: dispatches
- Notification consumers → Notifications API: delivers persisted notifications
- Notification consumers → Redis: uses realtime backing
- Celery worker & beat → Shared background work: executes
- Celery worker & beat → Redis: uses broker
- Integration settings → Django HTTP service: configures
- Integration settings → ASGI application: configures
- OpenAPI specification → Root URL routing: documents REST surface
