# krishna-k19/krics architecture

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

- Interactive diagram: https://gitdiagram.com/krishna-k19/krics
- Repository: https://github.com/krishna-k19/krics

## Overview

KRICS is a career-development platform that turns a user’s profile and career goal into skill-gap, alignment, and career-intelligence results. The main flow is API request → authenticated domain controller → profile/evidence data and analysis services → API result. Separate branches cover GitHub-backed evidence, learning and progression, and career exploration. The README is empty; relationships for unsampled controllers are shown only where the route excerpt documents dispatch, and the graph does not assume unshown database or service wiring.

Main entry points: [`backend/routes/apiRoutes.js`](https://github.com/krishna-k19/krics/blob/main/backend/routes/apiRoutes.js) (API routes), [`backend/models`](https://github.com/krishna-k19/krics/tree/main/backend/models) (Career profile records), [`backend/services/skillGapEngine.js`](https://github.com/krishna-k19/krics/blob/main/backend/services/skillGapEngine.js) (Skill-gap analysis), [`backend/controllers/dashboardController.js`](https://github.com/krishna-k19/krics/blob/main/backend/controllers/dashboardController.js) (Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API and identity"]
  node_routes["API routes<br/>[apiRoutes.js]"]
  node_auth["Auth middleware<br/>[authMiddleware.js]"]
  node_authctrl["Authentication<br/>[authController.js]"]
end

subgraph group_profile["Career profile"]
  node_profilectrl["Profile and onboarding"]
  node_skillctrl["Skills<br/>[skillController.js]"]
  node_projectctrl["Projects"]
  node_expctrl["Experience"]
  node_certctrl["Certifications"]
  node_learningctrl["Learning"]
  node_profiledata[("Career profile records")]
end

subgraph group_insights["Career intelligence"]
  node_skillgap["Skill-gap analysis<br/>[skillGapEngine.js]"]
  node_alignment["Career alignment"]
  node_careerdna["Career DNA"]
  node_nextaction["Next actions"]
  node_dashboard["Dashboard"]
  node_intelligence["Intelligence APIs"]
end

subgraph group_evidence["Evidence and progression"]
  node_githubctrl["GitHub integration"]
  node_githubengine["GitHub evidence engine"]
  node_githubdata[("GitHub evidence records<br/>[GitHubRepo.js]")]
end

subgraph group_explore["Career exploration"]
  node_othercontrollers["Other career features"]
  node_quest["Quest progression<br/>[questService.js]"]
  node_activity["Activity tracking<br/>[activityService.js]"]
end

node_client(("User / client"))

node_client -->|"requests"| node_routes
node_routes -->|"protects routes"| node_auth
node_routes -->|"dispatches auth"| node_authctrl
node_routes -->|"dispatches profile"| node_profilectrl
node_routes -->|"dispatches skills"| node_skillctrl
node_routes -->|"dispatches projects"| node_projectctrl
node_routes -->|"dispatches experience"| node_expctrl
node_routes -->|"dispatches certifications"| node_certctrl
node_routes -->|"dispatches learning"| node_learningctrl
node_routes -->|"dispatches GitHub"| node_githubctrl
node_routes -->|"dispatches dashboard"| node_dashboard
node_routes -->|"dispatches insights"| node_intelligence
node_routes -->|"dispatches features"| node_othercontrollers
node_authctrl -->|"reads and writes"| node_profiledata
node_skillctrl -->|"reads and writes"| node_profiledata
node_projectctrl -->|"reads and writes"| node_profiledata
node_expctrl -->|"reads and writes"| node_profiledata
node_certctrl -->|"reads and writes"| node_profiledata
node_learningctrl -->|"reads and writes"| node_profiledata
node_githubctrl -->|"runs sync"| node_githubengine
node_githubengine -->|"persists evidence"| node_githubdata
node_githubengine -->|"fetches GitHub API"| node_client
node_githubctrl -->|"calculates gaps"| node_skillgap
node_githubctrl -->|"calculates alignment"| node_alignment
node_dashboard -->|"calculates gaps"| node_skillgap
node_dashboard -->|"calculates alignment"| node_alignment
node_dashboard -->|"builds career DNA"| node_careerdna
node_dashboard -->|"gets next actions"| node_nextaction
node_intelligence -->|"calculates alignment"| node_alignment
node_intelligence -->|"gets career DNA"| node_careerdna
node_intelligence -->|"calculates gaps"| node_skillgap
node_intelligence -->|"gets next actions"| node_nextaction
node_skillgap -->|"reads profile evidence"| node_profiledata
node_alignment -->|"reads evidence"| node_profiledata
node_skillctrl -->|"calculates gaps"| node_skillgap
node_projectctrl -->|"calculates gaps"| node_skillgap
node_expctrl -->|"calculates gaps"| node_skillgap
node_learningctrl -->|"calculates gaps"| node_skillgap
node_authctrl -->|"logs activity"| node_activity
node_certctrl -->|"logs activity"| node_activity
node_activity -->|"stores events"| node_profiledata
node_othercontrollers -.->|"quest features"| node_quest

click node_routes "https://github.com/krishna-k19/krics/blob/main/backend/routes/apiRoutes.js"
click node_auth "https://github.com/krishna-k19/krics/blob/main/backend/middleware/authMiddleware.js"
click node_authctrl "https://github.com/krishna-k19/krics/blob/main/backend/controllers/authController.js"
click node_profilectrl "https://github.com/krishna-k19/krics/blob/main/backend/controllers/profileController.js"
click node_skillctrl "https://github.com/krishna-k19/krics/blob/main/backend/controllers/skillController.js"
click node_projectctrl "https://github.com/krishna-k19/krics/blob/main/backend/controllers/projectController.js"
click node_expctrl "https://github.com/krishna-k19/krics/blob/main/backend/controllers/experienceController.js"
click node_certctrl "https://github.com/krishna-k19/krics/blob/main/backend/controllers/certificationController.js"
click node_learningctrl "https://github.com/krishna-k19/krics/blob/main/backend/controllers/learningController.js"
click node_profiledata "https://github.com/krishna-k19/krics/tree/main/backend/models"
click node_githubctrl "https://github.com/krishna-k19/krics/blob/main/backend/controllers/githubController.js"
click node_githubengine "https://github.com/krishna-k19/krics/blob/main/backend/services/githubEvidenceEngine.js"
click node_githubdata "https://github.com/krishna-k19/krics/blob/main/backend/models/GitHubRepo.js"
click node_skillgap "https://github.com/krishna-k19/krics/blob/main/backend/services/skillGapEngine.js"
click node_alignment "https://github.com/krishna-k19/krics/blob/main/backend/services/careerAlignmentService.js"
click node_careerdna "https://github.com/krishna-k19/krics/blob/main/backend/services/careerDnaService.js"
click node_nextaction "https://github.com/krishna-k19/krics/blob/main/backend/services/nextActionService.js"
click node_dashboard "https://github.com/krishna-k19/krics/blob/main/backend/controllers/dashboardController.js"
click node_intelligence "https://github.com/krishna-k19/krics/blob/main/backend/controllers/intelligenceController.js"
click node_othercontrollers "https://github.com/krishna-k19/krics/tree/main/backend/controllers"
click node_quest "https://github.com/krishna-k19/krics/blob/main/backend/services/questService.js"
click node_activity "https://github.com/krishna-k19/krics/blob/main/backend/services/activityService.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_routes,node_auth,node_authctrl,node_client toneBlue
class node_profilectrl,node_skillctrl,node_projectctrl,node_expctrl,node_certctrl,node_learningctrl,node_profiledata toneAmber
class node_skillgap,node_alignment,node_careerdna,node_nextaction,node_dashboard,node_intelligence toneMint
class node_githubctrl,node_githubengine,node_githubdata toneRose
class node_othercontrollers,node_quest,node_activity toneIndigo
```

## Components

### API and identity

- [API routes](https://github.com/krishna-k19/krics/blob/main/backend/routes/apiRoutes.js): `backend/routes/apiRoutes.js`
- [Auth middleware](https://github.com/krishna-k19/krics/blob/main/backend/middleware/authMiddleware.js): `backend/middleware/authMiddleware.js`
- [Authentication](https://github.com/krishna-k19/krics/blob/main/backend/controllers/authController.js): `backend/controllers/authController.js`

### Career profile

- [Profile and onboarding](https://github.com/krishna-k19/krics/blob/main/backend/controllers/profileController.js): `backend/controllers/profileController.js`
- [Skills](https://github.com/krishna-k19/krics/blob/main/backend/controllers/skillController.js): `backend/controllers/skillController.js`
- [Projects](https://github.com/krishna-k19/krics/blob/main/backend/controllers/projectController.js): `backend/controllers/projectController.js`
- [Experience](https://github.com/krishna-k19/krics/blob/main/backend/controllers/experienceController.js): `backend/controllers/experienceController.js`
- [Certifications](https://github.com/krishna-k19/krics/blob/main/backend/controllers/certificationController.js): `backend/controllers/certificationController.js`
- [Learning](https://github.com/krishna-k19/krics/blob/main/backend/controllers/learningController.js): `backend/controllers/learningController.js`
- [Career profile records](https://github.com/krishna-k19/krics/tree/main/backend/models): `backend/models`

### Career intelligence

- [Skill-gap analysis](https://github.com/krishna-k19/krics/blob/main/backend/services/skillGapEngine.js): `backend/services/skillGapEngine.js`
- [Career alignment](https://github.com/krishna-k19/krics/blob/main/backend/services/careerAlignmentService.js): `backend/services/careerAlignmentService.js`
- [Career DNA](https://github.com/krishna-k19/krics/blob/main/backend/services/careerDnaService.js): `backend/services/careerDnaService.js`
- [Next actions](https://github.com/krishna-k19/krics/blob/main/backend/services/nextActionService.js): `backend/services/nextActionService.js`
- [Dashboard](https://github.com/krishna-k19/krics/blob/main/backend/controllers/dashboardController.js): `backend/controllers/dashboardController.js`
- [Intelligence APIs](https://github.com/krishna-k19/krics/blob/main/backend/controllers/intelligenceController.js): `backend/controllers/intelligenceController.js`

### Evidence and progression

- [GitHub integration](https://github.com/krishna-k19/krics/blob/main/backend/controllers/githubController.js): `backend/controllers/githubController.js`
- [GitHub evidence engine](https://github.com/krishna-k19/krics/blob/main/backend/services/githubEvidenceEngine.js): `backend/services/githubEvidenceEngine.js`
- [GitHub evidence records](https://github.com/krishna-k19/krics/blob/main/backend/models/GitHubRepo.js): `backend/models/GitHubRepo.js`

### Career exploration

- [Other career features](https://github.com/krishna-k19/krics/tree/main/backend/controllers): `backend/controllers`
- [Quest progression](https://github.com/krishna-k19/krics/blob/main/backend/services/questService.js): `backend/services/questService.js`
- [Activity tracking](https://github.com/krishna-k19/krics/blob/main/backend/services/activityService.js): `backend/services/activityService.js`

### Other components

- **User / client**

## Connections

- User / client → API routes: requests (evidence: `backend/routes/apiRoutes.js`)
- API routes → Auth middleware: protects routes (evidence: `backend/routes/apiRoutes.js`)
- API routes → Authentication: dispatches auth (evidence: `backend/routes/apiRoutes.js`)
- API routes → Profile and onboarding: dispatches profile (evidence: `backend/routes/apiRoutes.js`)
- API routes → Skills: dispatches skills (evidence: `backend/routes/apiRoutes.js`)
- API routes → Projects: dispatches projects (evidence: `backend/routes/apiRoutes.js`)
- API routes → Experience: dispatches experience (evidence: `backend/routes/apiRoutes.js`)
- API routes → Certifications: dispatches certifications (evidence: `backend/routes/apiRoutes.js`)
- API routes → Learning: dispatches learning (evidence: `backend/routes/apiRoutes.js`)
- API routes → GitHub integration: dispatches GitHub (evidence: `backend/routes/apiRoutes.js`)
- API routes → Dashboard: dispatches dashboard (evidence: `backend/routes/apiRoutes.js`)
- API routes → Intelligence APIs: dispatches insights (evidence: `backend/routes/apiRoutes.js`)
- API routes → Other career features: dispatches features (evidence: `backend/routes/apiRoutes.js`)
- Authentication → Career profile records: reads and writes (evidence: `backend/controllers/authController.js`)
- Skills → Career profile records: reads and writes (evidence: `backend/controllers/skillController.js`)
- Projects → Career profile records: reads and writes (evidence: `backend/controllers/projectController.js`)
- Experience → Career profile records: reads and writes (evidence: `backend/controllers/experienceController.js`)
- Certifications → Career profile records: reads and writes (evidence: `backend/controllers/certificationController.js`)
- Learning → Career profile records: reads and writes (evidence: `backend/controllers/learningController.js`)
- GitHub integration → GitHub evidence engine: runs sync (evidence: `backend/controllers/githubController.js`)
- GitHub evidence engine → GitHub evidence records: persists evidence (evidence: `backend/services/githubEvidenceEngine.js`)
- GitHub evidence engine → User / client: fetches GitHub API (evidence: `backend/services/githubEvidenceEngine.js`)
- GitHub integration → Skill-gap analysis: calculates gaps (evidence: `backend/controllers/githubController.js`)
- GitHub integration → Career alignment: calculates alignment (evidence: `backend/controllers/githubController.js`)
- Dashboard → Skill-gap analysis: calculates gaps (evidence: `backend/controllers/dashboardController.js`)
- Dashboard → Career alignment: calculates alignment (evidence: `backend/controllers/dashboardController.js`)
- Dashboard → Career DNA: builds career DNA (evidence: `backend/controllers/dashboardController.js`)
- Dashboard → Next actions: gets next actions (evidence: `backend/controllers/dashboardController.js`)
- Intelligence APIs → Career alignment: calculates alignment (evidence: `backend/controllers/intelligenceController.js`)
- Intelligence APIs → Career DNA: gets career DNA (evidence: `backend/controllers/intelligenceController.js`)
- Intelligence APIs → Skill-gap analysis: calculates gaps (evidence: `backend/controllers/intelligenceController.js`)
- Intelligence APIs → Next actions: gets next actions (evidence: `backend/controllers/intelligenceController.js`)
- Skill-gap analysis → Career profile records: reads profile evidence (evidence: `backend/services/skillGapEngine.js`)
- Career alignment → Career profile records: reads evidence (evidence: `backend/services/careerAlignmentService.js`)
- Skills → Skill-gap analysis: calculates gaps (evidence: `backend/controllers/skillController.js`)
- Projects → Skill-gap analysis: calculates gaps (evidence: `backend/controllers/projectController.js`)
- Experience → Skill-gap analysis: calculates gaps (evidence: `backend/controllers/experienceController.js`)
- Learning → Skill-gap analysis: calculates gaps (evidence: `backend/controllers/learningController.js`)
- Authentication → Activity tracking: logs activity (evidence: `backend/controllers/authController.js`)
- Certifications → Activity tracking: logs activity (evidence: `backend/controllers/certificationController.js`)
- Activity tracking → Career profile records: stores events (evidence: `backend/services/activityService.js`)
- Other career features → Quest progression: quest features
