# aavesh09/nivaran architecture

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

- Interactive diagram: https://gitdiagram.com/aavesh09/nivaran
- Repository: https://github.com/aavesh09/nivaran

## Overview

PilotSetu is a government innovation-pilot platform: its client-side data model tracks problems from open through startup application, pilot evaluation, and scale decision. The sampled matching module ranks startups by domain, stage, and team fit. The store persists platform records in browser localStorage, while JSON seed datasets are present in the tree. Page and component source was not sampled, so links from the visible UI to these runtime modules—and between seed files and initialization—are left out rather than assumed.

Main entry points: [`src/scripts/store.js`](https://github.com/aavesh09/nivaran/blob/main/src/scripts/store.js) (Lifecycle store)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Pilot lifecycle"]
  node_matching["Startup matching<br/>[matching.js]"]
end

subgraph group_runtime["Client runtime"]
  node_store["Lifecycle store<br/>[store.js]"]
  node_browser_storage[("Browser storage")]
end

subgraph group_data["Platform records"]
  node_problems["Problem records<br/>[problems.json]"]
  node_applications["Applications<br/>[applications.json]"]
  node_pilot_runs["Pilot runs<br/>[pilotRuns.json]"]
  node_scale_decisions["Scale decisions"]
  node_startups["Startup records<br/>[startups.json]"]
  node_pilots["Pilot records<br/>[pilots.json]"]
end

subgraph group_interface["User interface"]
  node_public_page["Public page<br/>[index.astro]"]
  node_admin_page["Admin dashboard<br/>[index.astro]"]
  node_public_layout["Public layout<br/>[PublicLayout.astro]"]
  node_admin_layout["Admin layout<br/>[AdminLayout.astro]"]
  node_components["UI components"]
end

node_government_user(("Government user"))

node_store -->|"reads and writes"| node_browser_storage

click node_public_page "https://github.com/aavesh09/nivaran/blob/main/src/pages/index.astro"
click node_admin_page "https://github.com/aavesh09/nivaran/blob/main/src/pages/admin/index.astro"
click node_public_layout "https://github.com/aavesh09/nivaran/blob/main/src/layouts/PublicLayout.astro"
click node_admin_layout "https://github.com/aavesh09/nivaran/blob/main/src/layouts/AdminLayout.astro"
click node_components "https://github.com/aavesh09/nivaran/tree/main/src/components"
click node_matching "https://github.com/aavesh09/nivaran/blob/main/src/scripts/matching.js"
click node_store "https://github.com/aavesh09/nivaran/blob/main/src/scripts/store.js"
click node_problems "https://github.com/aavesh09/nivaran/blob/main/src/data/problems.json"
click node_applications "https://github.com/aavesh09/nivaran/blob/main/src/data/applications.json"
click node_pilot_runs "https://github.com/aavesh09/nivaran/blob/main/src/data/pilotRuns.json"
click node_scale_decisions "https://github.com/aavesh09/nivaran/blob/main/src/data/scaleDecisions.json"
click node_startups "https://github.com/aavesh09/nivaran/blob/main/src/data/startups.json"
click node_pilots "https://github.com/aavesh09/nivaran/blob/main/src/data/pilots.json"

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_matching,node_government_user toneBlue
class node_store,node_browser_storage toneAmber
class node_problems,node_applications,node_pilot_runs,node_scale_decisions,node_startups,node_pilots toneMint
class node_public_page,node_admin_page,node_public_layout,node_admin_layout,node_components toneRose
```

## Components

### Pilot lifecycle

- [Startup matching](https://github.com/aavesh09/nivaran/blob/main/src/scripts/matching.js): `src/scripts/matching.js`

### Client runtime

- [Lifecycle store](https://github.com/aavesh09/nivaran/blob/main/src/scripts/store.js): `src/scripts/store.js`
- **Browser storage**

### Platform records

- [Problem records](https://github.com/aavesh09/nivaran/blob/main/src/data/problems.json): `src/data/problems.json`
- [Applications](https://github.com/aavesh09/nivaran/blob/main/src/data/applications.json): `src/data/applications.json`
- [Pilot runs](https://github.com/aavesh09/nivaran/blob/main/src/data/pilotRuns.json): `src/data/pilotRuns.json`
- [Scale decisions](https://github.com/aavesh09/nivaran/blob/main/src/data/scaleDecisions.json): `src/data/scaleDecisions.json`
- [Startup records](https://github.com/aavesh09/nivaran/blob/main/src/data/startups.json): `src/data/startups.json`
- [Pilot records](https://github.com/aavesh09/nivaran/blob/main/src/data/pilots.json): `src/data/pilots.json`

### User interface

- [Public page](https://github.com/aavesh09/nivaran/blob/main/src/pages/index.astro): `src/pages/index.astro`
- [Admin dashboard](https://github.com/aavesh09/nivaran/blob/main/src/pages/admin/index.astro): `src/pages/admin/index.astro`
- [Public layout](https://github.com/aavesh09/nivaran/blob/main/src/layouts/PublicLayout.astro): `src/layouts/PublicLayout.astro`
- [Admin layout](https://github.com/aavesh09/nivaran/blob/main/src/layouts/AdminLayout.astro): `src/layouts/AdminLayout.astro`
- [UI components](https://github.com/aavesh09/nivaran/tree/main/src/components): `src/components`

### Other components

- **Government user**

## Connections

- Lifecycle store → Browser storage: reads and writes
