# ajithkumart445/portfolio architecture

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

- Interactive diagram: https://gitdiagram.com/ajithkumart445/portfolio
- Repository: https://github.com/ajithkumart445/portfolio

## Overview

##### Project type and purpose
- This is a full-stack web application built with Django (Python) that serves as a personal portfolio site.
- It provides pages for index, projects, blogs, certificates, resumes, and handles media uploads.

##### File structure
Top-level:
- manage.py – entry point for Django commands
- db.sqlite3 – development database
- package.json / node_modules / tailwind.config.js / postcss.config.js – Node.js-based build toolchain for compiling Tailwind CSS
- requirements.txt – Python dependencies
- uploads/ – user-uploaded media files

Directories:
- portfolio/ – Django “project” containing settings.py, URL router, ASGI/WSGI entrypoints
- home/ – a Django “app” containing:
– models.py (data layer)
– views.py & urls.py (controllers/routes)
– templates/ (HTML presentation layer)
– static/ (precompiled assets: CSS, JS, images, resume PDF)
– migrations/ (database schema evolution)

##### README
- Bare-bones, only a title. All insights must come from the file layout and naming conventions.

a. Main components
1. Client (Browser)
2. Static Asset Server (Django’s collectstatic or CDN)
3. Django Application Server (WSGI/ASGI)
4. SQLite Database
5. Node.js Build Pipeline (Tailwind CSS / PostCSS)
6. File Storage (uploads folder)

b. Relationships & interactions
- Browser → HTTP requests → Django App Server
- Django App Server ↔ ORM → SQLite Database
- Django App Server → serves dynamic pages (templates)
- Browser → GET static assets (CSS/JS/images) from Static Asset Server
- Node Build Pipeline → produces CSS/JS in home/static → collected → served
- Browser → POST file upload → Django → saves to uploads/ → served back as media

c. Architectural patterns & design principles
- Django’s MVT (Model-View-Template) pattern
- Clear separation of concerns:
- Models for data
- Views for business logic + routing
- Templates for presentation
- Static assets managed separately via a build tool
- Configuration-as-code: tailwind.config.js, postcss.config.js

d. Key technologies / frameworks / libraries
- Python 3.x, Django
- SQLite (dev DB)
- Node.js, npm, Tailwind CSS, PostCSS
- HTML5, CSS3, JavaScript

