# ali-nadhir/hurryapphackathon-project architecture

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

- Interactive diagram: https://gitdiagram.com/ali-nadhir/hurryapphackathon-project
- Repository: https://github.com/ali-nadhir/hurryapphackathon-project

## Overview

##### Project type and purpose
- This is a full-stack biometric enrollment and matching application built for a hackathon.
- It allows users to manage (add/list) person records, scan/upload fingerprint BMPs, enhance/match them against a database, and view results.

##### File structure
- Top-level directories:
- front/ – Vue 3 + TypeScript single-page application (SPA)
- go/   – Go-based HTTP API server with SQLite (data.db)
- py/   – Python fingerprint-processing scripts (enhancement, matching, models)
- database/ – sample BMP images (static reference data)
- Key files and patterns:
- front/src/router + views → front end’s client-side routing and UI pages (HomeView, ManageScanView, UserManagement, etc.)
- go/api/*.go + go/database/setup.go → HTTP handlers and DB schema setup
- py/*.py + py/model.py → image‐processing pipeline: enhancement, feature extraction, matching algorithms
- .env, tsconfig, vite.config.ts, go.mod → environment and build configs

##### Summary
- Four core tiers: Client (UI), API layer, Processing layer, Data layer.
- Interactions: upload → store → process → match → display.
- Every active component (Vue, Go, Python, DB, File system) is represented distinctly to reflect the project’s modular, multi-language architecture.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Client Layer
    subgraph "Client (Vue SPA)"
        direction TB
        VueSPA["Vue SPA"]:::frontend
        MainTS["main.ts"]:::frontend
        AppVue["App.vue"]:::frontend
        Router["router/index.ts"]:::frontend
        Views["views/"]:::frontend
        Store["stores/usersStore.ts"]:::frontend
        ViteConfig["vite.config.ts"]:::frontend
    end

    %% Backend Layer
    subgraph "Backend (Go API)"
        direction TB
        GoAPI["Go API Server"]:::backend
        MainGo["main.go"]:::backend
        APIGo["api/api.go"]:::backend
        PersonGo["api/person.go"]:::backend
        SetupDB["database/setup.go"]:::backend
        GoMod["go.mod"]:::backend
    end

    %% Processing Layer
    subgraph "Processing (Python)"
        direction TB
        PyProc["Python Processor"]:::processing
        PyMain["main.py"]:::processing
        Enhance["enhance.py"]:::processing
        EMatch["enhanced_match.py"]:::processing
        ScanBMP["scanbmp.py"]:::processing
        ModelPy["model.py"]:::processing
        ReqTxt["requirements.txt"]:::processing
    end

    %% Data Stores
    subgraph "Data Stores"
        direction TB
        SQLiteDB["SQLite DB (data.db)"]:::datastore
        BMPStore["BMP File Store"]:::datastore
    end

    Browser["User Browser"]:::external

    %% Relationships
    Browser -->|"loads SPA"| VueSPA
    VueSPA -->|"HTTP REST"| GoAPI
    GoAPI -->|"read/write"| SQLiteDB
    GoAPI -->|"store/retrieve"| BMPStore
    GoAPI -->|"exec CLI"| PyProc
    PyProc -->|"result JSON"| GoAPI
    GoAPI -->|"HTTP JSON"| VueSPA

    %% Click Events - Client
    click MainTS "https://github.com/ali-nadhir/hurryapphackathon-project/blob/main/front/src/main.ts"
    click AppVue "https://github.com/ali-nadhir/hurryapphackathon-project/blob/main/front/src/App.vue"
    click Router "https://github.com/ali-nadhir/hurryapphackathon-project/blob/main/front/src/router/index.ts"
    click Views "https://github.com/ali-nadhir/hurryapphackathon-project/tree/main/front/src/views/"
    click Store "https://github.com/ali-nadhir/hurryapphackathon-project/blob/main/front/src/stores/usersStore.ts"
    click ViteConfig "https://github.com/ali-nadhir/hurryapphackathon-project/blob/main/front/vite.config.ts"

    %% Click Events - Backend
    click MainGo "https://github.com/ali-nadhir/hurryapphackathon-project/blob/main/go/main.go"
    click APIGo "https://github.com/ali-nadhir/hurryapphackathon-project/blob/main/go/api/api.go"
    click PersonGo "https://github.com/ali-nadhir/hurryapphackathon-project/blob/main/go/api/person.go"
    click SetupDB "https://github.com/ali-nadhir/hurryapphackathon-project/blob/main/go/database/setup.go"
    click GoMod "https://github.com/ali-nadhir/hurryapphackathon-project/blob/main/go/go.mod"

    %% Click Events - Processing
    click PyMain "https://github.com/ali-nadhir/hurryapphackathon-project/blob/main/py/main.py"
    click Enhance "https://github.com/ali-nadhir/hurryapphackathon-project/blob/main/py/enhance.py"
    click EMatch "https://github.com/ali-nadhir/hurryapphackathon-project/blob/main/py/enhanced_match.py"
    click ScanBMP "https://github.com/ali-nadhir/hurryapphackathon-project/blob/main/py/scanbmp.py"
    click ModelPy "https://github.com/ali-nadhir/hurryapphackathon-project/blob/main/py/model.py"
    click ReqTxt "https://github.com/ali-nadhir/hurryapphackathon-project/blob/main/py/requirements.txt"

    %% Click Events - Data
    click SQLiteDB "https://github.com/ali-nadhir/hurryapphackathon-project/blob/main/go/data.db"
    click BMPStore "https://github.com/ali-nadhir/hurryapphackathon-project/tree/main/database/"

    %% Styles
    classDef frontend fill:#ade8f4,stroke:#023047,stroke-width:1px
    classDef backend fill:#c8e6c9,stroke:#006400,stroke-width:1px
    classDef processing fill:#ffe0b2,stroke:#e65100,stroke-width:1px
    classDef datastore fill:#e0e0e0,stroke:#424242,stroke-width:1px
    classDef external fill:#ffffff,stroke:#000000,stroke-width:1px,stroke-dasharray: 5 5
```
