# vkrm03/cict architecture

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

- Interactive diagram: https://gitdiagram.com/vkrm03/cict
- Repository: https://github.com/vkrm03/cict

## Overview

This is a React application for browsing and reading classical Tamil literature, with author and work catalogs, search, and knowledge-discovery tools. The main user journey is route selection in the app, followed by library or author browsing and a work-reading view; global search and discovery pages provide parallel exploration. The graph also preserves the lexicon, themes, manuscripts, map, timeline, comparison, and assistant areas evident in the source tree. Several page implementations were not sampled, so their internal calls are not asserted.

Main entry points: [`src/App.jsx`](https://github.com/vkrm03/cict/blob/main/src/App.jsx) (Route application), [`src/services/searchService.js`](https://github.com/vkrm03/cict/blob/main/src/services/searchService.js) (Search service), [`src/data/entries/contentService.js`](https://github.com/vkrm03/cict/blob/main/src/data/entries/contentService.js) (Content service), [`src/context/AppContext.jsx`](https://github.com/vkrm03/cict/blob/main/src/context/AppContext.jsx) (App context)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_app["Route application<br/>[App.jsx]"]
  node_layout["Shared layout<br/>[Layout.jsx]"]
end

subgraph group_library["Library and reading"]
  node_reader["Reader"]
  node_library_pages["Library pages<br/>[LibraryHome.jsx]"]
  node_work_page["Work overview<br/>[WorkOverview.jsx]"]
  node_kural_reader["Kural reader"]
  node_chapter_reader["Chapter reader<br/>[ChapterReader.jsx]"]
  node_content_service["Content service<br/>[contentService.js]"]
  node_literature_entries["Literature entries<br/>[allWorksEntries.js]"]
  node_kural_data["Tirukkural data<br/>[tirukkural.js]"]
end

subgraph group_discovery["Discovery tools"]
  node_search_page["Search page<br/>[Search.jsx]"]
  node_search_service["Search service<br/>[searchService.js]"]
  node_assistant["Literary assistant<br/>[Assistant.jsx]"]
  node_ai_service["Assistant service<br/>[aiService.js]"]
  node_wordnet_page["WordNet<br/>[WordNetPage.jsx]"]
  node_knowledge_pages["Knowledge views"]
  node_knowledge_data["Knowledge datasets<br/>[wordnet.js]"]
  node_other_discovery["Discovery pages<br/>[Explore.jsx]"]
end

subgraph group_catalog["Literary catalog"]
  node_works["Works catalog<br/>[index.js]"]
  node_authors["Author catalog<br/>[authors.js]"]
  node_themes["Theme catalog<br/>[themes.js]"]
end

subgraph group_state["User state"]
  node_context["App context<br/>[AppContext.jsx]"]
  node_bookmarks[("Bookmark storage<br/>[bookmarkService.js]")]
  node_history[("Reading history<br/>[historyService.js]")]
end

node_reader_actor(("Reader"))

node_reader_actor -->|"opens routes"| node_app
node_app -->|"wraps routes"| node_layout
node_app -->|"routes to"| node_reader
node_app -->|"routes to"| node_library_pages
node_app -->|"routes to"| node_work_page
node_app -->|"routes to"| node_kural_reader
node_app -->|"routes to"| node_chapter_reader
node_app -->|"routes to"| node_search_page
node_app -->|"routes to"| node_assistant
node_app -->|"routes to"| node_wordnet_page
node_app -->|"routes to"| node_knowledge_pages
node_app -->|"routes to"| node_other_discovery
node_app -->|"provides state"| node_context
node_content_service -->|"loads entries"| node_literature_entries
node_content_service -->|"gets Kural entries"| node_kural_data
node_content_service -->|"looks up work"| node_works
node_search_page -->|"searches"| node_search_service
node_search_service -->|"searches"| node_works
node_search_service -->|"searches"| node_authors
node_search_service -->|"searches"| node_themes
node_search_service -->|"searches"| node_knowledge_data
node_ai_service -->|"retrieves results"| node_search_service
node_context -->|"loads and updates"| node_bookmarks
node_context -->|"loads and updates"| node_history
node_wordnet_page -->|"reads lexicon"| node_knowledge_data

click node_reader "https://github.com/vkrm03/cict/blob/main/src/pages/LiteratureReader.jsx"
click node_library_pages "https://github.com/vkrm03/cict/blob/main/src/pages/LibraryHome.jsx"
click node_work_page "https://github.com/vkrm03/cict/blob/main/src/pages/WorkOverview.jsx"
click node_kural_reader "https://github.com/vkrm03/cict/blob/main/src/pages/KuralReaderPage.jsx"
click node_chapter_reader "https://github.com/vkrm03/cict/blob/main/src/pages/ChapterReader.jsx"
click node_content_service "https://github.com/vkrm03/cict/blob/main/src/data/entries/contentService.js"
click node_literature_entries "https://github.com/vkrm03/cict/blob/main/src/data/entries/allWorksEntries.js"
click node_kural_data "https://github.com/vkrm03/cict/blob/main/src/data/tirukkural.js"
click node_search_page "https://github.com/vkrm03/cict/blob/main/src/pages/Search.jsx"
click node_search_service "https://github.com/vkrm03/cict/blob/main/src/services/searchService.js"
click node_assistant "https://github.com/vkrm03/cict/blob/main/src/pages/Assistant.jsx"
click node_ai_service "https://github.com/vkrm03/cict/blob/main/src/services/aiService.js"
click node_wordnet_page "https://github.com/vkrm03/cict/blob/main/src/pages/WordNetPage.jsx"
click node_knowledge_pages "https://github.com/vkrm03/cict/blob/main/src/pages/KnowledgeGraphPage.jsx"
click node_knowledge_data "https://github.com/vkrm03/cict/blob/main/src/data/knowledge/wordnet.js"
click node_other_discovery "https://github.com/vkrm03/cict/blob/main/src/pages/Explore.jsx"
click node_app "https://github.com/vkrm03/cict/blob/main/src/App.jsx"
click node_layout "https://github.com/vkrm03/cict/blob/main/src/components/layout/Layout.jsx"
click node_works "https://github.com/vkrm03/cict/blob/main/src/data/works/index.js"
click node_authors "https://github.com/vkrm03/cict/blob/main/src/data/authors/authors.js"
click node_themes "https://github.com/vkrm03/cict/blob/main/src/data/knowledge/themes.js"
click node_context "https://github.com/vkrm03/cict/blob/main/src/context/AppContext.jsx"
click node_bookmarks "https://github.com/vkrm03/cict/blob/main/src/services/bookmarkService.js"
click node_history "https://github.com/vkrm03/cict/blob/main/src/services/historyService.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_layout toneBlue
class node_reader,node_library_pages,node_work_page,node_kural_reader,node_chapter_reader,node_content_service,node_literature_entries,node_kural_data toneAmber
class node_search_page,node_search_service,node_assistant,node_ai_service,node_wordnet_page,node_knowledge_pages,node_knowledge_data,node_other_discovery toneMint
class node_works,node_authors,node_themes toneRose
class node_context,node_bookmarks,node_history,node_reader_actor toneIndigo
```

## Components

### Application shell

- [Route application](https://github.com/vkrm03/cict/blob/main/src/App.jsx): `src/App.jsx`
- [Shared layout](https://github.com/vkrm03/cict/blob/main/src/components/layout/Layout.jsx): `src/components/layout/Layout.jsx`

### Library and reading

- [Reader](https://github.com/vkrm03/cict/blob/main/src/pages/LiteratureReader.jsx): `src/pages/LiteratureReader.jsx`
- [Library pages](https://github.com/vkrm03/cict/blob/main/src/pages/LibraryHome.jsx): `src/pages/LibraryHome.jsx`
- [Work overview](https://github.com/vkrm03/cict/blob/main/src/pages/WorkOverview.jsx): `src/pages/WorkOverview.jsx`
- [Kural reader](https://github.com/vkrm03/cict/blob/main/src/pages/KuralReaderPage.jsx): `src/pages/KuralReaderPage.jsx`
- [Chapter reader](https://github.com/vkrm03/cict/blob/main/src/pages/ChapterReader.jsx): `src/pages/ChapterReader.jsx`
- [Content service](https://github.com/vkrm03/cict/blob/main/src/data/entries/contentService.js): `src/data/entries/contentService.js`
- [Literature entries](https://github.com/vkrm03/cict/blob/main/src/data/entries/allWorksEntries.js): `src/data/entries/allWorksEntries.js`
- [Tirukkural data](https://github.com/vkrm03/cict/blob/main/src/data/tirukkural.js): `src/data/tirukkural.js`

### Discovery tools

- [Search page](https://github.com/vkrm03/cict/blob/main/src/pages/Search.jsx): `src/pages/Search.jsx`
- [Search service](https://github.com/vkrm03/cict/blob/main/src/services/searchService.js): `src/services/searchService.js`
- [Literary assistant](https://github.com/vkrm03/cict/blob/main/src/pages/Assistant.jsx): `src/pages/Assistant.jsx`
- [Assistant service](https://github.com/vkrm03/cict/blob/main/src/services/aiService.js): `src/services/aiService.js`
- [WordNet](https://github.com/vkrm03/cict/blob/main/src/pages/WordNetPage.jsx): `src/pages/WordNetPage.jsx`
- [Knowledge views](https://github.com/vkrm03/cict/blob/main/src/pages/KnowledgeGraphPage.jsx): `src/pages/KnowledgeGraphPage.jsx`
- [Knowledge datasets](https://github.com/vkrm03/cict/blob/main/src/data/knowledge/wordnet.js): `src/data/knowledge/wordnet.js`
- [Discovery pages](https://github.com/vkrm03/cict/blob/main/src/pages/Explore.jsx): `src/pages/Explore.jsx`

### Literary catalog

- [Works catalog](https://github.com/vkrm03/cict/blob/main/src/data/works/index.js): `src/data/works/index.js`
- [Author catalog](https://github.com/vkrm03/cict/blob/main/src/data/authors/authors.js): `src/data/authors/authors.js`
- [Theme catalog](https://github.com/vkrm03/cict/blob/main/src/data/knowledge/themes.js): `src/data/knowledge/themes.js`

### User state

- [App context](https://github.com/vkrm03/cict/blob/main/src/context/AppContext.jsx): `src/context/AppContext.jsx`
- [Bookmark storage](https://github.com/vkrm03/cict/blob/main/src/services/bookmarkService.js): `src/services/bookmarkService.js`
- [Reading history](https://github.com/vkrm03/cict/blob/main/src/services/historyService.js): `src/services/historyService.js`

### Other components

- **Reader**

## Connections

- Reader → Route application: opens routes (evidence: `src/App.jsx`)
- Route application → Shared layout: wraps routes (evidence: `src/App.jsx`)
- Route application → Reader: routes to (evidence: `src/App.jsx`)
- Route application → Library pages: routes to (evidence: `src/App.jsx`)
- Route application → Work overview: routes to (evidence: `src/App.jsx`)
- Route application → Kural reader: routes to (evidence: `src/App.jsx`)
- Route application → Chapter reader: routes to (evidence: `src/App.jsx`)
- Route application → Search page: routes to (evidence: `src/App.jsx`)
- Route application → Literary assistant: routes to (evidence: `src/App.jsx`)
- Route application → WordNet: routes to (evidence: `src/App.jsx`)
- Route application → Knowledge views: routes to (evidence: `src/App.jsx`)
- Route application → Discovery pages: routes to (evidence: `src/App.jsx`)
- Route application → App context: provides state (evidence: `src/App.jsx`)
- Content service → Literature entries: loads entries (evidence: `src/data/entries/contentService.js`)
- Content service → Tirukkural data: gets Kural entries (evidence: `src/data/entries/contentService.js`)
- Content service → Works catalog: looks up work (evidence: `src/data/entries/contentService.js`)
- Search page → Search service: searches (evidence: `src/services/searchService.js`)
- Search service → Works catalog: searches (evidence: `src/services/searchService.js`)
- Search service → Author catalog: searches (evidence: `src/services/searchService.js`)
- Search service → Theme catalog: searches (evidence: `src/services/searchService.js`)
- Search service → Knowledge datasets: searches (evidence: `src/services/searchService.js`)
- Assistant service → Search service: retrieves results (evidence: `src/services/aiService.js`)
- App context → Bookmark storage: loads and updates (evidence: `src/context/AppContext.jsx`)
- App context → Reading history: loads and updates (evidence: `src/context/AppContext.jsx`)
- WordNet → Knowledge datasets: reads lexicon (evidence: `src/pages/WordNetPage.jsx`)
