# gayathrimallipudi/jobtracker architecture

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

- Interactive diagram: https://gitdiagram.com/gayathrimallipudi/jobtracker
- Repository: https://github.com/gayathrimallipudi/jobtracker

## Overview

##### Project Type & Purpose
- The project is a Flask-based web application designed for job seekers to manage, track, and analyze their job applications.
- Key features include user authentication, job management functions (adding, viewing, updating applications), a statistics dashboard, and resources for resume and interview preparation.
- It uses Flask for the backend, SQLite for the database, and HTML/CSS for the frontend, with Docker used for containerization and Render.com for hosting.

##### Analyzing the File Structure
- Top-level files like app.py, forms.py, and creating_db_with_tables.py indicate the central backend logic, with the Flask application defined in app.py.
- The templates directory houses all the HTML views for rendering the web pages (home, login, registration, dashboard, etc.).
- The presence of files like schema.sql and jobs.db shows that the application uses a SQLite database, and the separate script (creating_db_with_tables.py) likely initializes the database.
- Dockerfile indicates the app is containerized for easier deployment and development consistency.

a. Main Components:
- Web Server/Backend: Represented by the Flask application (app.py), which handles routing, business logic, and user authentication.
- Frontend: HTML templates rendering user interfaces (from the templates folder).
- Database: SQLite database (jobs.db) managed via SQL scripts (schema.sql and creating_db_with_tables.py).
- Containerization: Docker (Dockerfile) which packages and runs the application consistently.
- External Services: Hosting on Render.com, which could also involve continuous deployment and integration.

b. Relationships and Data Flow:
- Users (Clients) interact with the frontend through their web browser, sending HTTP requests to the Flask server.
- The Flask server processes requests, handles authentication, and interacts with the SQLite database to perform CRUD operations on job application data.
- Responses are rendered through HTML templates and sent back to the client.
- Docker encapsulates the whole environment ensuring that the app, including its dependencies, runs uniformly, while Render.com hosts the containerized application.

c. Architectural Patterns & Design Principles:
- Although not strictly an MVC framework, the project follows a separation of concerns: the Flask routes handle controller logic, HTML templates act as views, and database scripts manage the model data.
- Emphasis on security (e.g., password hashing using Flask-Bcrypt) shows the use of secure design principles in user authentication procedures.

d. Technologies/Frameworks Highlighted:
- Backend: Python with Flask and related extensions (Flask-WTF, Flask-Login, Flask-Bcrypt)
- Frontend: HTML and CSS (served via templates)
- Database: SQLite
- Containerization: Docker
- Deployment: Render.com

## Diagram (Mermaid)

```mermaid
graph TD
    Client["Client (Web Browser)"]:::client

    subgraph "Docker Container"
        Flask["Flask Application (app.py)"]:::backend
        Forms["User Authentication & Forms (forms.py)"]:::backend
        Templates["Frontend Views (templates/)"]:::frontend
        DB["SQLite Database (jobs.db)"]:::database
        subgraph "DB Setup"
            DBScript["Database Script (creating_db_with_tables.py)"]:::database
            DBSchema["Database Schema (schema.sql)"]:::database
        end
        Dockerfile["Dockerfile (Containerization)"]:::infrastructure
    end

    Container["Containerized App"]:::infrastructure
    Render["Render.com (Hosting)"]:::infrastructure

    Client -->|"HTTPRequest"| Flask
    Flask -->|"Uses"| Forms
    Flask -->|"Renders"| Templates
    Flask -->|"CRUD"| DB
    DBScript -->|"Initializes"| DB
    DBSchema -->|"Defines"| DB
    Templates -->|"Response"| Client
    Dockerfile -->|"Builds"| Container
    Container -->|"Deploys"| Render

    classDef client fill:#ADD8E6,stroke:#000,stroke-width:2px;
    classDef backend fill:#90EE90,stroke:#000,stroke-width:2px;
    classDef frontend fill:#FFD700,stroke:#000,stroke-width:2px;
    classDef database fill:#FFA07A,stroke:#000,stroke-width:2px;
    classDef infrastructure fill:#D3D3D3,stroke:#000,stroke-width:2px;

    click Flask "https://github.com/gayathrimallipudi/jobtracker/blob/main/app.py"
    click Forms "https://github.com/gayathrimallipudi/jobtracker/blob/main/forms.py"
    click DBScript "https://github.com/gayathrimallipudi/jobtracker/blob/main/creating_db_with_tables.py"
    click DBSchema "https://github.com/gayathrimallipudi/jobtracker/blob/main/schema.sql"
    click DB "https://github.com/gayathrimallipudi/jobtracker/blob/main/jobs.db"
    click Templates "https://github.com/gayathrimallipudi/jobtracker/tree/main/templates/"
    click Dockerfile "https://github.com/gayathrimallipudi/jobtracker/tree/main/Dockerfile"
```
