# codewithjaswanth/quizzy architecture

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

- Interactive diagram: https://gitdiagram.com/codewithjaswanth/quizzy
- Repository: https://github.com/codewithjaswanth/quizzy

## Overview

Quizzy’s principal workflow runs from a quiz page through the Chrome extension to a local backend, which routes each question, optionally retrieves web evidence, and returns a validated answer for display. The README also describes user-triggered deep re-checks and manual option selection. The graph includes those documented capabilities and the main reasoning and retrieval layers; internal extension wiring and some unsampled subsystem details are not established by the excerpts, so those relationships are omitted.

Main entry points: [`pipeline/src/orchestrator.js`](https://github.com/codewithjaswanth/quizzy/blob/main/pipeline/src/orchestrator.js) (Question pipeline), [`retrieval/src/service.js`](https://github.com/codewithjaswanth/quizzy/blob/main/retrieval/src/service.js) (Retrieval service), [`retrieval/src/server.js`](https://github.com/codewithjaswanth/quizzy/blob/main/retrieval/src/server.js) (Local API server), [`llm/src/dual_pass.js`](https://github.com/codewithjaswanth/quizzy/blob/main/llm/src/dual_pass.js) (Deep verification)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_extension["Browser Extension"]
  node_extension_client["Extension client"]
end

subgraph group_backend["Local Answer Pipeline"]
  node_server["Local API server<br/>[server.js]"]
  node_orchestrator["Question pipeline<br/>[orchestrator.js]"]
  node_deterministic["Deterministic solver<br/>[deterministic.js]"]
  node_risk["Risk detection<br/>[risk_detector.js]"]
  node_answer_cache["Answer cache<br/>[answer_cache.js]"]
  node_feedback_store[("Feedback and history<br/>[supabase.js]")]
end

subgraph group_retrieval["Evidence Retrieval"]
  node_retrieval_service["Retrieval service<br/>[service.js]"]
  node_query_builder["Search query builder<br/>[query_builder.js]"]
  node_searxng["SearXNG search<br/>[searxng_client.js]"]
  node_ranking["Result ranking<br/>[ranking.js]"]
  node_fetcher["Web page fetcher<br/>[fetcher.js]"]
  node_extractor["Evidence extraction<br/>[evidence.js]"]
end

subgraph group_reasoning["Local Reasoning"]
  node_fast_adapter["Model adapter<br/>[adapter.js]"]
  node_dual_pass["Deep verification<br/>[dual_pass.js]"]
  node_arbitrator["Dispute arbitration<br/>[arbitrator.js]"]
  node_prompt["Prompt construction<br/>[prompt.js]"]
  node_validator["Answer validation<br/>[validator.js]"]
  node_ollama["Ollama client<br/>[ollama_client.js]"]
  node_llm_config["Model configuration<br/>[config.js]"]
  node_warmup["Model warmup<br/>[warmup.js]"]
end

node_quiz_site(("Quiz page"))

node_quiz_site -->|"provides questions"| node_extension_client
node_extension_client -->|"sends requests"| node_server
node_server -->|"solves questions"| node_orchestrator
node_server -->|"serves retrieval"| node_retrieval_service
node_server -->|"logs feedback"| node_feedback_store
node_orchestrator -->|"tries deterministic solve"| node_deterministic
node_orchestrator -->|"checks risk"| node_risk
node_orchestrator -->|"uses cache"| node_answer_cache
node_orchestrator -->|"retrieves evidence"| node_retrieval_service
node_orchestrator -->|"runs reasoning"| node_fast_adapter
node_retrieval_service -->|"builds queries"| node_query_builder
node_retrieval_service -->|"searches web"| node_searxng
node_retrieval_service -->|"ranks results"| node_ranking
node_retrieval_service -->|"fetches pages"| node_fetcher
node_retrieval_service -->|"extracts evidence"| node_extractor
node_fast_adapter -->|"delegates deep passes"| node_dual_pass
node_dual_pass -->|"builds prompts"| node_prompt
node_dual_pass -->|"queries models"| node_ollama
node_dual_pass -->|"arbitrates disputes"| node_arbitrator
node_arbitrator -->|"queries model"| node_ollama
node_ollama -->|"uses settings"| node_llm_config
node_orchestrator -->|"returns answers"| node_extension_client

click node_extension_client "https://github.com/codewithjaswanth/quizzy/tree/main/extension"
click node_server "https://github.com/codewithjaswanth/quizzy/blob/main/retrieval/src/server.js"
click node_orchestrator "https://github.com/codewithjaswanth/quizzy/blob/main/pipeline/src/orchestrator.js"
click node_deterministic "https://github.com/codewithjaswanth/quizzy/blob/main/pipeline/src/deterministic.js"
click node_risk "https://github.com/codewithjaswanth/quizzy/blob/main/pipeline/src/risk_detector.js"
click node_answer_cache "https://github.com/codewithjaswanth/quizzy/blob/main/pipeline/src/answer_cache.js"
click node_feedback_store "https://github.com/codewithjaswanth/quizzy/blob/main/retrieval/src/supabase.js"
click node_retrieval_service "https://github.com/codewithjaswanth/quizzy/blob/main/retrieval/src/service.js"
click node_query_builder "https://github.com/codewithjaswanth/quizzy/blob/main/retrieval/src/query_builder.js"
click node_searxng "https://github.com/codewithjaswanth/quizzy/blob/main/retrieval/src/searxng_client.js"
click node_ranking "https://github.com/codewithjaswanth/quizzy/blob/main/retrieval/src/ranking.js"
click node_fetcher "https://github.com/codewithjaswanth/quizzy/blob/main/retrieval/src/fetcher.js"
click node_extractor "https://github.com/codewithjaswanth/quizzy/blob/main/retrieval/src/evidence.js"
click node_fast_adapter "https://github.com/codewithjaswanth/quizzy/blob/main/llm/src/adapter.js"
click node_dual_pass "https://github.com/codewithjaswanth/quizzy/blob/main/llm/src/dual_pass.js"
click node_arbitrator "https://github.com/codewithjaswanth/quizzy/blob/main/llm/src/arbitrator.js"
click node_prompt "https://github.com/codewithjaswanth/quizzy/blob/main/llm/src/prompt.js"
click node_validator "https://github.com/codewithjaswanth/quizzy/blob/main/llm/src/validator.js"
click node_ollama "https://github.com/codewithjaswanth/quizzy/blob/main/llm/src/ollama_client.js"
click node_llm_config "https://github.com/codewithjaswanth/quizzy/blob/main/llm/src/config.js"
click node_warmup "https://github.com/codewithjaswanth/quizzy/blob/main/llm/src/warmup.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_extension_client toneBlue
class node_server,node_orchestrator,node_deterministic,node_risk,node_answer_cache,node_feedback_store toneAmber
class node_retrieval_service,node_query_builder,node_searxng,node_ranking,node_fetcher,node_extractor toneMint
class node_fast_adapter,node_dual_pass,node_arbitrator,node_prompt,node_validator,node_ollama,node_llm_config,node_warmup toneRose
class node_quiz_site toneIndigo
```

## Components

### Browser Extension

- [Extension client](https://github.com/codewithjaswanth/quizzy/tree/main/extension): `extension`

### Local Answer Pipeline

- [Local API server](https://github.com/codewithjaswanth/quizzy/blob/main/retrieval/src/server.js): `retrieval/src/server.js`
- [Question pipeline](https://github.com/codewithjaswanth/quizzy/blob/main/pipeline/src/orchestrator.js): `pipeline/src/orchestrator.js`
- [Deterministic solver](https://github.com/codewithjaswanth/quizzy/blob/main/pipeline/src/deterministic.js): `pipeline/src/deterministic.js`
- [Risk detection](https://github.com/codewithjaswanth/quizzy/blob/main/pipeline/src/risk_detector.js): `pipeline/src/risk_detector.js`
- [Answer cache](https://github.com/codewithjaswanth/quizzy/blob/main/pipeline/src/answer_cache.js): `pipeline/src/answer_cache.js`
- [Feedback and history](https://github.com/codewithjaswanth/quizzy/blob/main/retrieval/src/supabase.js): `retrieval/src/supabase.js`

### Evidence Retrieval

- [Retrieval service](https://github.com/codewithjaswanth/quizzy/blob/main/retrieval/src/service.js): `retrieval/src/service.js`
- [Search query builder](https://github.com/codewithjaswanth/quizzy/blob/main/retrieval/src/query_builder.js): `retrieval/src/query_builder.js`
- [SearXNG search](https://github.com/codewithjaswanth/quizzy/blob/main/retrieval/src/searxng_client.js): `retrieval/src/searxng_client.js`
- [Result ranking](https://github.com/codewithjaswanth/quizzy/blob/main/retrieval/src/ranking.js): `retrieval/src/ranking.js`
- [Web page fetcher](https://github.com/codewithjaswanth/quizzy/blob/main/retrieval/src/fetcher.js): `retrieval/src/fetcher.js`
- [Evidence extraction](https://github.com/codewithjaswanth/quizzy/blob/main/retrieval/src/evidence.js): `retrieval/src/evidence.js`

### Local Reasoning

- [Model adapter](https://github.com/codewithjaswanth/quizzy/blob/main/llm/src/adapter.js): `llm/src/adapter.js`
- [Deep verification](https://github.com/codewithjaswanth/quizzy/blob/main/llm/src/dual_pass.js): `llm/src/dual_pass.js`
- [Dispute arbitration](https://github.com/codewithjaswanth/quizzy/blob/main/llm/src/arbitrator.js): `llm/src/arbitrator.js`
- [Prompt construction](https://github.com/codewithjaswanth/quizzy/blob/main/llm/src/prompt.js): `llm/src/prompt.js`
- [Answer validation](https://github.com/codewithjaswanth/quizzy/blob/main/llm/src/validator.js): `llm/src/validator.js`
- [Ollama client](https://github.com/codewithjaswanth/quizzy/blob/main/llm/src/ollama_client.js): `llm/src/ollama_client.js`
- [Model configuration](https://github.com/codewithjaswanth/quizzy/blob/main/llm/src/config.js): `llm/src/config.js`
- [Model warmup](https://github.com/codewithjaswanth/quizzy/blob/main/llm/src/warmup.js): `llm/src/warmup.js`

### Other components

- **Quiz page**

## Connections

- Quiz page → Extension client: provides questions
- Extension client → Local API server: sends requests
- Local API server → Question pipeline: solves questions (evidence: `retrieval/src/server.js`)
- Local API server → Retrieval service: serves retrieval (evidence: `retrieval/src/server.js`)
- Local API server → Feedback and history: logs feedback (evidence: `retrieval/src/server.js`)
- Question pipeline → Deterministic solver: tries deterministic solve (evidence: `pipeline/src/orchestrator.js`)
- Question pipeline → Risk detection: checks risk (evidence: `pipeline/src/orchestrator.js`)
- Question pipeline → Answer cache: uses cache (evidence: `pipeline/src/orchestrator.js`)
- Question pipeline → Retrieval service: retrieves evidence (evidence: `pipeline/src/orchestrator.js`)
- Question pipeline → Model adapter: runs reasoning (evidence: `pipeline/src/orchestrator.js`)
- Retrieval service → Search query builder: builds queries (evidence: `retrieval/src/service.js`)
- Retrieval service → SearXNG search: searches web (evidence: `retrieval/src/service.js`)
- Retrieval service → Result ranking: ranks results (evidence: `retrieval/src/service.js`)
- Retrieval service → Web page fetcher: fetches pages (evidence: `retrieval/src/service.js`)
- Retrieval service → Evidence extraction: extracts evidence (evidence: `retrieval/src/service.js`)
- Model adapter → Deep verification: delegates deep passes (evidence: `llm/src/adapter.js`)
- Deep verification → Prompt construction: builds prompts (evidence: `llm/src/dual_pass.js`)
- Deep verification → Ollama client: queries models (evidence: `llm/src/dual_pass.js`)
- Deep verification → Dispute arbitration: arbitrates disputes (evidence: `llm/src/dual_pass.js`)
- Dispute arbitration → Ollama client: queries model (evidence: `llm/src/arbitrator.js`)
- Ollama client → Model configuration: uses settings (evidence: `llm/src/ollama_client.js`)
- Question pipeline → Extension client: returns answers
