# akshara-codes/publiq architecture

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

- Interactive diagram: https://gitdiagram.com/akshara-codes/publiq
- Repository: https://github.com/akshara-codes/publiq

## Overview

PubliQ is documented as a civic-information assistant whose main workflow turns uploaded government documents into cited answers: documents are extracted, chunked, embedded, and indexed; queries retrieve relevant passages that ground an AWS Bedrock response. The README also describes conversational memory, multilingual access, and IAM-restricted model access. The provided tree contains no runtime source files, so component paths are null and relationships reflect README documentation only; implementation details and ownership cannot be verified.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingestion["Document ingestion"]
  node_upload["Document upload"]
  node_extract["Text extraction"]
  node_chunk["Text chunking"]
end

subgraph group_knowledge["Search and knowledge"]
  node_embed["Semantic embeddings"]
  node_vectorstore[("ChromaDB index")]
  node_retrieve["Passage retrieval"]
end

subgraph group_assistant["Conversation and answers"]
  node_query["Natural-language query"]
  node_memory["Dialogue memory"]
  node_generate["Grounded answer"]
  node_citations["Source citations"]
  node_multilingual["Multilingual assistance"]
  node_lowbandwidth["Low-bandwidth access"]
end

subgraph group_platform["AI and access"]
  node_bedrock["AWS Bedrock"]
  node_iam["AWS IAM"]
end

node_citizens(("Citizens and staff"))

node_citizens -->|"uploads documents"| node_upload
node_upload -->|"processes documents"| node_extract
node_extract -->|"chunks text"| node_chunk
node_chunk -->|"creates embeddings"| node_embed
node_embed -->|"indexes vectors"| node_vectorstore
node_citizens -->|"asks questions"| node_query
node_query -->|"retrieves passages"| node_retrieve
node_retrieve -->|"searches index"| node_vectorstore
node_query -->|"maintains dialogue"| node_memory
node_retrieve -->|"grounds response"| node_generate
node_memory -->|"adds context"| node_generate
node_generate -->|"invokes model"| node_bedrock
node_generate -->|"returns cited answer"| node_citations
node_citations -->|"presents answer"| node_citizens
node_multilingual -->|"supports access"| node_citizens
node_lowbandwidth -->|"supports access"| node_citizens
node_iam -->|"restricts access"| node_bedrock

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_upload,node_extract,node_chunk toneBlue
class node_embed,node_vectorstore,node_retrieve toneAmber
class node_query,node_memory,node_generate,node_citations,node_multilingual,node_lowbandwidth toneMint
class node_bedrock,node_iam toneRose
class node_citizens toneIndigo
```

## Components

### Document ingestion

- **Document upload**
- **Text extraction**
- **Text chunking**

### Search and knowledge

- **Semantic embeddings**
- **ChromaDB index**
- **Passage retrieval**

### Conversation and answers

- **Natural-language query**
- **Dialogue memory**
- **Grounded answer**
- **Source citations**
- **Multilingual assistance**
- **Low-bandwidth access**

### AI and access

- **AWS Bedrock**
- **AWS IAM**

### Other components

- **Citizens and staff**

## Connections

- Citizens and staff → Document upload: uploads documents (evidence: `README.md`)
- Document upload → Text extraction: processes documents (evidence: `README.md`)
- Text extraction → Text chunking: chunks text (evidence: `README.md`)
- Text chunking → Semantic embeddings: creates embeddings (evidence: `README.md`)
- Semantic embeddings → ChromaDB index: indexes vectors (evidence: `README.md`)
- Citizens and staff → Natural-language query: asks questions (evidence: `README.md`)
- Natural-language query → Passage retrieval: retrieves passages (evidence: `README.md`)
- Passage retrieval → ChromaDB index: searches index (evidence: `README.md`)
- Natural-language query → Dialogue memory: maintains dialogue (evidence: `README.md`)
- Passage retrieval → Grounded answer: grounds response (evidence: `README.md`)
- Dialogue memory → Grounded answer: adds context (evidence: `README.md`)
- Grounded answer → AWS Bedrock: invokes model (evidence: `README.md`)
- Grounded answer → Source citations: returns cited answer (evidence: `README.md`)
- Source citations → Citizens and staff: presents answer (evidence: `README.md`)
- Multilingual assistance → Citizens and staff: supports access (evidence: `README.md`)
- Low-bandwidth access → Citizens and staff: supports access (evidence: `README.md`)
- AWS IAM → AWS Bedrock: restricts access (evidence: `README.md`)
