# atharva2884/devops architecture

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

- Interactive diagram: https://gitdiagram.com/atharva2884/devops
- Repository: https://github.com/atharva2884/devops

## Overview

##### Project type and purpose
- This is a small full‑stack web application built with Flask (Python), serving a simple UI (two HTML pages in `templates/` and a CSS file in `static/`), persisting feedback data in a SQLite database (`feedback.db`), and packaged for containerized deployment. It includes a minimal CI/CD setup via `Jenkinsfile` and is composable via `docker-compose.yml`.

##### File structure
- Top‑level files:
- `app.py`: the Flask application entry point, defines routes for `/` (index) and `/dashboard`.
- `requirements.txt`: Python dependencies
- `feedback.db`, `feedback_export.csv`: SQLite data store and export snapshot
- `Dockerfile`, `docker-compose.yml`: container build and orchestration
- `Jenkinsfile`: CI/CD pipeline definition
- `test_app.py`: unit tests for Flask routes
- Directories:
- `templates/`: Jinja2 HTML templates
- `static/`: CSS and other static assets

##### (empty) README for additional insights
- Since the README is blank, we infer architecture solely from the file layout: a monolithic Flask service that renders both the frontend and backend, reading/writing to a SQLite file, deployed in a Docker container, validated by unit tests in Jenkins, and optionally composed via Docker Compose.

- “Static Server” → serves `/static/style.css`
- “Template Renderer” → uses `templates/index.html` and `dashboard.html`

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% User Interaction
    Browser("User Web Browser"):::external
    Browser -->|HTTP GET/POST| FlaskService

    %% Flask Container
    subgraph "Flask Service Container"
        direction TB
        FlaskService["Flask Service\n(app.py)"]:::service
        StaticServer["Static Asset Server\n(static/)"]:::service
        TemplateRenderer["Template Renderer\n(templates/)"]:::service
        FlaskService -->|serves static files| StaticServer
        FlaskService -->|renders templates| TemplateRenderer
    end

    %% Database
    FlaskService -->|reads/writes| SQLiteDB
    SQLiteDB["SQLite Database\n(feedback.db)"]:::db
    SQLiteDB -->|export snapshot| DBExport["DB Export Snapshot\n(feedback_export.csv)"]:::db

    %% CI/CD and Deployment
    subgraph "CI/CD & Deployment"
        direction TB
        GitRepo("Git Repository"):::external
        Jenkins("Jenkins CI\n(Jenkinsfile)"):::devops
        Tests("Unit Tests\n(test_app.py)"):::devops
        DockerBuild("Docker Build\n(Dockerfile)"):::devops
        DockerReg("Docker Registry"):::devops
        DockerCompose("Docker Compose\n(docker-compose.yml)"):::devops

        GitRepo -->|push| Jenkins
        Jenkins -->|runs tests| Tests
        Jenkins -->|builds image| DockerBuild
        DockerBuild -->|pushes image| DockerReg
        DockerReg -->|deploys| DockerCompose
        DockerCompose -->|orchestrates| FlaskService
    end

    %% Click Events
    click FlaskService "https://github.com/atharva2884/devops/blob/main/app.py"
    click StaticServer "https://github.com/atharva2884/devops/tree/main/static/"
    click TemplateRenderer "https://github.com/atharva2884/devops/tree/main/templates/"
    click SQLiteDB "https://github.com/atharva2884/devops/blob/main/feedback.db"
    click DBExport "https://github.com/atharva2884/devops/blob/main/feedback_export.csv"
    click DockerBuild "https://github.com/atharva2884/devops/tree/main/Dockerfile"
    click DockerCompose "https://github.com/atharva2884/devops/blob/main/docker-compose.yml"
    click Jenkins "https://github.com/atharva2884/devops/tree/main/Jenkinsfile"
    click Tests "https://github.com/atharva2884/devops/blob/main/test_app.py"

    %% Styles
    classDef service fill:#ADD8E6,stroke:#000,stroke-width:1px
    classDef db fill:#90EE90,stroke:#000,stroke-width:1px
    classDef external fill:#FFD700,stroke:#000,stroke-width:1px
    classDef devops fill:#FFA500,stroke:#000,stroke-width:1px
```
