# yameogo123/squeleton architecture

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

- Interactive diagram: https://gitdiagram.com/yameogo123/squeleton
- Repository: https://github.com/yameogo123/squeleton

## Overview

##### Project type and purpose
- This repo is not a single runnable application but a set of “cookiecutter” skeleton templates.
– pythonPackage (general Python package)
– fastAPI (Python web-API)
– ML (machine-learning pipeline)
– reactJS (front-end SPA)
– plus an upcoming reactNative template
- Developers invoke cookiecutter on one of these directories to generate a new project, supplying name, author, etc.

##### File structure
- Top-level directories ML/, fastAPI/, pythonPackage/, reactJS/, reactNative/
– Each contains:
- cookiecutter.json (the user-prompt schema)
- hooks/ (pre-prompt.py or similar scripts to customize prompts)
- a subfolder named {{cookiecutter.project_name}} which holds the Jinja2-templated skeleton
- common files in each template: Dockerfile, Makefile, README.md, .gitignore, pyproject.toml or package.json, requirements*.txt, docker-compose.yaml
- Under each template’s skeleton:
– app/ (backend/frontend)
– data/ (raw/interm/processed for ML)
– docs/ (Sphinx or rst-based docs)
– notebooks/ (ML Jupyter notebooks)
– src/ (source code modules, entry-point scripts)
– tests/

##### Key insights from README
- Shows how to bootstrap a new project via:
cookiecutter https://github.com/Yameogo123/squeleton.git --directory="ML"
- Emphasizes prerequisites (node/npm or pip) and installing cookiecutter

