# 747er/codyscapes architecture

> Architecture diagram of the GitHub repository 747er/codyscapes, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/747er/codyscapes
- Repository: https://github.com/747er/codyscapes

## Overview

##### Main Components

a) Frontend Layer:
- Static Content Delivery (HTML, CSS, JS)
- Three main application modules:
- Gallery Module
- Live Map Module
- Personal/About Module
- Template System (Django Templates)

b) Backend Layer:
- Django Web Framework
- URL Routing System
- Core Django Apps:
- Photos App (main photography functionality)
- Personal App (about/profile information)
- Blog App
- Gallery App

c) Data Layer:
- Database (SQLite in development, presumably PostgreSQL in production on Heroku)
- Static Files Storage (for images and assets)

**[Client Layer]**
- ↕
**[Application Layer]**
- ↕
**[Data Layer]**

##### Component Relationships

- HTTP/HTTPS requests between client and server
- Database queries between apps and database
- Static file serving paths
- Template rendering flow

##### Specific Implementation Details

Key architectural elements:
**[Frontend Static Files]**
- CSS (Bootstrap + Custom styles)
- JavaScript
- Images

**[Django Apps]**
- Photos (Main photography features)
- Personal (About/Profile pages)
- Blog
- Gallery

**[Static File Handling]**
- Development: Django staticfiles
- Production: Heroku static files

##### Specific Elements to Label

- URL routing paths
- Template inheritance relationships
- Static file serving paths
- Database relationships between models
- Admin interface access points

##### Implementation Notes

- Use standard UML notation where applicable
- Annotations for key configuration points
- Development vs production differences
- Security boundaries

##### The database schema relationships

Remember to maintain a balance between showing enough detail to understand the system while keeping it clear and readable. Focus on the photography-specific features while still showing the underlying Django architecture.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        Browser["Web Browser"]
        StaticContent["Static Content"]
    end

    subgraph "Application Layer"
        direction TB
        Django["Django Framework"]:::backend
        click Django "https://github.com/747er/codyscapes/blob/master/codyscapes/settings.py"

        subgraph "URL Routing"
            URLRouter["URL Router"]:::backend
            click URLRouter "https://github.com/747er/codyscapes/blob/master/codyscapes/urls.py"
        end

        subgraph "Django Apps"
            direction TB
            Photos["Photos App"]:::backend
            click Photos "https://github.com/747er/codyscapes/tree/master/photos/"
            Personal["Personal App"]:::backend
            click Personal "https://github.com/747er/codyscapes/tree/master/personal/"
            Blog["Blog App"]:::backend
            click Blog "https://github.com/747er/codyscapes/tree/master/blog/"
            Gallery["Gallery App"]:::backend
            click Gallery "https://github.com/747er/codyscapes/tree/master/gallery/"
        end

        subgraph "App Components"
            direction TB
            Models["Models"]:::backend
            Views["Views"]:::backend
            Templates["Templates"]:::frontend
            click Templates "https://github.com/747er/codyscapes/tree/master/codyscapes/templates/"
        end
    end

    subgraph "Data Layer"
        Database[(SQLite/PostgreSQL)]:::database
        click Database "https://github.com/747er/codyscapes/blob/master/db.sqlite3"
        StaticFiles["Static Files Storage"]:::storage
        click StaticFiles "https://github.com/747er/codyscapes/tree/master/codyscapes/static/"
        MediaFiles["Media Files"]:::storage
    end

    Browser --> Django
    StaticContent --> Browser
    Django --> URLRouter
    URLRouter --> Photos
    URLRouter --> Personal
    URLRouter --> Blog
    URLRouter --> Gallery

    Photos --> Models
    Photos --> Views
    Photos --> Templates
    Personal --> Models
    Personal --> Views
    Personal --> Templates
    Blog --> Models
    Blog --> Views
    Blog --> Templates
    Gallery --> Models
    Gallery --> Views
    Gallery --> Templates

    Models --> Database
    Views --> StaticFiles
    Views --> MediaFiles

    classDef backend fill:#90EE90,stroke:#333,stroke-width:2px
    classDef frontend fill:#87CEEB,stroke:#333,stroke-width:2px
    classDef database fill:#FFD700,stroke:#333,stroke-width:2px
    classDef storage fill:#DEB887,stroke:#333,stroke-width:2px

    %% Legend
    subgraph Legend
        BackendL["Backend"]:::backend
        FrontendL["Frontend"]:::frontend
        DatabaseL["Database"]:::database
        StorageL["Storage"]:::storage
    end
```
