# ashok-a15/vensaira-ai architecture

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

- Interactive diagram: https://gitdiagram.com/ashok-a15/vensaira-ai
- Repository: https://github.com/ashok-a15/vensaira-ai

## Overview

VENSAIRA AI combines a corporate information portal and eLearning experience with a careers chatbot backend. Visitors navigate corporate, AI, service and industry content; learners browse courses and use account/dashboard routes. Candidates interact with the chatbot to submit applications, track assessment progress and conduct voice interviews. The backend flow is shown where source excerpts establish ownership; major documented frontend branches are preserved. Some unsampled eLearning and interview internals are represented at their supported directory paths.

Main entry points: [`vensaira-react/src/App.jsx`](https://github.com/ashok-a15/vensaira-ai/blob/main/vensaira-react/src/App.jsx) (Route Shell), [`backend/src/modules/chatbot/services/application.service.js`](https://github.com/ashok-a15/vensaira-ai/blob/main/backend/src/modules/chatbot/services/application.service.js) (Application Service), [`vensaira-react/src/pages/elearning`](https://github.com/ashok-a15/vensaira-ai/tree/main/vensaira-react/src/pages/elearning) (Learning Pages), [`backend/src/modules/chatbot/routes`](https://github.com/ashok-a15/vensaira-ai/tree/main/backend/src/modules/chatbot/routes) (API Routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Corporate Portal"]
  node_app["Route Shell<br/>[App.jsx]"]
  node_corp["Corporate Pages"]
  node_ai["AI Solutions"]
  node_services["Service Pages"]
  node_industries["Industry Pages"]
  node_service_data["Service Catalog<br/>[services.js]"]
end

subgraph group_learn["eLearning"]
  node_elearn_pages["Learning Pages"]
  node_auth["Learner State<br/>[AuthContext.jsx]"]
  node_course_data["Course Catalog<br/>[courses.js]"]
end

subgraph group_career_ui["Careers Chat UI"]
  node_chat_ui["Chatbot Interface"]
  node_chat_hooks["Chat State Hooks"]
  node_chat_api["Frontend API Clients"]
end

subgraph group_api["Careers API"]
  node_server["API Server<br/>[server.js]"]
  node_routes["API Routes"]
  node_application["Application Controller"]
  node_app_validation["Application Validation"]
  node_app_service["Application Service"]
  node_assessment["Assessment Workflow"]
  node_interview["Voice Interviews"]
  node_chat_controller["Chat Controller<br/>[chat.controller.js]"]
  node_chat_service["Chat Service<br/>[chat.service.js]"]
end

subgraph group_persist["Persistence"]
  node_db_conn["Mongo Connection<br/>[db.js]"]
  node_models[("Candidate Records")]
  node_store[("Memory Fallback<br/>[store.js]")]
end

node_visitor(("Visitor"))
node_candidate(("Candidate"))

node_visitor -->|"opens"| node_app
node_app -->|"routes to"| node_corp
node_app -->|"routes to"| node_ai
node_app -->|"routes to"| node_services
node_app -->|"routes to"| node_industries
node_app -->|"routes to"| node_elearn_pages
node_services -->|"reads"| node_service_data
node_elearn_pages -->|"uses"| node_auth
node_elearn_pages -->|"reads"| node_course_data
node_candidate -->|"interacts"| node_chat_ui
node_app -->|"renders"| node_chat_ui
node_chat_ui -.->|"delegates to"| node_chat_hooks
node_chat_hooks -->|"calls"| node_chat_api
node_chat_api -.->|"HTTP requests"| node_server
node_server -->|"mounts"| node_routes
node_routes -->|"dispatches"| node_application
node_routes -->|"dispatches"| node_chat_controller
node_application -->|"validates with"| node_app_validation
node_application -->|"calls"| node_app_service
node_app_service -->|"checks status"| node_db_conn
node_app_service -->|"reads and writes"| node_models
node_app_service -->|"reads and writes"| node_store
node_app_service -.->|"prepares assessment"| node_assessment
node_chat_controller -->|"calls"| node_chat_service
node_chat_service -.->|"checks status"| node_db_conn
node_chat_service -.->|"uses"| node_store
node_candidate -.->|"takes interview"| node_interview

click node_app "https://github.com/ashok-a15/vensaira-ai/blob/main/vensaira-react/src/App.jsx"
click node_corp "https://github.com/ashok-a15/vensaira-ai/tree/main/vensaira-react/src/pages"
click node_ai "https://github.com/ashok-a15/vensaira-ai/tree/main/vensaira-react/src/pages"
click node_services "https://github.com/ashok-a15/vensaira-ai/tree/main/vensaira-react/src/pages/services"
click node_industries "https://github.com/ashok-a15/vensaira-ai/tree/main/vensaira-react/src/pages/industries"
click node_service_data "https://github.com/ashok-a15/vensaira-ai/blob/main/vensaira-react/src/data/services.js"
click node_elearn_pages "https://github.com/ashok-a15/vensaira-ai/tree/main/vensaira-react/src/pages/elearning"
click node_auth "https://github.com/ashok-a15/vensaira-ai/blob/main/vensaira-react/src/context/AuthContext.jsx"
click node_course_data "https://github.com/ashok-a15/vensaira-ai/blob/main/vensaira-react/src/data/courses.js"
click node_chat_ui "https://github.com/ashok-a15/vensaira-ai/tree/main/vensaira-react/src/components/chatbot"
click node_chat_hooks "https://github.com/ashok-a15/vensaira-ai/tree/main/vensaira-react/src/components/chatbot/hooks"
click node_chat_api "https://github.com/ashok-a15/vensaira-ai/tree/main/vensaira-react/src/components/chatbot/services"
click node_server "https://github.com/ashok-a15/vensaira-ai/blob/main/backend/server.js"
click node_routes "https://github.com/ashok-a15/vensaira-ai/tree/main/backend/src/modules/chatbot/routes"
click node_application "https://github.com/ashok-a15/vensaira-ai/blob/main/backend/src/modules/chatbot/controllers/application.controller.js"
click node_app_validation "https://github.com/ashok-a15/vensaira-ai/blob/main/backend/src/modules/chatbot/validators/application.validator.js"
click node_app_service "https://github.com/ashok-a15/vensaira-ai/blob/main/backend/src/modules/chatbot/services/application.service.js"
click node_assessment "https://github.com/ashok-a15/vensaira-ai/blob/main/backend/src/modules/chatbot/services/assessment.service.js"
click node_interview "https://github.com/ashok-a15/vensaira-ai/blob/main/backend/src/modules/chatbot/services/interview.service.js"
click node_chat_controller "https://github.com/ashok-a15/vensaira-ai/blob/main/backend/src/modules/chatbot/controllers/chat.controller.js"
click node_chat_service "https://github.com/ashok-a15/vensaira-ai/blob/main/backend/src/modules/chatbot/services/chat.service.js"
click node_db_conn "https://github.com/ashok-a15/vensaira-ai/blob/main/backend/db.js"
click node_models "https://github.com/ashok-a15/vensaira-ai/tree/main/backend/src/modules/chatbot/models"
click node_store "https://github.com/ashok-a15/vensaira-ai/blob/main/backend/src/modules/chatbot/utils/store.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_corp,node_ai,node_services,node_industries,node_service_data toneBlue
class node_elearn_pages,node_auth,node_course_data toneAmber
class node_chat_ui,node_chat_hooks,node_chat_api toneMint
class node_server,node_routes,node_application,node_app_validation,node_app_service,node_assessment,node_interview,node_chat_controller,node_chat_service toneRose
class node_db_conn,node_models,node_store,node_visitor,node_candidate toneIndigo
```

## Components

### Corporate Portal

- [Route Shell](https://github.com/ashok-a15/vensaira-ai/blob/main/vensaira-react/src/App.jsx): `vensaira-react/src/App.jsx`
- [Corporate Pages](https://github.com/ashok-a15/vensaira-ai/tree/main/vensaira-react/src/pages): `vensaira-react/src/pages`
- [AI Solutions](https://github.com/ashok-a15/vensaira-ai/tree/main/vensaira-react/src/pages): `vensaira-react/src/pages`
- [Service Pages](https://github.com/ashok-a15/vensaira-ai/tree/main/vensaira-react/src/pages/services): `vensaira-react/src/pages/services`
- [Industry Pages](https://github.com/ashok-a15/vensaira-ai/tree/main/vensaira-react/src/pages/industries): `vensaira-react/src/pages/industries`
- [Service Catalog](https://github.com/ashok-a15/vensaira-ai/blob/main/vensaira-react/src/data/services.js): `vensaira-react/src/data/services.js`

### eLearning

- [Learning Pages](https://github.com/ashok-a15/vensaira-ai/tree/main/vensaira-react/src/pages/elearning): `vensaira-react/src/pages/elearning`
- [Learner State](https://github.com/ashok-a15/vensaira-ai/blob/main/vensaira-react/src/context/AuthContext.jsx): `vensaira-react/src/context/AuthContext.jsx`
- [Course Catalog](https://github.com/ashok-a15/vensaira-ai/blob/main/vensaira-react/src/data/courses.js): `vensaira-react/src/data/courses.js`

### Careers Chat UI

- [Chatbot Interface](https://github.com/ashok-a15/vensaira-ai/tree/main/vensaira-react/src/components/chatbot): `vensaira-react/src/components/chatbot`
- [Chat State Hooks](https://github.com/ashok-a15/vensaira-ai/tree/main/vensaira-react/src/components/chatbot/hooks): `vensaira-react/src/components/chatbot/hooks`
- [Frontend API Clients](https://github.com/ashok-a15/vensaira-ai/tree/main/vensaira-react/src/components/chatbot/services): `vensaira-react/src/components/chatbot/services`

### Careers API

- [API Server](https://github.com/ashok-a15/vensaira-ai/blob/main/backend/server.js): `backend/server.js`
- [API Routes](https://github.com/ashok-a15/vensaira-ai/tree/main/backend/src/modules/chatbot/routes): `backend/src/modules/chatbot/routes`
- [Application Controller](https://github.com/ashok-a15/vensaira-ai/blob/main/backend/src/modules/chatbot/controllers/application.controller.js): `backend/src/modules/chatbot/controllers/application.controller.js`
- [Application Validation](https://github.com/ashok-a15/vensaira-ai/blob/main/backend/src/modules/chatbot/validators/application.validator.js): `backend/src/modules/chatbot/validators/application.validator.js`
- [Application Service](https://github.com/ashok-a15/vensaira-ai/blob/main/backend/src/modules/chatbot/services/application.service.js): `backend/src/modules/chatbot/services/application.service.js`
- [Assessment Workflow](https://github.com/ashok-a15/vensaira-ai/blob/main/backend/src/modules/chatbot/services/assessment.service.js): `backend/src/modules/chatbot/services/assessment.service.js`
- [Voice Interviews](https://github.com/ashok-a15/vensaira-ai/blob/main/backend/src/modules/chatbot/services/interview.service.js): `backend/src/modules/chatbot/services/interview.service.js`
- [Chat Controller](https://github.com/ashok-a15/vensaira-ai/blob/main/backend/src/modules/chatbot/controllers/chat.controller.js): `backend/src/modules/chatbot/controllers/chat.controller.js`
- [Chat Service](https://github.com/ashok-a15/vensaira-ai/blob/main/backend/src/modules/chatbot/services/chat.service.js): `backend/src/modules/chatbot/services/chat.service.js`

### Persistence

- [Mongo Connection](https://github.com/ashok-a15/vensaira-ai/blob/main/backend/db.js): `backend/db.js`
- [Candidate Records](https://github.com/ashok-a15/vensaira-ai/tree/main/backend/src/modules/chatbot/models): `backend/src/modules/chatbot/models`
- [Memory Fallback](https://github.com/ashok-a15/vensaira-ai/blob/main/backend/src/modules/chatbot/utils/store.js): `backend/src/modules/chatbot/utils/store.js`

### Other components

- **Visitor**
- **Candidate**

## Connections

- Visitor → Route Shell: opens (evidence: `vensaira-react/src/App.jsx`)
- Route Shell → Corporate Pages: routes to (evidence: `vensaira-react/src/App.jsx`)
- Route Shell → AI Solutions: routes to (evidence: `vensaira-react/src/App.jsx`)
- Route Shell → Service Pages: routes to (evidence: `vensaira-react/src/App.jsx`)
- Route Shell → Industry Pages: routes to (evidence: `vensaira-react/src/App.jsx`)
- Route Shell → Learning Pages: routes to (evidence: `vensaira-react/src/App.jsx`)
- Service Pages → Service Catalog: reads (evidence: `vensaira-react/src/pages/services/SoftwareEngineeringPage.jsx`)
- Learning Pages → Learner State: uses (evidence: `vensaira-react/src/pages/elearning/CourseDetails.jsx`)
- Learning Pages → Course Catalog: reads (evidence: `vensaira-react/src/pages/elearning/CourseDetails.jsx`)
- Candidate → Chatbot Interface: interacts (evidence: `README.md`)
- Route Shell → Chatbot Interface: renders (evidence: `vensaira-react/src/App.jsx`)
- Chatbot Interface → Chat State Hooks: delegates to (evidence: `vensaira-react/src/components/chatbot/hooks/useCandidateApplication.js`)
- Chat State Hooks → Frontend API Clients: calls (evidence: `vensaira-react/src/components/chatbot/hooks/useCandidateApplication.js`)
- Frontend API Clients → API Server: HTTP requests
- API Server → API Routes: mounts (evidence: `backend/server.js`)
- API Routes → Application Controller: dispatches (evidence: `backend/src/modules/chatbot/routes/application.routes.js`)
- API Routes → Chat Controller: dispatches (evidence: `backend/src/modules/chatbot/routes/chat.routes.js`)
- Application Controller → Application Validation: validates with (evidence: `backend/src/modules/chatbot/controllers/application.controller.js`)
- Application Controller → Application Service: calls (evidence: `backend/src/modules/chatbot/controllers/application.controller.js`)
- Application Service → Mongo Connection: checks status (evidence: `backend/src/modules/chatbot/services/application.service.js`)
- Application Service → Candidate Records: reads and writes (evidence: `backend/src/modules/chatbot/services/application.service.js`)
- Application Service → Memory Fallback: reads and writes (evidence: `backend/src/modules/chatbot/services/application.service.js`)
- Application Service → Assessment Workflow: prepares assessment
- Chat Controller → Chat Service: calls (evidence: `backend/src/modules/chatbot/controllers/chat.controller.js`)
- Chat Service → Mongo Connection: checks status (evidence: `backend/src/modules/chatbot/services/chat.service.js`)
- Chat Service → Memory Fallback: uses (evidence: `backend/src/modules/chatbot/services/chat.service.js`)
- Candidate → Voice Interviews: takes interview
