Skip to content

Latest commit

 

History

History
163 lines (122 loc) · 4.49 KB

File metadata and controls

163 lines (122 loc) · 4.49 KB

🏗 High-Level Design (HLD) 🏗

Context

Project Overview

Field Details
Project Name US Visa Approval Prediction
Prepared By Md. Alahi Almin Tansen
Revision Number 1.0
Last Revision Date 02-09-2025

⬆️ Go to Context

Version History

Revision Date Changes Made Author
1.0 02-09-2025 Initial Draft Md. Alahi Almin Tansen

⬆️ Go to Context

1. System Context

  • The system predicts whether a US visa application will be approved or rejected based on applicant & employment features.
  • End-users → Visa applicants, consultants, researchers.
  • Interaction → Users input data via UI/API → Model predicts result → Response displayed.

⬆️ Go to Context

2. Architecture Overview

flowchart LR
    U[User] -->|Input Features| UI[Web / API UI]
    UI --> API[Backend API Service]
    API --> ML[ML Model Service]
    ML --> DB[(Database: Visa Data)]
    ML --> API
    API --> U[Prediction Result]
    subgraph Deployment
        API
        ML
        DB
    end
Loading

⬆️ Go to Context

3. Key Components

Frontend / User Interface

  • Web-based input form (React, Django template, or Streamlit)
  • REST API endpoints for external integrations
  • Fields: continent, education, experience, wage, etc.

⬆️ Go to Context

Backend Services

  • API Layer:

    • Expose endpoints: /predict, /train, /health
    • Framework: FastAPI / Django REST Framework
  • Business Logic:

    • Preprocess user input → feature encoding/scaling
    • Call trained ML model for prediction

⬆️ Go to Context

Machine Learning Model

  • Model Type: Classification (KNN)
  • Input: Applicant features
  • Output: Approval Probability + Final Decision (Yes/No)
  • Model Training Pipeline:
    • Data ingestion → Preprocessing → Training → Validation → Model Registry

⬆️ Go to Context

Data Layer

  • Historical visa dataset (structured CSV/Mongo DB)
  • Store: training data, feature metadata, model versions, logs

⬆️ Go to Context

Deployment Infrastructure

  • Docker: Containerize ML + API
  • Cloud Services: AWS/GCP/Azure (compute + storage)
  • CI/CD: GitHub Actions with self-hosted runner
  • Monitoring: API health, model drift tracking

⬆️ Go to Context

4. Data Flow

sequenceDiagram
    participant User
    participant UI
    participant API
    participant ML
    participant DB

    User->>UI: Submit visa application features
    UI->>API: Send features as JSON
    API->>ML: Preprocess & Predict
    ML->>DB: Fetch metadata / feature mapping
    ML->>API: Return Prediction (Approved/Rejected)
    API->>UI: Display result to User
Loading

⬆️ Go to Context

5. Non-Functional Requirements (NFRs)

  • Scalability → Handle multiple predictions concurrently
  • Performance → Response < 2 seconds
  • Security → Input validation, secure APIs
  • Reliability → Deployed with redundancy
  • Maintainability → Modular services, CI/CD pipelines

⬆️ Go to Context

6. Tech Stack

  • Programming: Python
  • Frameworks: FastAPI / Django REST Framework
  • ML: scikit-learn, KNN
  • Data Storage: MongoDB / CSV files
  • Deployment: Docker, GitHub Actions, Cloud Hosting
  • Monitoring: Prometheus + Grafana, Evidently AI

⬆️ Go to Context