# dnileshchoudhary/stms architecture

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

- Interactive diagram: https://gitdiagram.com/dnileshchoudhary/stms
- Repository: https://github.com/dnileshchoudhary/stms

## Overview

STMS is a React and Spring Boot task-management portal. Users interact with the React application to authenticate, manage and organize tasks, view calendar/analytics dashboards, and access AI assistance; requests go to REST endpoints, with the README documenting MySQL, Groq, and file-storage integrations. The frontend excerpt confirms several endpoint calls, while backend implementation files were not sampled, so internal service and persistence links are not asserted.

Main entry points: [`frontend/src/App.js`](https://github.com/dnileshchoudhary/stms/blob/main/frontend/src/App.js) (Task portal), [`backend/src/main/java/com/example/demo/controller/AuthController.java`](https://github.com/dnileshchoudhary/stms/blob/main/backend/src/main/java/com/example/demo/controller/AuthController.java) (Authentication API), [`backend/src/main/java/com/example/demo/controller/TaskController.java`](https://github.com/dnileshchoudhary/stms/blob/main/backend/src/main/java/com/example/demo/controller/TaskController.java) (Task API), [`backend/src/main/java/com/example/demo/controller/AIController.java`](https://github.com/dnileshchoudhary/stms/blob/main/backend/src/main/java/com/example/demo/controller/AIController.java) (AI API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["Task portal<br/>[App.js]"]
  node_entry["React entry<br/>[index.js]"]
end

subgraph group_workflows["Backend workflows"]
  node_tasks["Task API"]
  node_taskservice["Task operations<br/>[TaskService.java]"]
  node_ai["AI API<br/>[AIController.java]"]
  node_aiservice["AI analysis<br/>[AIService.java]"]
  node_admin["Admin API"]
  node_files["File API"]
end

subgraph group_security["Identity and access"]
  node_auth["Authentication API"]
  node_authservice["Auth service<br/>[AuthService.java]"]
  node_securityconfig["Security configuration"]
  node_jwt["JWT handling<br/>[JwtFilter.java]"]
  node_oauth["OAuth login"]
  node_email["Email service<br/>[EmailService.java]"]
  node_google["Google OAuth"]
end

subgraph group_data["Data and integrations"]
  node_taskrepo["Task repository"]
  node_userrepo["User repository"]
  node_taskmodel["Task record<br/>[Task.java]"]
  node_usermodel["User record<br/>[User.java]"]
  node_mysql[("MySQL")]
  node_groq["Groq API"]
  node_filestore[("File storage")]
end

node_user(("User"))

node_user -->|"uses"| node_entry
node_entry -->|"renders"| node_app
node_app -->|"registers via"| node_auth
node_app -->|"manages tasks"| node_tasks
node_app -->|"loads admin data"| node_admin
node_app -->|"requests analysis"| node_ai
node_app -->|"uploads attachment"| node_files
node_app -->|"supports sign-in"| node_google
node_app -->|"shows calendar and analytics"| node_tasks
node_tasks -.->|"persists task data"| node_mysql
node_admin -.->|"uses application data"| node_mysql
node_ai -->|"uses AI analysis"| node_groq
node_files -->|"stores attachments"| node_filestore
node_auth -->|"supports OAuth"| node_google
node_auth -.->|"supports password recovery"| node_email
node_auth -.->|"issues authenticated access"| node_jwt
node_securityconfig -.->|"configures token security"| node_jwt
node_tasks -.->|"delegates"| node_taskservice
node_taskservice -.->|"accesses tasks"| node_taskrepo
node_taskrepo -.->|"stores"| node_taskmodel
node_taskrepo -.->|"reads and writes"| node_mysql
node_authservice -.->|"accesses users"| node_userrepo
node_userrepo -.->|"stores"| node_usermodel
node_userrepo -.->|"reads and writes"| node_mysql
node_ai -.->|"delegates"| node_aiservice

click node_app "https://github.com/dnileshchoudhary/stms/blob/main/frontend/src/App.js"
click node_entry "https://github.com/dnileshchoudhary/stms/blob/main/frontend/src/index.js"
click node_auth "https://github.com/dnileshchoudhary/stms/blob/main/backend/src/main/java/com/example/demo/controller/AuthController.java"
click node_authservice "https://github.com/dnileshchoudhary/stms/blob/main/backend/src/main/java/com/example/demo/service/AuthService.java"
click node_securityconfig "https://github.com/dnileshchoudhary/stms/blob/main/backend/src/main/java/com/example/demo/security/SecurityConfig.java"
click node_jwt "https://github.com/dnileshchoudhary/stms/blob/main/backend/src/main/java/com/example/demo/security/JwtFilter.java"
click node_oauth "https://github.com/dnileshchoudhary/stms/blob/main/backend/src/main/java/com/example/demo/security/OAuth2LoginSuccessHandler.java"
click node_tasks "https://github.com/dnileshchoudhary/stms/blob/main/backend/src/main/java/com/example/demo/controller/TaskController.java"
click node_taskservice "https://github.com/dnileshchoudhary/stms/blob/main/backend/src/main/java/com/example/demo/service/TaskService.java"
click node_ai "https://github.com/dnileshchoudhary/stms/blob/main/backend/src/main/java/com/example/demo/controller/AIController.java"
click node_aiservice "https://github.com/dnileshchoudhary/stms/blob/main/backend/src/main/java/com/example/demo/service/AIService.java"
click node_admin "https://github.com/dnileshchoudhary/stms/blob/main/backend/src/main/java/com/example/demo/controller/AdminController.java"
click node_files "https://github.com/dnileshchoudhary/stms/blob/main/backend/src/main/java/com/example/demo/controller/FileController.java"
click node_email "https://github.com/dnileshchoudhary/stms/blob/main/backend/src/main/java/com/example/demo/service/EmailService.java"
click node_taskrepo "https://github.com/dnileshchoudhary/stms/blob/main/backend/src/main/java/com/example/demo/repository/TaskRepository.java"
click node_userrepo "https://github.com/dnileshchoudhary/stms/blob/main/backend/src/main/java/com/example/demo/repository/UserRepository.java"
click node_taskmodel "https://github.com/dnileshchoudhary/stms/blob/main/backend/src/main/java/com/example/demo/model/Task.java"
click node_usermodel "https://github.com/dnileshchoudhary/stms/blob/main/backend/src/main/java/com/example/demo/model/User.java"

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_entry,node_user toneBlue
class node_tasks,node_taskservice,node_ai,node_aiservice,node_admin,node_files toneAmber
class node_auth,node_authservice,node_securityconfig,node_jwt,node_oauth,node_email,node_google toneMint
class node_taskrepo,node_userrepo,node_taskmodel,node_usermodel,node_mysql,node_groq,node_filestore toneRose
```

## Components

### Web client

- [Task portal](https://github.com/dnileshchoudhary/stms/blob/main/frontend/src/App.js): `frontend/src/App.js`
- [React entry](https://github.com/dnileshchoudhary/stms/blob/main/frontend/src/index.js): `frontend/src/index.js`

### Backend workflows

- [Task API](https://github.com/dnileshchoudhary/stms/blob/main/backend/src/main/java/com/example/demo/controller/TaskController.java): `backend/src/main/java/com/example/demo/controller/TaskController.java`
- [Task operations](https://github.com/dnileshchoudhary/stms/blob/main/backend/src/main/java/com/example/demo/service/TaskService.java): `backend/src/main/java/com/example/demo/service/TaskService.java`
- [AI API](https://github.com/dnileshchoudhary/stms/blob/main/backend/src/main/java/com/example/demo/controller/AIController.java): `backend/src/main/java/com/example/demo/controller/AIController.java`
- [AI analysis](https://github.com/dnileshchoudhary/stms/blob/main/backend/src/main/java/com/example/demo/service/AIService.java): `backend/src/main/java/com/example/demo/service/AIService.java`
- [Admin API](https://github.com/dnileshchoudhary/stms/blob/main/backend/src/main/java/com/example/demo/controller/AdminController.java): `backend/src/main/java/com/example/demo/controller/AdminController.java`
- [File API](https://github.com/dnileshchoudhary/stms/blob/main/backend/src/main/java/com/example/demo/controller/FileController.java): `backend/src/main/java/com/example/demo/controller/FileController.java`

### Identity and access

- [Authentication API](https://github.com/dnileshchoudhary/stms/blob/main/backend/src/main/java/com/example/demo/controller/AuthController.java): `backend/src/main/java/com/example/demo/controller/AuthController.java`
- [Auth service](https://github.com/dnileshchoudhary/stms/blob/main/backend/src/main/java/com/example/demo/service/AuthService.java): `backend/src/main/java/com/example/demo/service/AuthService.java`
- [Security configuration](https://github.com/dnileshchoudhary/stms/blob/main/backend/src/main/java/com/example/demo/security/SecurityConfig.java): `backend/src/main/java/com/example/demo/security/SecurityConfig.java`
- [JWT handling](https://github.com/dnileshchoudhary/stms/blob/main/backend/src/main/java/com/example/demo/security/JwtFilter.java): `backend/src/main/java/com/example/demo/security/JwtFilter.java`
- [OAuth login](https://github.com/dnileshchoudhary/stms/blob/main/backend/src/main/java/com/example/demo/security/OAuth2LoginSuccessHandler.java): `backend/src/main/java/com/example/demo/security/OAuth2LoginSuccessHandler.java`
- [Email service](https://github.com/dnileshchoudhary/stms/blob/main/backend/src/main/java/com/example/demo/service/EmailService.java): `backend/src/main/java/com/example/demo/service/EmailService.java`
- **Google OAuth**

### Data and integrations

- [Task repository](https://github.com/dnileshchoudhary/stms/blob/main/backend/src/main/java/com/example/demo/repository/TaskRepository.java): `backend/src/main/java/com/example/demo/repository/TaskRepository.java`
- [User repository](https://github.com/dnileshchoudhary/stms/blob/main/backend/src/main/java/com/example/demo/repository/UserRepository.java): `backend/src/main/java/com/example/demo/repository/UserRepository.java`
- [Task record](https://github.com/dnileshchoudhary/stms/blob/main/backend/src/main/java/com/example/demo/model/Task.java): `backend/src/main/java/com/example/demo/model/Task.java`
- [User record](https://github.com/dnileshchoudhary/stms/blob/main/backend/src/main/java/com/example/demo/model/User.java): `backend/src/main/java/com/example/demo/model/User.java`
- **MySQL**
- **Groq API**
- **File storage**

### Other components

- **User**

## Connections

- User → React entry: uses (evidence: `README.md`)
- React entry → Task portal: renders (evidence: `frontend/src/index.js`)
- Task portal → Authentication API: registers via (evidence: `frontend/src/App.js`)
- Task portal → Task API: manages tasks (evidence: `frontend/src/App.js`)
- Task portal → Admin API: loads admin data (evidence: `frontend/src/App.js`)
- Task portal → AI API: requests analysis (evidence: `frontend/src/App.js`)
- Task portal → File API: uploads attachment (evidence: `frontend/src/App.js`)
- Task portal → Google OAuth: supports sign-in (evidence: `README.md`)
- Task portal → Task API: shows calendar and analytics (evidence: `README.md`)
- Task API → MySQL: persists task data (evidence: `README.md`)
- Admin API → MySQL: uses application data (evidence: `README.md`)
- AI API → Groq API: uses AI analysis (evidence: `README.md`)
- File API → File storage: stores attachments (evidence: `README.md`)
- Authentication API → Google OAuth: supports OAuth (evidence: `README.md`)
- Authentication API → Email service: supports password recovery (evidence: `README.md`)
- Authentication API → JWT handling: issues authenticated access (evidence: `README.md`)
- Security configuration → JWT handling: configures token security
- Task API → Task operations: delegates
- Task operations → Task repository: accesses tasks
- Task repository → Task record: stores
- Task repository → MySQL: reads and writes
- Auth service → User repository: accesses users
- User repository → User record: stores
- User repository → MySQL: reads and writes
- AI API → AI analysis: delegates
