# pre1102/btech-project architecture

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

- Interactive diagram: https://gitdiagram.com/pre1102/btech-project
- Repository: https://github.com/pre1102/btech-project

## Overview

VeriTrust AI is currently a frontend demonstration, not the proposed DID/VC-backed authorization system. Its user workflow is to inspect demo agents and credentials, register a sample agent, evaluate an agent against a resource policy, and review the resulting local audit record. Trust scoring and credential status are local calculations; workspace data is persisted in browser storage. The README also describes future identity, credential-verification, policy, and tamper-evident audit capabilities, which are shown separately as proposed and unimplemented. Feature-level links reflect README documentation; unsampled implementation details are not inferred.

Main entry points: [`src/App.jsx`](https://github.com/pre1102/btech-project/blob/main/src/App.jsx) (React application), [`src/utils/storage.js`](https://github.com/pre1102/btech-project/blob/main/src/utils/storage.js) (Workspace storage), [`src/data/mockData.js`](https://github.com/pre1102/btech-project/blob/main/src/data/mockData.js) (Demo agents and resources), [`src/utils/trust.js`](https://github.com/pre1102/btech-project/blob/main/src/utils/trust.js) (Trust calculations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Prototype interface"]
  node_app["React application<br/>[App.jsx]"]
  node_dashboard["Dashboard<br/>[App.jsx]"]
  node_agents["Agent management<br/>[App.jsx]"]
  node_registration["Agent registration<br/>[App.jsx]"]
  node_credentials["Credential status<br/>[App.jsx]"]
  node_access["Access checker<br/>[App.jsx]"]
  node_audit["Audit log<br/>[App.jsx]"]
end

subgraph group_domain["Trust and records"]
  node_mockdata["Demo agents and resources<br/>[mockData.js]"]
  node_trust["Trust calculations<br/>[trust.js]"]
end

subgraph group_persistence["Local persistence"]
  node_workspace["Workspace storage<br/>[storage.js]"]
  node_localstorage[("Browser localStorage")]
end

subgraph group_proposed["Proposed capabilities"]
  node_ssi["DID / VC services"]
  node_policy["Fine-grained authorization"]
  node_protected["Protected services / agents"]
  node_tamper_audit[("Tamper-evident records")]
end

node_operator(("User / operator"))

node_operator -->|"uses"| node_app
node_app -->|"renders"| node_dashboard
node_app -->|"renders"| node_agents
node_app -->|"offers"| node_registration
node_app -->|"renders"| node_credentials
node_app -->|"offers"| node_access
node_app -->|"renders"| node_audit
node_app -->|"loads"| node_mockdata
node_app -->|"calculates with"| node_trust
node_app -->|"loads and saves"| node_workspace
node_workspace -->|"reads and writes"| node_localstorage
node_ssi -.->|"informs"| node_policy
node_policy -.->|"authorizes"| node_protected
node_policy -.->|"records actions"| node_tamper_audit

click node_app "https://github.com/pre1102/btech-project/blob/main/src/App.jsx"
click node_dashboard "https://github.com/pre1102/btech-project/blob/main/src/App.jsx"
click node_agents "https://github.com/pre1102/btech-project/blob/main/src/App.jsx"
click node_registration "https://github.com/pre1102/btech-project/blob/main/src/App.jsx"
click node_credentials "https://github.com/pre1102/btech-project/blob/main/src/App.jsx"
click node_access "https://github.com/pre1102/btech-project/blob/main/src/App.jsx"
click node_audit "https://github.com/pre1102/btech-project/blob/main/src/App.jsx"
click node_mockdata "https://github.com/pre1102/btech-project/blob/main/src/data/mockData.js"
click node_trust "https://github.com/pre1102/btech-project/blob/main/src/utils/trust.js"
click node_workspace "https://github.com/pre1102/btech-project/blob/main/src/utils/storage.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_dashboard,node_agents,node_registration,node_credentials,node_access,node_audit,node_operator toneBlue
class node_mockdata,node_trust toneAmber
class node_workspace,node_localstorage toneMint
class node_ssi,node_policy,node_protected,node_tamper_audit toneRose
```

## Components

### Prototype interface

- [React application](https://github.com/pre1102/btech-project/blob/main/src/App.jsx): `src/App.jsx`
- [Dashboard](https://github.com/pre1102/btech-project/blob/main/src/App.jsx): `src/App.jsx`
- [Agent management](https://github.com/pre1102/btech-project/blob/main/src/App.jsx): `src/App.jsx`
- [Agent registration](https://github.com/pre1102/btech-project/blob/main/src/App.jsx): `src/App.jsx`
- [Credential status](https://github.com/pre1102/btech-project/blob/main/src/App.jsx): `src/App.jsx`
- [Access checker](https://github.com/pre1102/btech-project/blob/main/src/App.jsx): `src/App.jsx`
- [Audit log](https://github.com/pre1102/btech-project/blob/main/src/App.jsx): `src/App.jsx`

### Trust and records

- [Demo agents and resources](https://github.com/pre1102/btech-project/blob/main/src/data/mockData.js): `src/data/mockData.js`
- [Trust calculations](https://github.com/pre1102/btech-project/blob/main/src/utils/trust.js): `src/utils/trust.js`

### Local persistence

- [Workspace storage](https://github.com/pre1102/btech-project/blob/main/src/utils/storage.js): `src/utils/storage.js`
- **Browser localStorage**

### Proposed capabilities

- **DID / VC services**
- **Fine-grained authorization**
- **Protected services / agents**
- **Tamper-evident records**

### Other components

- **User / operator**

## Connections

- User / operator → React application: uses (evidence: `README.md`)
- React application → Dashboard: renders (evidence: `README.md`)
- React application → Agent management: renders (evidence: `README.md`)
- React application → Agent registration: offers (evidence: `README.md`)
- React application → Credential status: renders (evidence: `README.md`)
- React application → Access checker: offers (evidence: `README.md`)
- React application → Audit log: renders (evidence: `README.md`)
- React application → Demo agents and resources: loads (evidence: `src/App.jsx`)
- React application → Trust calculations: calculates with (evidence: `src/App.jsx`)
- React application → Workspace storage: loads and saves (evidence: `src/App.jsx`)
- Workspace storage → Browser localStorage: reads and writes (evidence: `src/utils/storage.js`)
- DID / VC services → Fine-grained authorization: informs (evidence: `README.md`)
- Fine-grained authorization → Protected services / agents: authorizes (evidence: `README.md`)
- Fine-grained authorization → Tamper-evident records: records actions (evidence: `README.md`)
