# japipe05/jave_smart_yml architecture

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

- Interactive diagram: https://gitdiagram.com/japipe05/jave_smart_yml
- Repository: https://github.com/japipe05/jave_smart_yml

## Overview

##### Project type and purpose
- This is a full-stack web application called “Smart YML” that generates deployment templates via AI.
- Frontend: Next.js 15 (React-based, TypeScript).
- Backend: Python FastAPI providing REST endpoints.
- Database: Multi-DB support (Postgres, MongoDB, Cassandra).
- Deployment: Dockerized services orchestrated via Docker Compose.

##### File structure
- Top level:
- backend/ – Python FastAPI application with routes, services, database adapters.
- frontend/ – Next.js app using the App Router, hooks, services, Tailwind CSS.
- docker-compose.yml & compose.prod.yaml – orchestration of containers.
- backend/app/
- config – application settings.
- database – connectors for Postgres, MongoDB, Cassandra.
- models – Pydantic/ORM models (file metadata, prompt models).
- routes – auth, file upload, prompt endpoints.
- services – business logic (fileService, promptService, GitHub integration).
- utils – helpers.
- frontend/src/
- app/(auth) – login/register pages.
- app/chatweb – primary chat interface.
- hooks – custom React hooks.
- services/api.ts – HTTP client to backend.
- styles – Tailwind & global CSS.

##### README for additional insights
- Emphasizes Docker support and two separate modules.
- Mentions best practices: clear separation of concerns, .env configuration.

##### Essential architectural elements to capture
- Frontend ↔ Backend boundary.
- Backend internal layers (routes, services, database adapters) can be shown in a zoomed-in inset.
- Multi-database support as parallel data stores.
- External integrations (GitHub).
- Container orchestration boundary (Docker Compose).

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Docker Compose Network"
        style DockerComposeNetwork stroke-dasharray: 5 5
        Next["Next.js Frontend"]:::container
        Backend["FastAPI Backend"]:::container
        Postgres["PostgreSQL"]:::db
        Mongo["MongoDB"]:::db
        Cassandra["Cassandra"]:::db
        Compose["Docker Compose"]:::external
    end

    Browser["User Browser"]:::external
    GitHub["GitHub API"]:::external
    AI["AI/ML Engine"]:::external

    Browser -->|"HTTP/HTTPS"| Next
    Next -->|"REST API (HTTP)"| Backend
    Backend -->|"SQL (PostgreSQL)"| Postgres
    Backend -->|"MongoDB Wire Protocol"| Mongo
    Backend -->|"CQL"| Cassandra
    Backend -->|"GitHub REST API"| GitHub
    Backend -->|"HTTP/HTTPS"| AI

    click Next "https://github.com/japipe05/jave_smart_yml/tree/main/frontend/"
    click Next "https://github.com/japipe05/jave_smart_yml/tree/main/frontend/Dockerfile"
    click Next "https://github.com/japipe05/jave_smart_yml/blob/main/frontend/src/app/layout.tsx"
    click Next "https://github.com/japipe05/jave_smart_yml/blob/main/frontend/src/app/page.tsx"
    click Next "https://github.com/japipe05/jave_smart_yml/blob/main/frontend/src/app/(auth)/login/page.tsx"
    click Next "https://github.com/japipe05/jave_smart_yml/blob/main/frontend/src/app/(auth)/register/page.tsx"
    click Next "https://github.com/japipe05/jave_smart_yml/blob/main/frontend/src/app/chatweb/page.tsx"
    click Next "https://github.com/japipe05/jave_smart_yml/blob/main/frontend/next.config.ts"
    click Next "https://github.com/japipe05/jave_smart_yml/blob/main/frontend/tailwind.config.ts"
    click Next "https://github.com/japipe05/jave_smart_yml/blob/main/frontend/tsconfig.json"
    click Backend "https://github.com/japipe05/jave_smart_yml/tree/main/backend/"
    click Backend "https://github.com/japipe05/jave_smart_yml/tree/main/backend/Dockerfile"
    click Backend "https://github.com/japipe05/jave_smart_yml/blob/main/backend/main.py"
    click Backend "https://github.com/japipe05/jave_smart_yml/blob/main/backend/requirements.txt"
    click Backend "https://github.com/japipe05/jave_smart_yml/blob/main/backend/app/__init__.py"
    click Postgres "https://github.com/japipe05/jave_smart_yml/blob/main/backend/app/database/postgres.py"
    click Mongo "https://github.com/japipe05/jave_smart_yml/blob/main/backend/app/database/mongo.py"
    click Cassandra "https://github.com/japipe05/jave_smart_yml/blob/main/backend/app/database/cassandra.py"
    click Compose "https://github.com/japipe05/jave_smart_yml/blob/main/docker-compose.yml"
    click Compose "https://github.com/japipe05/jave_smart_yml/blob/main/compose.prod.yaml"

    classDef container fill:#f0f8ff,stroke:#4682b4,stroke-width:1px
    classDef db fill:#e6e6fa,stroke:#9370db,stroke-width:1px
    classDef external fill:#fffacd,stroke:#daa520,stroke-width:1px
```
