# harrsh-it/planora architecture

> Architecture diagram of the GitHub repository harrsh-it/planora, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-11-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/harrsh-it/planora
- Repository: https://github.com/harrsh-it/planora

## Overview

##### Project type and purpose
- This is a full-stack Django web application (“PartyHub”) for party and event planning.
- It provides user-facing pages (home, booking flow, dashboard), an admin panel, and manages models like PartyType, Service, EventPlan, Booking, Testimonial, and ContactMessage.
- It uses Tailwind CSS for styling and SQLite (development) as its database.

##### File structure
Top-level directories and files:
- config/ – Django settings, URL routing, WSGI entrypoint
- parties/ – core Django app with models.py, views.py, forms.py, admin.py, urls.py, migrations
- templates/ – Jinja-style HTML templates (base + parties/)
- static/ – compiled CSS/JS, images
- media/ – user-uploaded content (party type images, service images, testimonials)
- manage.py – Django CLI entrypoint
- requirements.txt & package.json – Python & Node/Tailwind dependencies
- db.sqlite3 – development database

Architectural patterns/pointers:
- MVC-style (Django’s MTV – Models, Templates, Views)
- Single monolithic service
- Admin interface auto-generated by Django
- Media and static file separation

##### README for additional insights
- Confirms Django stack, Tailwind CSS, SQLite (dev) / PostgreSQL (prod), Gunicorn (suggested), collectstatic for production, DEBUG toggle, ALLOWED_HOSTS, SECRET_KEY, etc.
- Describes auth flow (session-based), features (booking, dashboard), and deployment steps.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Client Layer
    subgraph "Client Layer"
        Browser["Client Browser"]:::client
    end

    %% Reverse Proxy and App Server
    Browser -->|HTTP Request| Nginx["Nginx Reverse Proxy"]:::proxy
    Nginx -->|Forwards Request| Gunicorn["Gunicorn WSGI Server"]:::appserver

    %% Django Application
    subgraph "Django Application"
        Router["URL Router"]:::django
        Settings["Settings Module"]:::django
        WsgiMod["WSGI Module"]:::django
        Manage["Django CLI"]:::config

        subgraph "parties App"
            AppsConf["App Configuration"]:::django
            Models["Models & ORM"]:::django
            Migrations["Database Migrations"]:::django
            Views["Views (Request Handling)"]:::django
            Forms["Forms Logic"]:::django
            AdminReg["Admin Interface Registration"]:::django
            URLApp["App URL Routing"]:::django
        end

        subgraph "Templates"
            BaseTpl["Base Template"]:::template
            PartyTpl["Parties Templates"]:::template
        end
    end

    %% Static and Media Servers
    subgraph "Static and Media"
        StaticSrv["Static File Server"]:::assets
        MediaSrv["Media Server"]:::assets
    end

    %% Database
    subgraph "Database"
        DB["SQLite/PostgreSQL"]:::database
    end

    %% External Services
    subgraph "External Services"
        SMTP["Email SMTP Service"]:::external
        CDN["CDN (optional)"]:::external
    end

    %% Dependencies Files
    Req["requirements.txt"]:::config
    Pkg["package.json"]:::config

    %% Connections
    Gunicorn -->|Calls WSGI| WsgiMod
    WsgiMod -->|Uses Settings| Settings
    WsgiMod -->|Routes to Router| Router
    Router -->|Resolves to App URLs| URLApp
    URLApp -->|Invokes| Views
    Router -->|Admin URL /admin/| AdminReg
    AdminReg -->|CRUD via| Models

    Views -->|Render with| BaseTpl
    Views -->|Render with| PartyTpl
    Views -->|Validate using| Forms
    Views -->|Query/Update| Models
    Models -->|Apply Schema| Migrations
    Models -->|SQL Queries| DB

    Browser -->|Fetch| StaticSrv
    Browser -->|Fetch| MediaSrv

    Views -->|Send Emails| SMTP
    StaticSrv -->|Serve via| CDN
    MediaSrv -->|Serve via| CDN

    %% CLI Entrypoint
    Manage -->|Runs Commands| Settings

    %% Dependency Files Usage
    Settings ---|Dependencies| Req
    Settings ---|Frontend Build| Pkg

    %% Click Events
    click Settings "https://github.com/harrsh-it/planora/blob/main/config/settings.py"
    click Router "https://github.com/harrsh-it/planora/blob/main/config/urls.py"
    click WsgiMod "https://github.com/harrsh-it/planora/blob/main/config/wsgi.py"
    click Manage "https://github.com/harrsh-it/planora/blob/main/manage.py"
    click Models "https://github.com/harrsh-it/planora/blob/main/parties/models.py"
    click Migrations "https://github.com/harrsh-it/planora/tree/main/parties/migrations/"
    click Views "https://github.com/harrsh-it/planora/blob/main/parties/views.py"
    click Forms "https://github.com/harrsh-it/planora/blob/main/parties/forms.py"
    click AdminReg "https://github.com/harrsh-it/planora/blob/main/parties/admin.py"
    click URLApp "https://github.com/harrsh-it/planora/blob/main/parties/urls.py"
    click AppsConf "https://github.com/harrsh-it/planora/blob/main/parties/apps.py"
    click BaseTpl "https://github.com/harrsh-it/planora/blob/main/templates/base.html"
    click PartyTpl "https://github.com/harrsh-it/planora/tree/main/templates/parties/"
    click StaticSrv "https://github.com/harrsh-it/planora/tree/main/static/"
    click MediaSrv "https://github.com/harrsh-it/planora/tree/main/media/"
    click Req "https://github.com/harrsh-it/planora/blob/main/requirements.txt"
    click Pkg "https://github.com/harrsh-it/planora/blob/main/package.json"

    %% Styles
    classDef client fill:#cce5ff,stroke:#000
    classDef proxy fill:#e0e0e0,stroke:#000
    classDef appserver fill:#d4edda,stroke:#000
    classDef django fill:#ffe5b4,stroke:#000
    classDef template fill:#ffd580,stroke:#000
    classDef assets fill:#fff3cd,stroke:#000
    classDef database fill:#d1ecf1,stroke:#000
    classDef external fill:#f5c6cb,stroke:#000
    classDef config fill:#e2e3e5,stroke:#000
```
