# viperz6884/aushadhiverify architecture

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

- Interactive diagram: https://gitdiagram.com/viperz6884/aushadhiverify
- Repository: https://github.com/viperz6884/aushadhiverify

## Overview

##### Project Type and Purpose
- This is part of a full-stack, blockchain-enabled, AI/ML-powered pharmaceutical supply-chain integrity system (“AushadhiVerify”).
- The repository you’ve shown is specifically the React/Vite landing-page client, but the README describes a multi-component architecture (blockchain network, backend APIs, AI/ML services, mobile + dashboard clients, off-chain DB).

##### File Structure
- Top-level: “Aushadhi landing page” directory containing a React/Vite front-end.
- No backend, blockchain, or AI code in this repo—those live in other modules. This is one client component.
- Key files:
- src/App.jsx, LandingPage.jsx → main UI entry points
- public/index.html, assets → static hosting
- vite.config.js, package.json → build and dependency config

##### README for Architecture Insights
- Core components:
- Permissioned Blockchain (Hyperledger Fabric, Go chaincode)
- Backend API (Node.js / Express)
- AI/ML Services (TensorFlow/PyTorch/OpenCV, scikit-learn)
- Mobile App (Flutter/React Native) + Web Dashboard (React/Vue)
- Off-chain database (MongoDB/PostgreSQL)
- High-level data flow: QR scan → backend → blockchain query → packaging image to AI model → consolidated result to client.

##### Detail
- Internal blockchain network topology if needed: Peer nodes, Orderers, Certification Authority.
- Smart-contract interactions for “birth certificate” issuance and “ownership transfer.”
- Notes on off-chain data storage and audit logs.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Client Layer
    subgraph "Client Layer"
        LandingDir["Aushadhi landing page/"]:::client
        subgraph "Landing Page Files"
            App["src/App.jsx"]:::client
            Landing["src/LandingPage.jsx"]:::client
            Main["src/main.jsx"]:::client
            AppCSS["src/App.css"]:::client
            LandingCSS["src/LandingPage.css"]:::client
            IndexCSS["src/index.css"]:::client
            HTML["public/index.html"]:::client
            Assets["src/assets/"]:::client
            PackageJSON["package.json"]:::client
            PackageLock["package-lock.json"]:::client
            ViteConfig["vite.config.js"]:::client
            ESLint["eslint.config.js"]:::client
            Gitignore[".gitignore"]:::client
            Readme["README.md"]:::client
        end
        MobileApp["Flutter/React Native App"]:::client
        Dashboard["React/Vue Dashboard"]:::client
    end

    %% Backend Layer
    subgraph "Backend/API Layer"
        APIGateway["Node.js/Express API Gateway"]:::backend
    end

    %% Blockchain Layer
    subgraph "Blockchain Layer"
        Peer["Peer Nodes"]:::blockchain
        Orderer["Orderer"]:::blockchain
        CA["Certification Authority"]:::blockchain
        Chaincode["Hyperledger Fabric (Go chaincode)"]:::blockchain
    end

    %% AI/ML Layer
    subgraph "AI/ML Layer"
        Packaging["Packaging Verification Service (TensorFlow/PyTorch & OpenCV)"]:::ai
        Anomaly["Anomaly Detection Service (scikit-learn)"]:::ai
    end

    %% Data Layer
    subgraph "Data Layer"
        DB["MongoDB / PostgreSQL"]:::db
        Storage["Object Storage (Images)"]:::db
    end

    %% Data Flows
    MobileApp -->|"Scan QR (HTTPS)"| APIGateway
    Dashboard -->|"Fetch Analytics (HTTPS)"| APIGateway
    APIGateway -->|"Query history (Fabric SDK)"| Peer
    Peer -->|"Return history"| APIGateway
    APIGateway -->|"Invoke Chaincode"| Chaincode
    Chaincode -->|"Write ledger"| Peer
    Peer -->|"BlockEvent"| Anomaly
    APIGateway -->|"Submit image"| Packaging
    Packaging -->|"Analysis result"| APIGateway
    APIGateway -->|"Trigger anomaly detection"| Anomaly
    Anomaly -->|"Detection report"| APIGateway
    APIGateway -->|"Read/Write"| DB
    APIGateway -->|"Store/Retrieve"| Storage

    %% Click Events
    click LandingDir "https://github.com/viperz6884/aushadhiverify/tree/main/Aushadhi landing page/"
    click App "https://github.com/viperz6884/aushadhiverify/blob/main/Aushadhi landing page/src/App.jsx"
    click Landing "https://github.com/viperz6884/aushadhiverify/blob/main/Aushadhi landing page/src/LandingPage.jsx"
    click Main "https://github.com/viperz6884/aushadhiverify/blob/main/Aushadhi landing page/src/main.jsx"
    click AppCSS "https://github.com/viperz6884/aushadhiverify/blob/main/Aushadhi landing page/src/App.css"
    click LandingCSS "https://github.com/viperz6884/aushadhiverify/blob/main/Aushadhi landing page/src/LandingPage.css"
    click IndexCSS "https://github.com/viperz6884/aushadhiverify/blob/main/Aushadhi landing page/src/index.css"
    click HTML "https://github.com/viperz6884/aushadhiverify/blob/main/Aushadhi landing page/public/index.html"
    click Assets "https://github.com/viperz6884/aushadhiverify/tree/main/Aushadhi landing page/src/assets/"
    click PackageJSON "https://github.com/viperz6884/aushadhiverify/blob/main/Aushadhi landing page/package.json"
    click PackageLock "https://github.com/viperz6884/aushadhiverify/blob/main/Aushadhi landing page/package-lock.json"
    click ViteConfig "https://github.com/viperz6884/aushadhiverify/blob/main/Aushadhi landing page/vite.config.js"
    click ESLint "https://github.com/viperz6884/aushadhiverify/blob/main/Aushadhi landing page/eslint.config.js"
    click Gitignore "https://github.com/viperz6884/aushadhiverify/blob/main/Aushadhi landing page/.gitignore"
    click Readme "https://github.com/viperz6884/aushadhiverify/blob/main/Aushadhi landing page/README.md"

    %% Styles
    classDef client fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef backend fill:#90EE90,stroke:#333,stroke-width:1px
    classDef blockchain fill:#FFA500,stroke:#333,stroke-width:1px
    classDef ai fill:#DDA0DD,stroke:#333,stroke-width:1px
    classDef db fill:#D3D3D3,stroke:#333,stroke-width:1px
```
