# saydigital/rocco architecture

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

- Interactive diagram: https://gitdiagram.com/saydigital/rocco
- Repository: https://github.com/saydigital/rocco

## Overview

##### Main Components

a) Template Generation Layer:
- CookieCutter Engine
- Template Configuration (cookiecutter.json)
- Generated Project Structure

b) Docker Environment Components:
- Odoo Container
- PostgreSQL Container
- PgAdmin4 Container
- Volume Mounts
- Network Layer

c) Tools and Utilities:
- Database Management Scripts
- Filestore Management
- Addons Path Generator
- Submodules Processor

##### Specific Elements

a) Input Flow:
- User Input → CookieCutter Engine → Template Generation

b) Docker Services (use container symbols):
- Odoo Container ←→ PostgreSQL Container
- ↕
- PgAdmin4 Container

c) Tools Integration (use gear symbols):
- db-safe-for-dev.sh
- restore-db.sh
- restore-filestore.sh

d) Configuration Management:
- odoo.conf → Addons Path Generator → Final Configuration

##### Important Relationships to Highlight

- How the GitHub integration works for submodules
- Connection between Odoo and its filestore
- Relationship between PgAdmin4 and PostgreSQL
- How the tools interact with the running containers

- Host ←→ Container Volumes:
- Odoo filestore
- PostgreSQL data
- Custom addons

##### Notes for Implementation

- Use standardized container symbols from the C4 model or similar notation
- Annotations for important configuration points
- Notes about scalability and potential extension points

Remember to include a small section showing potential customization points, as the README mentions that users might want to modify the template for their specific needs.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles and Classes
    classDef container fill:#b3d1ff,stroke:#333,stroke-width:2px
    classDef config fill:#90EE90,stroke:#333,stroke-width:2px
    classDef tool fill:#FFA500,stroke:#333,stroke-width:2px
    classDef storage fill:#D3D3D3,stroke:#333,stroke-width:2px
    classDef network fill:#E6E6FA,stroke:#333,stroke-width:2px

    %% Input & Configuration Layer
    subgraph Input
        UserInput[User Input]
        CookieCutter[CookieCutter Engine]
        Config["Configuration"]:::config
    end

    %% Template Generation Layer
    subgraph Generation
        TemplateGen[Template Generation]
        SubProcessor["Submodules Processor"]:::tool
        AddonsGen["Addons Path Generator"]:::tool
    end

    %% Docker Environment Layer
    subgraph DockerEnv
        OdooContainer["Odoo Container"]:::container
        PostgresContainer["PostgreSQL Container"]:::container
        PgAdminContainer["PgAdmin4 Container"]:::container
    end

    %% Storage Layer
    subgraph Storage
        FileStore["Odoo Filestore"]:::storage
        PostgresData["PostgreSQL Data"]:::storage
        CustomAddons["Custom Addons"]:::storage
    end

    %% Tools Layer
    subgraph Tools
        DBSafeDev["db-safe-for-dev.sh"]:::tool
        RestoreDB["restore-db.sh"]:::tool
        RestoreFS["restore-filestore.sh"]:::tool
    end

    %% Relationships
    UserInput --> CookieCutter
    CookieCutter --> Config
    Config --> TemplateGen
    TemplateGen --> SubProcessor
    TemplateGen --> AddonsGen
    
    SubProcessor --> CustomAddons
    AddonsGen --> OdooContainer
    
    OdooContainer <--> PostgresContainer
    PostgresContainer <--> PgAdminContainer
    
    OdooContainer <--> FileStore
    PostgresContainer <--> PostgresData
    
    DBSafeDev --> PostgresContainer
    RestoreDB --> PostgresContainer
    RestoreFS --> FileStore

    %% Click Events
    click Config "https://github.com/saydigital/rocco/blob/master/cookiecutter.json"
    click OdooContainer "https://github.com/saydigital/rocco/tree/master/{{cookiecutter.github_repo_name}}/Dockerfile"
    click AddonsGen "https://github.com/saydigital/rocco/blob/master/{{cookiecutter.github_repo_name}}/bin/addons_path_generator.py"
    click SubProcessor "https://github.com/saydigital/rocco/blob/master/{{cookiecutter.github_repo_name}}/bin/submodules_processor.py"
    click DBSafeDev "https://github.com/saydigital/rocco/blob/master/{{cookiecutter.github_repo_name}}/tools/db-safe-for-dev.sh"
    click RestoreDB "https://github.com/saydigital/rocco/blob/master/{{cookiecutter.github_repo_name}}/tools/restore-db.sh"
    click RestoreFS "https://github.com/saydigital/rocco/blob/master/{{cookiecutter.github_repo_name}}/tools/restore-filestore.sh"
    click PgAdminContainer "https://github.com/saydigital/rocco/tree/master/{{cookiecutter.github_repo_name}}/etc/pgadmin4/"

    %% Legend
    subgraph Legend
        L1["Container"]:::container
        L2["Configuration"]:::config
        L3["Tool/Script"]:::tool
        L4["Storage"]:::storage
        L5["Network Component"]:::network
    end
```
