# ashintv/mini_project_work architecture

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

- Interactive diagram: https://gitdiagram.com/ashintv/mini_project_work
- Repository: https://github.com/ashintv/mini_project_work

## Overview

##### Project type and purpose
- This is a Flask-based full-stack web application (“mini_project_work”) that lets users register, log in, create and join meetings, view a dashboard, and uses a prediction module for some meeting-related inference.
- Key indicators:
- app.py and App/routes.py: Flask entry-point and route handlers
- App/templates & App/static: server-rendered HTML and assets
- migrations/ + instance/user.db: SQLAlchemy/Alembic-powered SQLite persistence
- App/prediction.py: a separate ML or rule-based prediction component

##### File structure
Top-level
- app.py – Flask app launcher
- requirements.txt – Python dependencies
- instance/user.db – SQLite file (per-instance config)
- migrations/ – Alembic DB migrations
App/ package
- forms.py – WTForms definitions for register/login/join/create forms
- model.py – SQLAlchemy ORM models for User, Meeting, etc.
- prediction.py – prediction logic (e.g., meeting outcome, scheduling suggestion)
- routes.py – Flask view functions (controllers)
- static/ – CSS/JS/images
- templates/ – Jinja2 HTML templates

##### README
- README.md only contains the project title. No further architectural notes. We infer architecture from code.

##### Main components
a. Client browser
b. Flask Web Server
- app.py (Flask factory or app instance)
- App/routes.py (controllers)
- App/forms.py (form validation)
- App/model.py (data layer via SQLAlchemy)
- App/prediction.py (ML/inference service)
c. Database
- SQLite (instance/user.db) managed/migrated via Alembic
d. External libraries/services
- WTForms, SQLAlchemy, Alembic

##### Relationships and interactions
- Client → HTTP requests → Flask routes →
- form validation (forms.py)
- business logic & model CRUD (model.py)
- optional prediction call (prediction.py)
- render templates or redirect
- Flask → Database (ORM queries)
- Migrations manage schema versioning

##### Architectural patterns & design principles
- MVC-style separation:
- Model (model.py + migrations)
- View (templates + static assets)
- Controller (routes.py + forms.py)
- Single codebase (no microservices)
- Optional ML component co-located in same service
- Layered: presentation → business logic → data access

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% External Browser
    Browser(["Client Browser"]):::external

    %% Flask App Entry Point
    FlaskApp["Flask Web Server\n(app.py)"]:::app
    click FlaskApp "https://github.com/ashintv/mini_project_work/blob/main/app.py"

    Browser -->|"HTTP request (GET/POST)"| FlaskApp

    subgraph "Application Tier" 
        direction TB
        Routes["Routes & Controllers\n(App/routes.py)"]:::app
        click Routes "https://github.com/ashintv/mini_project_work/blob/main/App/routes.py"

        Forms["Form Validation\n(App/forms.py)"]:::app
        click Forms "https://github.com/ashintv/mini_project_work/blob/main/App/forms.py"

        Prediction["Prediction Module\n(App/prediction.py)"]:::app
        click Prediction "https://github.com/ashintv/mini_project_work/blob/main/App/prediction.py"

        Models["ORM Models\n(App/model.py)"]:::data
        click Models "https://github.com/ashintv/mini_project_work/blob/main/App/model.py"

        subgraph "Migrations\n(migrations/)" 
            direction TB
            AlembicIni["alembic.ini"]:::data
            click AlembicIni "https://github.com/ashintv/mini_project_work/blob/main/migrations/alembic.ini"
            EnvPy["env.py"]:::data
            click EnvPy "https://github.com/ashintv/mini_project_work/blob/main/migrations/env.py"
            ScriptMako["script.py.mako"]:::data
            click ScriptMako "https://github.com/ashintv/mini_project_work/blob/main/migrations/script.py.mako"
            subgraph "versions/"
                direction TB
                Ver1["8c2b5f551a6e_meeting_status_update.py"]:::data
                click Ver1 "https://github.com/ashintv/mini_project_work/blob/main/migrations/versions/8c2b5f551a6e_meeting_status_update.py"
                Ver2["adede84b91cd_initial_migration.py"]:::data
                click Ver2 "https://github.com/ashintv/mini_project_work/blob/main/migrations/versions/adede84b91cd_initial_migration.py"
            end
        end

        subgraph "Presentation Layer" 
            direction TB
            Templates["Templates\n(App/templates/)"]:::frontend
            click Templates "https://github.com/ashintv/mini_project_work/tree/main/App/templates/"
            Landing["landing.html"]:::frontend
            click Landing "https://github.com/ashintv/mini_project_work/blob/main/App/templates/landing.html"
            Register["register.html"]:::frontend
            click Register "https://github.com/ashintv/mini_project_work/blob/main/App/templates/register.html"
            LoginT["login.html"]:::frontend
            click LoginT "https://github.com/ashintv/mini_project_work/blob/main/App/templates/login.html"
            Dashboard["dashboard.html"]:::frontend
            click Dashboard "https://github.com/ashintv/mini_project_work/blob/main/App/templates/dashboard.html"
            CreateMeet["create_meeting.html"]:::frontend
            click CreateMeet "https://github.com/ashintv/mini_project_work/blob/main/App/templates/create_meeting.html"
            JoinForm["joinform.html"]:::frontend
            click JoinForm "https://github.com/ashintv/mini_project_work/blob/main/App/templates/joinform.html"
            MeetingT["Meeting.html"]:::frontend
            click MeetingT "https://github.com/ashintv/mini_project_work/blob/main/App/templates/Meeting.html"
            BaseT["base.html"]:::frontend
            click BaseT "https://github.com/ashintv/mini_project_work/blob/main/App/templates/base.html"

            Static["Static Assets\n(App/static/)"]:::frontend
            click Static "https://github.com/ashintv/mini_project_work/tree/main/App/static/"
        end
    end

    %% Data Tier
    DB["SQLite Database\n(instance/user.db)"]:::db
    click DB "https://github.com/ashintv/mini_project_work/blob/main/instance/user.db"

    %% Connections
    FlaskApp --> Routes
    Routes -->|validates via| Forms
    Routes -->|CRUD operations| Models
    Routes -->|calls| Prediction
    Routes -->|renders| Templates
    Models -->|queries| DB
    Migrations -.->|schema versioning| DB
    Templates -->|HTML response| Browser
    Static -->|serves assets| Browser

    %% Styles
    classDef external fill:#cccccc,stroke:#333,stroke-width:1px;
    classDef frontend fill:#e0f7fa,stroke:#006064,stroke-width:1px;
    classDef app fill:#e8f5e9,stroke:#1b5e20,stroke-width:1px;
    classDef data fill:#fff3e0,stroke:#e65100,stroke-width:1px;
    classDef db fill:#ffe0b2,stroke:#e65100,stroke-width:2px,stroke-dasharray: 5 5;
```