## Diagram (Mermaid)

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

    %% Node.js Build Pipeline
    subgraph "Node.js Build Pipeline" 
        direction TB
        PackageJSON["package.json"]:::build
        PackageLock["package-lock.json"]:::build
        NodeModules["node_modules/"]:::build
        TailwindConfigRoot["tailwind.config.js"]:::build
        PostCSSConfig["postcss.config.js"]:::build
        PackageJSON -->|"defines dependencies"| NodeModules
        PackageJSON --> TailwindConfigRoot
        PackageJSON --> PostCSSConfig
        NodeModules -->|"build CSS/JS"| HomeStatic
    end

    %% Static Assets in project
    subgraph "Static Assets (home/static)" 
        direction TB
        StylesCSS["styles.css"]:::storage
        AnimationsCSS["animations.css"]:::storage
        TailwindCSS["tailwind.css"]:::storage
        RoleScrollJS["role_scroll.js"]:::storage
        TypewriterJS["typewriter.js"]:::storage
        StaticTailwindConfig["tailwind.config.js"]:::storage
        ImagesDir["images/"]:::storage
        ResumePDF["Resume.pdf"]:::storage
    end

    %% Static Asset Server
    StaticServer["Static Asset Server / CDN"]:::server

    %% Django Application Server
    subgraph "Django App Server (WSGI/ASGI)" 
        direction TB
        ManagePy["manage.py"]:::server
        subgraph "Project Configuration"
            direction TB
            Settings["settings.py"]:::server
            URLsProject["portfolio/urls.py"]:::server
            ASGI["asgi.py"]:::server
            WSGI["wsgi.py"]:::server
        end
        subgraph "URL Routing"
            direction TB
            URLsApp["home/urls.py"]:::server
        end
        subgraph "Views (Controllers)"
            direction TB
            Views["home/views.py"]:::server
        end
        subgraph "Models / ORM"
            direction TB
            Models["home/models.py"]:::server
            Migrations["home/migrations/"]:::server
        end
        subgraph "Templates"
            direction TB
            IndexHTML["index.html"]:::server
            ProjectsHTML["projects.html"]:::server
            BlogsHTML["blogs.html"]:::server
            CertificateHTML["certificate.html"]:::server
            MainHTML["main.html"]:::server
        end
        ManagePy --> Settings
        Settings --> URLsProject
        Settings --> ASGI
        Settings --> WSGI
        URLsProject --> URLsApp
        URLsApp --> Views
        Views --> Models
        Models --> Migrations
        Views --> IndexHTML
        Views --> ProjectsHTML
        Views --> BlogsHTML
        Views --> CertificateHTML
        Views --> MainHTML
    end

    %% Database
    DB["db.sqlite3"]:::db

    %% Upload Storage
    Uploads["uploads/"]:::storage

    %% Dependencies
    Requirements["requirements.txt"]:::server

    %% Relationships
    Browser -->|"HTTP requests"| URLsApp
    Views -->|"renders"| Templates
    URLsApp -->|"invokes"| Views
    Models -->|"ORM queries"| DB
    URLsApp -->|"routes to"| Views
    DB -->|"returns data"| Models
    Browser -->|"GET CSS/JS/Images"| StaticServer
    StaticServer -->|"serves static assets"| Browser
    HomeStatic["home/static"]:::storage
    NodeModules --> HomeStatic
    HomeStatic --> StaticServer
    Browser -->|"POST file upload"| Views
    Views -->|"save media"| Uploads
    Browser -->|"GET media files"| Uploads

    %% Click Events
    click PackageJSON "https://github.com/ajithkumart445/portfolio/blob/main/package.json"
    click PackageLock "https://github.com/ajithkumart445/portfolio/blob/main/package-lock.json"
    click NodeModules "https://github.com/ajithkumart445/portfolio/tree/main/node_modules/"
    click TailwindConfigRoot "https://github.com/ajithkumart445/portfolio/blob/main/tailwind.config.js"
    click PostCSSConfig "https://github.com/ajithkumart445/portfolio/blob/main/postcss.config.js"
    click StylesCSS "https://github.com/ajithkumart445/portfolio/blob/main/home/static/css/styles.css"
    click AnimationsCSS "https://github.com/ajithkumart445/portfolio/blob/main/home/static/css/animations.css"
    click TailwindCSS "https://github.com/ajithkumart445/portfolio/blob/main/home/static/css/tailwind.css"
    click RoleScrollJS "https://github.com/ajithkumart445/portfolio/blob/main/home/static/js/role_scroll.js"
    click TypewriterJS "https://github.com/ajithkumart445/portfolio/blob/main/home/static/js/typewriter.js"
    click StaticTailwindConfig "https://github.com/ajithkumart445/portfolio/blob/main/home/static/js/tailwind.config.js"
    click ImagesDir "https://github.com/ajithkumart445/portfolio/tree/main/home/static/images/"
    click ResumePDF "https://github.com/ajithkumart445/portfolio/blob/main/home/static/Resume.pdf"
    click ManagePy "https://github.com/ajithkumart445/portfolio/blob/main/manage.py"
    click Settings "https://github.com/ajithkumart445/portfolio/blob/main/portfolio/settings.py"
    click URLsProject "https://github.com/ajithkumart445/portfolio/blob/main/portfolio/urls.py"
    click ASGI "https://github.com/ajithkumart445/portfolio/blob/main/portfolio/asgi.py"
    click WSGI "https://github.com/ajithkumart445/portfolio/blob/main/portfolio/wsgi.py"
    click URLsApp "https://github.com/ajithkumart445/portfolio/blob/main/home/urls.py"
    click Views "https://github.com/ajithkumart445/portfolio/blob/main/home/views.py"
    click Models "https://github.com/ajithkumart445/portfolio/blob/main/home/models.py"
    click Migrations "https://github.com/ajithkumart445/portfolio/tree/main/home/migrations/"
    click IndexHTML "https://github.com/ajithkumart445/portfolio/blob/main/home/templates/index.html"
    click ProjectsHTML "https://github.com/ajithkumart445/portfolio/blob/main/home/templates/projects.html"
    click BlogsHTML "https://github.com/ajithkumart445/portfolio/blob/main/home/templates/blogs.html"
    click CertificateHTML "https://github.com/ajithkumart445/portfolio/blob/main/home/templates/certificate.html"
    click MainHTML "https://github.com/ajithkumart445/portfolio/blob/main/home/templates/main.html"
    click DB "https://github.com/ajithkumart445/portfolio/blob/main/db.sqlite3"
    click Uploads "https://github.com/ajithkumart445/portfolio/tree/main/uploads/"
    click Requirements "https://github.com/ajithkumart445/portfolio/blob/main/requirements.txt"

    %% Styles
    classDef client fill:#AFE1FF,stroke:#0066CC,color:#000;
    classDef server fill:#C8F7C5,stroke:#228B22,color:#000;
    classDef build fill:#FFD8B1,stroke:#FF8C00,color:#000;
    classDef storage fill:#E0E0E0,stroke:#7D7D7D,color:#000;
    classDef db fill:#C8F7C5,stroke:#228B22,color:#000;
```