a. Components
- User (developer) CLI
- Cookiecutter Engine (local or remote)
- Template Repository (this GitHub repo)
- Selected Template Directory (e.g., ML/)
- Prompt Hooks (pre_prompt.py)
- Jinja2 Template Files (inside {{cookiecutter.project_name}}/)
- Output Project (scaffolded folder tree)
b. Interactions
1. User runs cookiecutter CLI with URL+--directory.
2. Cookiecutter Engine clones or reads the repo.
3. Engine reads cookiecutter.json to gather variables.
4. Engine executes pre-prompt hooks to refine prompts.
5. Engine renders each Jinja2 file in the chosen template, substituting variables.
6. Engine writes the generated project tree to user’s disk.
c. Architectural patterns & principles
- Template-engine pattern (Jinja2 templating)
- Hook-based customization (pre-prompt scripts)
- Directory convention for consistent scaffolding
d. Relevant technologies
- Python & pip (cookiecutter, Sphinx docs)
- Node & npm (if using reactJS or reactNative templates)
- Docker & docker-compose, Makefile for containerized dev
- Jinja2, cookiecutter.json for templating

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% External Actor
    UserCLI["User CLI"]:::external

    %% Core Engine
    CookiecutterEngine["Cookiecutter Engine"]:::engine

    %% Template Repository
    subgraph "Template Repository"
        RepoRoot["./"]:::templateRepo

        ML_dir["ML/"]:::template
        fastAPI_dir["fastAPI/"]:::template
        pythonPackage_dir["pythonPackage/"]:::template
        reactJS_dir["reactJS/"]:::template
        reactNative_dir["reactNative/"]:::template

        ML_json["ML/cookiecutter.json"]:::schema
        ML_hooks["ML/hooks/pre_prompt.py"]:::hook
        ML_skel["ML/{{cookiecutter.project_name}}/"]:::template

        fastAPI_json["fastAPI/cookiecutter.json"]:::schema
        fastAPI_hooks["fastAPI/hooks/pre_prompt.py"]:::hook
        fastAPI_skel["fastAPI/{{cookiecutter.project_name}}/"]:::template

        pythonPackage_json["pythonPackage/cookiecutter.json"]:::schema
        pythonPackage_hooks["pythonPackage/hooks/pre_prompt.py"]:::hook
        pythonPackage_skel["pythonPackage/{{cookiecutter.project_name}}/"]:::template

        reactJS_json["reactJS/cookiecutter.json"]:::schema
        reactJS_skel["reactJS/{{cookiecutter.project_name}}/"]:::template

        reactNative_json["reactNative/cookiecutter.json"]:::schema
        reactNative_skel["reactNative/{{cookiecutter.project_name}}/"]:::template

        %% Directory to artifacts relationships
        ML_dir --> ML_json
        ML_dir --> ML_hooks
        ML_dir --> ML_skel

        fastAPI_dir --> fastAPI_json
        fastAPI_dir --> fastAPI_hooks
        fastAPI_dir --> fastAPI_skel

        pythonPackage_dir --> pythonPackage_json
        pythonPackage_dir --> pythonPackage_hooks
        pythonPackage_dir --> pythonPackage_skel

        reactJS_dir --> reactJS_json
        reactJS_dir --> reactJS_skel

        reactNative_dir --> reactNative_json
        reactNative_dir --> reactNative_skel

        %% Repo root contains directories
        RepoRoot --> ML_dir
        RepoRoot --> fastAPI_dir
        RepoRoot --> pythonPackage_dir
        RepoRoot --> reactJS_dir
        RepoRoot --> reactNative_dir
    end

    %% Output
    OutputProject["Output Project Scaffold"]:::output

    %% Flows
    UserCLI -->|"invokes"| CookiecutterEngine
    CookiecutterEngine -->|"clones/reads"| RepoRoot
    CookiecutterEngine -->|"reads schema"| ML_json
    CookiecutterEngine -->|"reads schema"| fastAPI_json
    CookiecutterEngine -->|"reads schema"| pythonPackage_json
    CookiecutterEngine -->|"reads schema"| reactJS_json
    CookiecutterEngine -->|"reads schema"| reactNative_json

    CookiecutterEngine -->|"executes hooks"| ML_hooks
    CookiecutterEngine -->|"executes hooks"| fastAPI_hooks
    CookiecutterEngine -->|"executes hooks"| pythonPackage_hooks

    CookiecutterEngine -->|"renders templates"| ML_skel
    CookiecutterEngine -->|"renders templates"| fastAPI_skel
    CookiecutterEngine -->|"renders templates"| pythonPackage_skel
    CookiecutterEngine -->|"renders templates"| reactJS_skel
    CookiecutterEngine -->|"renders templates"| reactNative_skel

    CookiecutterEngine -->|"writes output"| OutputProject

    %% Click Events
    click RepoRoot "https://github.com/yameogo123/squeleton/tree/main/./"
    click ML_dir "https://github.com/yameogo123/squeleton/tree/main/ML/"
    click ML_json "https://github.com/yameogo123/squeleton/blob/main/ML/cookiecutter.json"
    click ML_hooks "https://github.com/yameogo123/squeleton/blob/main/ML/hooks/pre_prompt.py"
    click ML_skel "https://github.com/yameogo123/squeleton/tree/main/ML/{{cookiecutter.project_name}}/"
    click fastAPI_dir "https://github.com/yameogo123/squeleton/tree/main/fastAPI/"
    click fastAPI_json "https://github.com/yameogo123/squeleton/blob/main/fastAPI/cookiecutter.json"
    click fastAPI_hooks "https://github.com/yameogo123/squeleton/blob/main/fastAPI/hooks/pre_prompt.py"
    click fastAPI_skel "https://github.com/yameogo123/squeleton/tree/main/fastAPI/{{cookiecutter.project_name}}/"
    click pythonPackage_dir "https://github.com/yameogo123/squeleton/tree/main/pythonPackage/"
    click pythonPackage_json "https://github.com/yameogo123/squeleton/blob/main/pythonPackage/cookiecutter.json"
    click pythonPackage_hooks "https://github.com/yameogo123/squeleton/blob/main/pythonPackage/hooks/pre_prompt.py"
    click pythonPackage_skel "https://github.com/yameogo123/squeleton/tree/main/pythonPackage/{{cookiecutter.project_name}}/"
    click reactJS_dir "https://github.com/yameogo123/squeleton/tree/main/reactJS/"
    click reactJS_json "https://github.com/yameogo123/squeleton/blob/main/reactJS/cookiecutter.json"
    click reactJS_skel "https://github.com/yameogo123/squeleton/tree/main/reactJS/{{cookiecutter.project_name}}/"
    click reactNative_dir "https://github.com/yameogo123/squeleton/tree/main/reactNative/"
    click reactNative_json "https://github.com/yameogo123/squeleton/blob/main/reactNative/cookiecutter.json"
    click reactNative_skel "https://github.com/yameogo123/squeleton/tree/main/reactNative/{{cookiecutter.project_name}}/"

    %% Styles
    classDef external fill:#87CEFA,stroke:#000,stroke-width:1px
    classDef engine fill:#8FBC8F,stroke:#000,stroke-width:1px
    classDef templateRepo fill:#ADD8E6,stroke:#000,stroke-width:1px
    classDef template fill:#FFA500,stroke:#000,stroke-width:1px
    classDef schema fill:#FFD700,stroke:#000,stroke-width:1px
    classDef hook fill:#FF8C00,stroke:#000,stroke-width:1px
    classDef output fill:#D3D3D3,stroke:#000,stroke-width:1px
```
