# sakshampaliwal21/smart-competency-diagnostic architecture

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

- Interactive diagram: https://gitdiagram.com/sakshampaliwal21/smart-competency-diagnostic
- Repository: https://github.com/sakshampaliwal21/smart-competency-diagnostic

## Overview

Smart Competency Diagnostic is a candidate-facing app for account access, profile management, technical assessment, score and skill-gap reporting, and job/course suggestions. The main flow is mobile navigation → API requests → authenticated backend routes → PostgreSQL-backed results. Assessment and recommendations are separate domain stages; profile and authentication support them. Backend route and calculation details are sampled, while several frontend screens are known through the source index only, so their detailed behavior is not inferred.

Main entry points: [`frontend/App.js`](https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/frontend/App.js) (Screen navigation), [`frontend/src/api.js`](https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/frontend/src/api.js) (HTTP API client), [`backend/src/db.js`](https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/backend/src/db.js) (Prisma client), [`backend/src/server.js`](https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/backend/src/server.js) (HTTP API server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Candidate app"]
  node_app["Screen navigation<br/>[App.js]"]
  node_login["Login screen<br/>[LoginScreen.js]"]
  node_register["Registration screen<br/>[RegisterScreen.js]"]
  node_dashboard["Candidate dashboard<br/>[DashboardScreen.js]"]
  node_assessment_ui["Assessment screen"]
  node_report_ui["Performance report<br/>[ReportScreen.js]"]
  node_recommend_ui["Recommendations screen"]
  node_recommend_alt["Recommendation view"]
  node_client_api["HTTP API client<br/>[api.js]"]
end

subgraph group_api["Backend services"]
  node_server["HTTP API server<br/>[server.js]"]
  node_auth["Account access<br/>[auth.js]"]
  node_middleware["JWT authorization<br/>[authMiddleware.js]"]
  node_profile["Candidate profile<br/>[profile.js]"]
  node_prisma["Prisma client<br/>[db.js]"]
  node_database[("PostgreSQL data<br/>[schema.prisma]")]
end

subgraph group_assessment["Assessment results"]
  node_assessment["Assessment scoring<br/>[assessment.js]"]
  node_question_seed["Question seeding<br/>[seedQuestions.js]"]
end

subgraph group_recommend["Career guidance"]
  node_recommendations["Job and course matching<br/>[recommendations.js]"]
end

node_candidate(("Candidate"))

node_candidate -->|"uses"| node_app
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_register
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_assessment_ui
node_app -->|"routes to"| node_recommend_ui
node_app -->|"routes to"| node_report_ui
node_login -->|"requests login"| node_client_api
node_register -->|"requests signup"| node_client_api
node_dashboard -->|"loads profile"| node_client_api
node_assessment_ui -->|"loads and submits"| node_client_api
node_report_ui -->|"loads report"| node_client_api
node_recommend_ui -->|"loads suggestions"| node_client_api
node_recommend_alt -->|"requests data"| node_client_api
node_client_api -->|"sends HTTP requests"| node_server
node_server -->|"mounts routes"| node_auth
node_server -->|"mounts routes"| node_profile
node_server -->|"mounts routes"| node_assessment
node_server -->|"mounts routes"| node_recommendations
node_auth -->|"reads and writes"| node_prisma
node_profile -->|"reads and writes"| node_prisma
node_assessment -->|"reads and writes"| node_prisma
node_recommendations -->|"reads records"| node_prisma
node_prisma -.->|"accesses"| node_database
node_auth -.->|"protects routes"| node_middleware
node_profile -->|"protects routes"| node_middleware
node_assessment -->|"protects routes"| node_middleware
node_recommendations -->|"protects routes"| node_middleware
node_question_seed -.->|"uses client"| node_prisma

click node_app "https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/frontend/App.js"
click node_login "https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/frontend/src/screens/LoginScreen.js"
click node_register "https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/frontend/src/screens/RegisterScreen.js"
click node_dashboard "https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/frontend/src/screens/DashboardScreen.js"
click node_assessment_ui "https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/frontend/src/screens/AssessmentScreen.js"
click node_report_ui "https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/frontend/src/screens/ReportScreen.js"
click node_recommend_ui "https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/frontend/src/screens/RecommendationsScreen.js"
click node_recommend_alt "https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/frontend/src/screens/RecommendationScreen.js"
click node_client_api "https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/frontend/src/api.js"
click node_server "https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/backend/src/server.js"
click node_auth "https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/backend/src/auth.js"
click node_middleware "https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/backend/src/middleware/authMiddleware.js"
click node_profile "https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/backend/src/profile.js"
click node_assessment "https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/backend/src/assessment.js"
click node_question_seed "https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/backend/src/seedQuestions.js"
click node_recommendations "https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/backend/src/recommendations.js"
click node_prisma "https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/backend/src/db.js"
click node_database "https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/backend/prisma/schema.prisma"

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_login,node_register,node_dashboard,node_assessment_ui,node_report_ui,node_recommend_ui,node_recommend_alt,node_client_api toneBlue
class node_server,node_auth,node_middleware,node_profile,node_prisma,node_database toneAmber
class node_assessment,node_question_seed toneMint
class node_recommendations toneRose
class node_candidate toneIndigo
```

## Components

### Candidate app

- [Screen navigation](https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/frontend/App.js): `frontend/App.js`
- [Login screen](https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/frontend/src/screens/LoginScreen.js): `frontend/src/screens/LoginScreen.js`
- [Registration screen](https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/frontend/src/screens/RegisterScreen.js): `frontend/src/screens/RegisterScreen.js`
- [Candidate dashboard](https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/frontend/src/screens/DashboardScreen.js): `frontend/src/screens/DashboardScreen.js`
- [Assessment screen](https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/frontend/src/screens/AssessmentScreen.js): `frontend/src/screens/AssessmentScreen.js`
- [Performance report](https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/frontend/src/screens/ReportScreen.js): `frontend/src/screens/ReportScreen.js`
- [Recommendations screen](https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/frontend/src/screens/RecommendationsScreen.js): `frontend/src/screens/RecommendationsScreen.js`
- [Recommendation view](https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/frontend/src/screens/RecommendationScreen.js): `frontend/src/screens/RecommendationScreen.js`
- [HTTP API client](https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/frontend/src/api.js): `frontend/src/api.js`

### Backend services

- [HTTP API server](https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/backend/src/server.js): `backend/src/server.js`
- [Account access](https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/backend/src/auth.js): `backend/src/auth.js`
- [JWT authorization](https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/backend/src/middleware/authMiddleware.js): `backend/src/middleware/authMiddleware.js`
- [Candidate profile](https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/backend/src/profile.js): `backend/src/profile.js`
- [Prisma client](https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/backend/src/db.js): `backend/src/db.js`
- [PostgreSQL data](https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/backend/prisma/schema.prisma): `backend/prisma/schema.prisma`

### Assessment results

- [Assessment scoring](https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/backend/src/assessment.js): `backend/src/assessment.js`
- [Question seeding](https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/backend/src/seedQuestions.js): `backend/src/seedQuestions.js`

### Career guidance

- [Job and course matching](https://github.com/sakshampaliwal21/smart-competency-diagnostic/blob/main/backend/src/recommendations.js): `backend/src/recommendations.js`

### Other components

- **Candidate**

## Connections

- Candidate → Screen navigation: uses (evidence: `frontend/App.js`)
- Screen navigation → Login screen: routes to (evidence: `frontend/App.js`)
- Screen navigation → Registration screen: routes to (evidence: `frontend/App.js`)
- Screen navigation → Candidate dashboard: routes to (evidence: `frontend/App.js`)
- Screen navigation → Assessment screen: routes to (evidence: `frontend/App.js`)
- Screen navigation → Recommendations screen: routes to (evidence: `frontend/App.js`)
- Screen navigation → Performance report: routes to (evidence: `frontend/App.js`)
- Login screen → HTTP API client: requests login (evidence: `frontend/src/screens/LoginScreen.js`)
- Registration screen → HTTP API client: requests signup (evidence: `frontend/src/screens/RegisterScreen.js`)
- Candidate dashboard → HTTP API client: loads profile (evidence: `frontend/src/screens/DashboardScreen.js`)
- Assessment screen → HTTP API client: loads and submits (evidence: `frontend/src/screens/AssessmentScreen.js`)
- Performance report → HTTP API client: loads report (evidence: `frontend/src/screens/ReportScreen.js`)
- Recommendations screen → HTTP API client: loads suggestions (evidence: `frontend/src/screens/RecommendationsScreen.js`)
- Recommendation view → HTTP API client: requests data (evidence: `frontend/src/screens/RecommendationScreen.js`)
- HTTP API client → HTTP API server: sends HTTP requests (evidence: `frontend/src/api.js`)
- HTTP API server → Account access: mounts routes (evidence: `backend/src/server.js`)
- HTTP API server → Candidate profile: mounts routes (evidence: `backend/src/server.js`)
- HTTP API server → Assessment scoring: mounts routes (evidence: `backend/src/server.js`)
- HTTP API server → Job and course matching: mounts routes (evidence: `backend/src/server.js`)
- Account access → Prisma client: reads and writes (evidence: `backend/src/auth.js`)
- Candidate profile → Prisma client: reads and writes (evidence: `backend/src/profile.js`)
- Assessment scoring → Prisma client: reads and writes (evidence: `backend/src/assessment.js`)
- Job and course matching → Prisma client: reads records (evidence: `backend/src/recommendations.js`)
- Prisma client → PostgreSQL data: accesses
- Account access → JWT authorization: protects routes
- Candidate profile → JWT authorization: protects routes (evidence: `backend/src/profile.js`)
- Assessment scoring → JWT authorization: protects routes (evidence: `backend/src/assessment.js`)
- Job and course matching → JWT authorization: protects routes (evidence: `backend/src/recommendations.js`)
- Question seeding → Prisma client: uses client (evidence: `backend/src/seedQuestions.js`)
