# jitin2102/skillgreen architecture

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

- Interactive diagram: https://gitdiagram.com/jitin2102/skillgreen
- Repository: https://github.com/jitin2102/skillgreen

## Overview

SkillGreen is an ESG career-readiness assessment platform. A professional uses the React assessment experience to submit structured profile attributes; the FastAPI endpoint validates them, invokes the prediction model, and returns readiness, confidence, ESG pillar scores, and the weakest pillar. Authenticated assessments are saved for the dashboard’s history and profile features. Separate capabilities cover account/password and OTP access, profile management, and resume upload and text extraction. Feature-engineering and model behavior are described in the README; unsampled implementation details are represented only where the tree supports a path.

Main entry points: [`app.py`](https://github.com/jitin2102/skillgreen/blob/main/app.py) (FastAPI application), [`routes/resume.py`](https://github.com/jitin2102/skillgreen/blob/main/routes/resume.py) (Resume routes), [`auth/routes.py`](https://github.com/jitin2102/skillgreen/blob/main/auth/routes.py) (Authentication routes), [`db/database.py`](https://github.com/jitin2102/skillgreen/blob/main/db/database.py) (Database session)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["Route application<br/>[App.jsx]"]
  node_predictor["Readiness form<br/>[Predictor.jsx]"]
  node_dashboard["Profile dashboard<br/>[Dashboard.jsx]"]
  node_authui["Login and registration<br/>[Login.jsx]"]
  node_authcontext["Auth context<br/>[AuthContext.jsx]"]
  node_clientapi["API client<br/>[api.js]"]
end

subgraph group_api["API and domain"]
  node_application["FastAPI application<br/>[app.py]"]
  node_profiles["Profile routes<br/>[profile.py]"]
  node_resumeroutes["Resume routes<br/>[resume.py]"]
  node_parser["Resume text parser<br/>[parser.py]"]
end

subgraph group_auth["Identity"]
  node_authroutes["Authentication routes<br/>[routes.py]"]
  node_security["Token and OTP security<br/>[security.py]"]
  node_authdeps["User dependencies<br/>[dependencies.py]"]
end

subgraph group_assessment["Assessment engine"]
  node_inputschema["Input validation<br/>[user_input.py]"]
  node_response["Assessment response<br/>[response_model.py]"]
  node_predict["Prediction service<br/>[predict.py]"]
  node_modelartifact["Trained model<br/>[model.pkl]"]
end

subgraph group_storage["Persistence"]
  node_database["Database session<br/>[database.py]"]
  node_models["Account and assessment records<br/>[models.py]"]
  node_resumefiles[("Resume files<br/>[resume.py]")]
end

node_professional(("Professional"))
node_email["Email delivery"]

node_professional -->|"uses"| node_app
node_app -->|"routes to"| node_predictor
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_authui
node_predictor -->|"submits assessment"| node_clientapi
node_dashboard -->|"loads and saves"| node_clientapi
node_authui -->|"authenticates through"| node_authcontext
node_authcontext -->|"requests tokens"| node_clientapi
node_clientapi -->|"sends API requests"| node_application
node_application -->|"validates input"| node_inputschema
node_application -->|"requests prediction"| node_predict
node_predict -->|"loads model"| node_modelartifact
node_application -->|"returns result"| node_response
node_application -->|"opens session"| node_database
node_application -->|"saves assessment"| node_models
node_application -->|"includes routes"| node_profiles
node_application -->|"includes routes"| node_resumeroutes
node_application -->|"includes routes"| node_authroutes
node_profiles -->|"uses session"| node_database
node_profiles -->|"reads and writes"| node_models
node_resumeroutes -->|"requires user"| node_authdeps
node_resumeroutes -->|"uses session"| node_database
node_resumeroutes -->|"reads and writes"| node_models
node_resumeroutes -->|"writes files"| node_resumefiles
node_resumeroutes -->|"extracts text"| node_parser
node_authroutes -->|"uses session"| node_database
node_authroutes -->|"reads and writes"| node_models
node_authroutes -->|"checks and issues credentials"| node_security
node_authroutes -.->|"sends OTP"| node_email
node_authdeps -->|"uses session"| node_database
node_authdeps -->|"loads user"| node_models
node_authdeps -->|"verifies token"| node_security

click node_app "https://github.com/jitin2102/skillgreen/blob/main/frontend/src/App.jsx"
click node_predictor "https://github.com/jitin2102/skillgreen/blob/main/frontend/src/pages/Predictor.jsx"
click node_dashboard "https://github.com/jitin2102/skillgreen/blob/main/frontend/src/pages/Dashboard.jsx"
click node_authui "https://github.com/jitin2102/skillgreen/blob/main/frontend/src/pages/Login.jsx"
click node_authcontext "https://github.com/jitin2102/skillgreen/blob/main/frontend/src/context/AuthContext.jsx"
click node_clientapi "https://github.com/jitin2102/skillgreen/blob/main/frontend/src/lib/api.js"
click node_application "https://github.com/jitin2102/skillgreen/blob/main/app.py"
click node_profiles "https://github.com/jitin2102/skillgreen/blob/main/routes/profile.py"
click node_resumeroutes "https://github.com/jitin2102/skillgreen/blob/main/routes/resume.py"
click node_parser "https://github.com/jitin2102/skillgreen/blob/main/resume/parser.py"
click node_inputschema "https://github.com/jitin2102/skillgreen/blob/main/schema/user_input.py"
click node_response "https://github.com/jitin2102/skillgreen/blob/main/schema/response_model.py"
click node_predict "https://github.com/jitin2102/skillgreen/blob/main/model/predict.py"
click node_modelartifact "https://github.com/jitin2102/skillgreen/blob/main/model/model.pkl"
click node_authroutes "https://github.com/jitin2102/skillgreen/blob/main/auth/routes.py"
click node_security "https://github.com/jitin2102/skillgreen/blob/main/auth/security.py"
click node_authdeps "https://github.com/jitin2102/skillgreen/blob/main/auth/dependencies.py"
click node_database "https://github.com/jitin2102/skillgreen/blob/main/db/database.py"
click node_models "https://github.com/jitin2102/skillgreen/blob/main/db/models.py"
click node_resumefiles "https://github.com/jitin2102/skillgreen/blob/main/routes/resume.py"

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_predictor,node_dashboard,node_authui,node_authcontext,node_clientapi toneBlue
class node_application,node_profiles,node_resumeroutes,node_parser toneAmber
class node_authroutes,node_security,node_authdeps toneMint
class node_inputschema,node_response,node_predict,node_modelartifact toneRose
class node_database,node_models,node_resumefiles,node_professional,node_email toneIndigo
```

## Components

### Web client

- [Route application](https://github.com/jitin2102/skillgreen/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Readiness form](https://github.com/jitin2102/skillgreen/blob/main/frontend/src/pages/Predictor.jsx): `frontend/src/pages/Predictor.jsx`
- [Profile dashboard](https://github.com/jitin2102/skillgreen/blob/main/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`
- [Login and registration](https://github.com/jitin2102/skillgreen/blob/main/frontend/src/pages/Login.jsx): `frontend/src/pages/Login.jsx`
- [Auth context](https://github.com/jitin2102/skillgreen/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [API client](https://github.com/jitin2102/skillgreen/blob/main/frontend/src/lib/api.js): `frontend/src/lib/api.js`

### API and domain

- [FastAPI application](https://github.com/jitin2102/skillgreen/blob/main/app.py): `app.py`
- [Profile routes](https://github.com/jitin2102/skillgreen/blob/main/routes/profile.py): `routes/profile.py`
- [Resume routes](https://github.com/jitin2102/skillgreen/blob/main/routes/resume.py): `routes/resume.py`
- [Resume text parser](https://github.com/jitin2102/skillgreen/blob/main/resume/parser.py): `resume/parser.py`

### Identity

- [Authentication routes](https://github.com/jitin2102/skillgreen/blob/main/auth/routes.py): `auth/routes.py`
- [Token and OTP security](https://github.com/jitin2102/skillgreen/blob/main/auth/security.py): `auth/security.py`
- [User dependencies](https://github.com/jitin2102/skillgreen/blob/main/auth/dependencies.py): `auth/dependencies.py`

### Assessment engine

- [Input validation](https://github.com/jitin2102/skillgreen/blob/main/schema/user_input.py): `schema/user_input.py`
- [Assessment response](https://github.com/jitin2102/skillgreen/blob/main/schema/response_model.py): `schema/response_model.py`
- [Prediction service](https://github.com/jitin2102/skillgreen/blob/main/model/predict.py): `model/predict.py`
- [Trained model](https://github.com/jitin2102/skillgreen/blob/main/model/model.pkl): `model/model.pkl`

### Persistence

- [Database session](https://github.com/jitin2102/skillgreen/blob/main/db/database.py): `db/database.py`
- [Account and assessment records](https://github.com/jitin2102/skillgreen/blob/main/db/models.py): `db/models.py`
- [Resume files](https://github.com/jitin2102/skillgreen/blob/main/routes/resume.py): `routes/resume.py`

### Other components

- **Professional**
- **Email delivery**

## Connections

- Professional → Route application: uses
- Route application → Readiness form: routes to
- Route application → Profile dashboard: routes to
- Route application → Login and registration: routes to
- Readiness form → API client: submits assessment
- Profile dashboard → API client: loads and saves
- Login and registration → Auth context: authenticates through
- Auth context → API client: requests tokens
- API client → FastAPI application: sends API requests
- FastAPI application → Input validation: validates input
- FastAPI application → Prediction service: requests prediction
- Prediction service → Trained model: loads model
- FastAPI application → Assessment response: returns result
- FastAPI application → Database session: opens session
- FastAPI application → Account and assessment records: saves assessment
- FastAPI application → Profile routes: includes routes
- FastAPI application → Resume routes: includes routes
- FastAPI application → Authentication routes: includes routes
- Profile routes → Database session: uses session
- Profile routes → Account and assessment records: reads and writes
- Resume routes → User dependencies: requires user
- Resume routes → Database session: uses session
- Resume routes → Account and assessment records: reads and writes
- Resume routes → Resume files: writes files
- Resume routes → Resume text parser: extracts text
- Authentication routes → Database session: uses session
- Authentication routes → Account and assessment records: reads and writes
- Authentication routes → Token and OTP security: checks and issues credentials
- Authentication routes → Email delivery: sends OTP
- User dependencies → Database session: uses session
- User dependencies → Account and assessment records: loads user
- User dependencies → Token and OTP security: verifies token
