# vineet-chandel/codexa architecture

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

- Interactive diagram: https://gitdiagram.com/vineet-chandel/codexa
- Repository: https://github.com/vineet-chandel/codexa

## Overview

Codexa combines team project management and adversarial AI issue verification with developer networking, live chat, personal productivity, and a developer toolkit. The main workflow is a user entering the protected app, creating and managing team projects and issues, submitting evidence, then receiving a persisted verification verdict. The graph also preserves README capabilities whose implementation was not sampled. Solid edges use README or source-index relationships; dashed, uncited edges mark documented-but-unsampled capabilities. Several broad subsystem nodes use exact source directories where individual implementations were not evidenced.

Main entry points: [`Frontend/src/App.jsx`](https://github.com/vineet-chandel/codexa/blob/main/Frontend/src/App.jsx) (React app), [`Backend/src/index.js`](https://github.com/vineet-chandel/codexa/blob/main/Backend/src/index.js) (Express service), [`Backend/src/workers/evidenceCollectorWorker.js`](https://github.com/vineet-chandel/codexa/blob/main/Backend/src/workers/evidenceCollectorWorker.js) (Evidence worker), [`Backend/src/controllers/issueController.js`](https://github.com/vineet-chandel/codexa/blob/main/Backend/src/controllers/issueController.js) (Issue workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_frontend["React app<br/>[App.jsx]"]
  node_auth["Auth guards<br/>[ProtectedRoute.jsx]"]
  node_backend["Express service<br/>[index.js]"]
end

subgraph group_team["TeamOS"]
  node_teams["Teams<br/>[teamController.js]"]
  node_projects["Projects"]
  node_issues["Issue workflow<br/>[issueController.js]"]
  node_issue_store[("Issue records<br/>[issue.js]")]
  node_project_store[("Project records<br/>[project.js]")]
  node_github["GitHub integration<br/>[githubService.js]"]
end

subgraph group_verify["Verification"]
  node_evidence_worker["Evidence worker"]
  node_evidence_package["Evidence package"]
  node_engine["Verification engine"]
  node_lifecycle["Verdict lifecycle"]
  node_contracts[("Verification contracts")]
  node_results[("Verification results")]
end

subgraph group_social["Developer network"]
  node_network["Developer discovery"]
  node_chat["Realtime chat<br/>[chatController.js]"]
  node_chat_store[("Chat records<br/>[conversation.js]")]
  node_messages[("Messages<br/>[message.js]")]
  node_socket["WebSocket service"]
end

subgraph group_productivity["Personal tools"]
  node_goals_notes["Goals and notes"]
  node_notes_ui["Notes workspace<br/>[Notes.jsx]"]
  node_scheduler["Schedules"]
  node_toolkit["Docs and flashcards"]
  node_bot["Shastra assistant<br/>[bot.controller.js]"]
  node_bot_ui["Assistant interface<br/>[Shastra.jsx]"]
end

node_user(("Developer"))
node_mongo[("MongoDB")]
node_redis[("Redis")]

node_user -->|"uses"| node_frontend
node_frontend -->|"guards routes"| node_auth
node_frontend -.->|"requests services"| node_backend
node_backend -.->|"routes requests"| node_teams
node_backend -->|"routes requests"| node_projects
node_backend -->|"routes requests"| node_issues
node_projects -->|"reads and writes"| node_project_store
node_issues -->|"reads and writes"| node_issue_store
node_projects -->|"fetches repositories"| node_github
node_issues -->|"queues generation"| node_contracts
node_issues -.->|"queues verification"| node_evidence_worker
node_evidence_worker -->|"collects evidence"| node_evidence_package
node_evidence_worker -->|"runs verification"| node_engine
node_evidence_worker -->|"persists verdict"| node_results
node_evidence_worker -->|"updates lifecycle"| node_lifecycle
node_engine -.->|"checks contract"| node_contracts
node_engine -.->|"may cache"| node_redis
node_lifecycle -->|"updates issue"| node_issue_store
node_frontend -.->|"opens discovery"| node_network
node_frontend -.->|"opens chat"| node_chat
node_chat -->|"reads and writes"| node_chat_store
node_chat -->|"reads and writes"| node_messages
node_frontend -.->|"connects live"| node_socket
node_frontend -->|"opens notes"| node_notes_ui
node_frontend -.->|"uses productivity tools"| node_goals_notes
node_frontend -.->|"opens scheduler"| node_scheduler
node_frontend -->|"opens toolkit"| node_toolkit
node_frontend -.->|"opens assistant"| node_bot_ui
node_bot_ui -.->|"sends prompts"| node_bot
node_backend -->|"persists product data"| node_mongo
node_backend -->|"uses cache and queues"| node_redis
node_user -.->|"creates team workspace"| node_teams
node_user -.->|"submits evidence"| node_issues

click node_frontend "https://github.com/vineet-chandel/codexa/blob/main/Frontend/src/App.jsx"
click node_auth "https://github.com/vineet-chandel/codexa/blob/main/Frontend/src/ProtectedRoute.jsx"
click node_teams "https://github.com/vineet-chandel/codexa/blob/main/Backend/src/controllers/teamController.js"
click node_projects "https://github.com/vineet-chandel/codexa/blob/main/Backend/src/controllers/projectController.js"
click node_issues "https://github.com/vineet-chandel/codexa/blob/main/Backend/src/controllers/issueController.js"
click node_issue_store "https://github.com/vineet-chandel/codexa/blob/main/Backend/src/models/issue.js"
click node_project_store "https://github.com/vineet-chandel/codexa/blob/main/Backend/src/models/project.js"
click node_github "https://github.com/vineet-chandel/codexa/blob/main/Backend/src/services/githubService.js"
click node_evidence_worker "https://github.com/vineet-chandel/codexa/blob/main/Backend/src/workers/evidenceCollectorWorker.js"
click node_evidence_package "https://github.com/vineet-chandel/codexa/blob/main/Backend/src/services/evidencePackageService.js"
click node_engine "https://github.com/vineet-chandel/codexa/blob/main/Backend/src/services/verificationEngine.js"
click node_lifecycle "https://github.com/vineet-chandel/codexa/blob/main/Backend/src/services/verificationLifecycleService.js"
click node_contracts "https://github.com/vineet-chandel/codexa/blob/main/Backend/src/models/verificationContract.js"
click node_results "https://github.com/vineet-chandel/codexa/blob/main/Backend/src/models/verificationResult.js"
click node_network "https://github.com/vineet-chandel/codexa/tree/main/Backend/src/controllers"
click node_chat "https://github.com/vineet-chandel/codexa/blob/main/Backend/src/routes/chatController.js"
click node_chat_store "https://github.com/vineet-chandel/codexa/blob/main/Backend/src/models/conversation.js"
click node_messages "https://github.com/vineet-chandel/codexa/blob/main/Backend/src/models/message.js"
click node_socket "https://github.com/vineet-chandel/codexa/tree/main/Backend/src/Socket"
click node_goals_notes "https://github.com/vineet-chandel/codexa/tree/main/Backend/src/controllers"
click node_notes_ui "https://github.com/vineet-chandel/codexa/blob/main/Frontend/src/Pages/Notes.jsx"
click node_scheduler "https://github.com/vineet-chandel/codexa/blob/main/Backend/src/controllers/schedulesController.js"
click node_toolkit "https://github.com/vineet-chandel/codexa/tree/main/Frontend/src/Pages/Toolkit"
click node_bot "https://github.com/vineet-chandel/codexa/blob/main/Backend/src/controllers/bot.controller.js"
click node_bot_ui "https://github.com/vineet-chandel/codexa/blob/main/Frontend/src/Pages/Shastra/Shastra.jsx"
click node_backend "https://github.com/vineet-chandel/codexa/blob/main/Backend/src/index.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_frontend,node_auth,node_backend toneBlue
class node_teams,node_projects,node_issues,node_issue_store,node_project_store,node_github,node_mongo,node_redis toneAmber
class node_evidence_worker,node_evidence_package,node_engine,node_lifecycle,node_contracts,node_results toneMint
class node_network,node_chat,node_chat_store,node_messages,node_socket toneRose
class node_goals_notes,node_notes_ui,node_scheduler,node_toolkit,node_bot,node_bot_ui,node_user toneIndigo
```

## Components

### Web client

- [React app](https://github.com/vineet-chandel/codexa/blob/main/Frontend/src/App.jsx): `Frontend/src/App.jsx`
- [Auth guards](https://github.com/vineet-chandel/codexa/blob/main/Frontend/src/ProtectedRoute.jsx): `Frontend/src/ProtectedRoute.jsx`
- [Express service](https://github.com/vineet-chandel/codexa/blob/main/Backend/src/index.js): `Backend/src/index.js`

### TeamOS

- [Teams](https://github.com/vineet-chandel/codexa/blob/main/Backend/src/controllers/teamController.js): `Backend/src/controllers/teamController.js`
- [Projects](https://github.com/vineet-chandel/codexa/blob/main/Backend/src/controllers/projectController.js): `Backend/src/controllers/projectController.js`
- [Issue workflow](https://github.com/vineet-chandel/codexa/blob/main/Backend/src/controllers/issueController.js): `Backend/src/controllers/issueController.js`
- [Issue records](https://github.com/vineet-chandel/codexa/blob/main/Backend/src/models/issue.js): `Backend/src/models/issue.js`
- [Project records](https://github.com/vineet-chandel/codexa/blob/main/Backend/src/models/project.js): `Backend/src/models/project.js`
- [GitHub integration](https://github.com/vineet-chandel/codexa/blob/main/Backend/src/services/githubService.js): `Backend/src/services/githubService.js`

### Verification

- [Evidence worker](https://github.com/vineet-chandel/codexa/blob/main/Backend/src/workers/evidenceCollectorWorker.js): `Backend/src/workers/evidenceCollectorWorker.js`
- [Evidence package](https://github.com/vineet-chandel/codexa/blob/main/Backend/src/services/evidencePackageService.js): `Backend/src/services/evidencePackageService.js`
- [Verification engine](https://github.com/vineet-chandel/codexa/blob/main/Backend/src/services/verificationEngine.js): `Backend/src/services/verificationEngine.js`
- [Verdict lifecycle](https://github.com/vineet-chandel/codexa/blob/main/Backend/src/services/verificationLifecycleService.js): `Backend/src/services/verificationLifecycleService.js`
- [Verification contracts](https://github.com/vineet-chandel/codexa/blob/main/Backend/src/models/verificationContract.js): `Backend/src/models/verificationContract.js`
- [Verification results](https://github.com/vineet-chandel/codexa/blob/main/Backend/src/models/verificationResult.js): `Backend/src/models/verificationResult.js`

### Developer network

- [Developer discovery](https://github.com/vineet-chandel/codexa/tree/main/Backend/src/controllers): `Backend/src/controllers`
- [Realtime chat](https://github.com/vineet-chandel/codexa/blob/main/Backend/src/routes/chatController.js): `Backend/src/routes/chatController.js`
- [Chat records](https://github.com/vineet-chandel/codexa/blob/main/Backend/src/models/conversation.js): `Backend/src/models/conversation.js`
- [Messages](https://github.com/vineet-chandel/codexa/blob/main/Backend/src/models/message.js): `Backend/src/models/message.js`
- [WebSocket service](https://github.com/vineet-chandel/codexa/tree/main/Backend/src/Socket): `Backend/src/Socket`

### Personal tools

- [Goals and notes](https://github.com/vineet-chandel/codexa/tree/main/Backend/src/controllers): `Backend/src/controllers`
- [Notes workspace](https://github.com/vineet-chandel/codexa/blob/main/Frontend/src/Pages/Notes.jsx): `Frontend/src/Pages/Notes.jsx`
- [Schedules](https://github.com/vineet-chandel/codexa/blob/main/Backend/src/controllers/schedulesController.js): `Backend/src/controllers/schedulesController.js`
- [Docs and flashcards](https://github.com/vineet-chandel/codexa/tree/main/Frontend/src/Pages/Toolkit): `Frontend/src/Pages/Toolkit`
- [Shastra assistant](https://github.com/vineet-chandel/codexa/blob/main/Backend/src/controllers/bot.controller.js): `Backend/src/controllers/bot.controller.js`
- [Assistant interface](https://github.com/vineet-chandel/codexa/blob/main/Frontend/src/Pages/Shastra/Shastra.jsx): `Frontend/src/Pages/Shastra/Shastra.jsx`

### Other components

- **Developer**
- **MongoDB**
- **Redis**

## Connections

- Developer → React app: uses
- React app → Auth guards: guards routes (evidence: `Frontend/src/App.jsx`)
- React app → Express service: requests services
- Express service → Teams: routes requests
- Express service → Projects: routes requests (evidence: `Backend/src/index.js`)
- Express service → Issue workflow: routes requests (evidence: `Backend/src/index.js`)
- Projects → Project records: reads and writes (evidence: `Backend/src/controllers/projectController.js`)
- Issue workflow → Issue records: reads and writes (evidence: `Backend/src/controllers/issueController.js`)
- Projects → GitHub integration: fetches repositories (evidence: `Backend/src/controllers/projectController.js`)
- Issue workflow → Verification contracts: queues generation (evidence: `Backend/src/controllers/issueController.js`)
- Issue workflow → Evidence worker: queues verification
- Evidence worker → Evidence package: collects evidence (evidence: `Backend/src/workers/evidenceCollectorWorker.js`)
- Evidence worker → Verification engine: runs verification (evidence: `Backend/src/workers/evidenceCollectorWorker.js`)
- Evidence worker → Verification results: persists verdict (evidence: `Backend/src/workers/evidenceCollectorWorker.js`)
- Evidence worker → Verdict lifecycle: updates lifecycle (evidence: `Backend/src/workers/evidenceCollectorWorker.js`)
- Verification engine → Verification contracts: checks contract
- Verification engine → Redis: may cache
- Verdict lifecycle → Issue records: updates issue (evidence: `Backend/src/services/verificationLifecycleService.js`)
- React app → Developer discovery: opens discovery
- React app → Realtime chat: opens chat
- Realtime chat → Chat records: reads and writes (evidence: `Backend/src/routes/chatController.js`)
- Realtime chat → Messages: reads and writes (evidence: `Backend/src/routes/chatController.js`)
- React app → WebSocket service: connects live
- React app → Notes workspace: opens notes (evidence: `Frontend/src/App.jsx`)
- React app → Goals and notes: uses productivity tools
- React app → Schedules: opens scheduler
- React app → Docs and flashcards: opens toolkit (evidence: `Frontend/src/App.jsx`)
- React app → Assistant interface: opens assistant (evidence: `Frontend/src/App.jsx`)
- Assistant interface → Shastra assistant: sends prompts
- Express service → MongoDB: persists product data
- Express service → Redis: uses cache and queues
- Developer → Teams: creates team workspace
- Developer → Issue workflow: submits evidence
