djangoplay-web / Architecture / DjangoPlay — Application Architecture
DocsDjangoPlay WebArchitectureDjangoPlay — Application Architecture

DjangoPlay — Application Architecture

DjangoPlay follows a layered application architecture. Incoming requests enter through the middleware and policy boundary, are routed to Django web views or DRF APIs, and then reach the application...

2 min readApplies to v1.2.2
On this page ▾
  1. Architecture
  2. Request Flow
  3. Architectural Responsibilities
  4. Architectural Principle

Application services coordinate business workflows and interact with domain models, asynchronous processing, and external integrations.

Architecture

Request Flow

text

                  DJANGOPLAY WEB APPLICATION
                             │
                             ▼
                       URL ROUTING
                         /urlconf
                             │
                 ┌───────────┴───────────┐
                 ▼                       ▼
          Django Web Views          DRF APIs
          Templates / UI            ViewSets / Views
                 │                       │
                 └───────────┬───────────┘
                             ▼
                  MIDDLEWARE / POLICIES
                  • Authentication
                  • Security / Permissions
                  • Request Context
                             │
                             ▼
                       APP SERVICES
                  • Business Logic
                  • Workflows
                  • Validation
                  • Integration Orchestration
                             │
              ┌──────────────┼──────────────┐
              ▼              ▼              ▼
        DJANGO MODELS     CELERY TASKS    INTEGRATIONS
              │              │              │
              ▼              ▼              ▼
         PostgreSQL        Redis       External APIs

Architectural Responsibilities

Layer Responsibility
Middleware / Policies Authentication, security, permissions, and request context
URL Routing Maps incoming requests to the appropriate application endpoint
Django Web Views Server-rendered web UI and Django view handling
DRF APIs REST API endpoints implemented through DRF views and ViewSets
Application Services Business logic, workflows, validation, and integration orchestration
Django Models Domain data, relationships, and persistence-facing application state
Celery Tasks Asynchronous and background processing
Integrations / Services Communication with external services through integration boundaries
PostgreSQL Persistent relational application data
Redis Cache, sessions, and Celery-related infrastructure
External APIs Third-party services consumed through integration boundaries

Architectural Principle

The presentation layer should not contain core business workflows.

Django views and DRF APIs delegate application behavior to the service layer. Services coordinate domain models, asynchronous work, and external integrations.

This keeps the application modular and makes individual integration or infrastructure components replaceable without coupling them directly to the presentation layer.