# hasritha-r/researchproject architecture

> Architecture diagram of the GitHub repository hasritha-r/researchproject, 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/hasritha-r/researchproject
- Repository: https://github.com/hasritha-r/researchproject

## Overview

This is a role-based journal manuscript submission and peer-review application. Authors submit and revise papers; editors assign reviewers and decide outcomes; reviewers submit recommendations; published papers and notifications support the surrounding workflow. The React client routes users by role and uses API modules, while Spring services implement authentication, paper and review operations, persistence, plagiarism checks, and notifications. The excerpts establish key service calls and routing; several controllers and frontend API implementations are unsampled, so uncertain client-to-server links are omitted or marked unverified.

Main entry points: [`backend/src/main/java/com/journal/paper/service/PaperService.java`](https://github.com/hasritha-r/researchproject/blob/main/backend/src/main/java/com/journal/paper/service/PaperService.java) (Paper lifecycle), [`frontend/src/router/AppRouter.jsx`](https://github.com/hasritha-r/researchproject/blob/main/frontend/src/router/AppRouter.jsx) (Role routing), [`backend/src/main/java/com/journal/review/service/ReviewService.java`](https://github.com/hasritha-r/researchproject/blob/main/backend/src/main/java/com/journal/review/service/ReviewService.java) (Review handling), [`backend/src/main/java/com/journal/user/service/UserService.java`](https://github.com/hasritha-r/researchproject/blob/main/backend/src/main/java/com/journal/user/service/UserService.java) (User accounts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web experience"]
  node_app_router["Role routing<br/>[AppRouter.jsx]"]
  node_author_ui["Author pages"]
  node_editor_ui["Editor pages"]
  node_reviewer_ui["Reviewer pages"]
end

subgraph group_identity["Identity and access"]
  node_auth_context["Session state<br/>[AuthContext.jsx]"]
  node_auth_controller["Authentication API"]
  node_auth_service["Authentication service<br/>[AuthService.java]"]
  node_jwt_service["JWT tokens<br/>[JwtService.java]"]
  node_user_service["User accounts<br/>[UserService.java]"]
  node_user_store[("User records<br/>[UserAccount.java]")]
end

subgraph group_workflow["Editorial workflow"]
  node_author_controller["Author endpoints"]
  node_editor_controller["Editor endpoints"]
  node_public_controller["Public papers"]
  node_paper_service["Paper lifecycle<br/>[PaperService.java]"]
  node_paper_store[("Papers and versions<br/>[Paper.java]")]
  node_review_controller["Reviewer endpoints"]
  node_review_service["Review handling<br/>[ReviewService.java]"]
  node_review_store[("Review records<br/>[Review.java]")]
end

subgraph group_support["Supporting services"]
  node_plagiarism["Similarity checks"]
  node_notification_service["Notifications"]
  node_notification_store[("Notification records<br/>[Notification.java]")]
end

node_journal_users(("Journal users"))

node_journal_users -->|"use routes"| node_app_router
node_app_router -->|"checks session"| node_auth_context
node_app_router -->|"routes authors"| node_author_ui
node_app_router -->|"routes editors"| node_editor_ui
node_app_router -->|"routes reviewers"| node_reviewer_ui
node_auth_context -.->|"calls API"| node_auth_controller
node_auth_controller -.->|"delegates"| node_auth_service
node_auth_service -->|"manages accounts"| node_user_service
node_auth_service -->|"issues tokens"| node_jwt_service
node_user_service -->|"persists accounts"| node_user_store
node_author_ui -.->|"submits papers"| node_author_controller
node_editor_ui -.->|"manages decisions"| node_editor_controller
node_reviewer_ui -.->|"submits reviews"| node_review_controller
node_editor_controller -->|"delegates"| node_paper_service
node_review_controller -->|"delegates"| node_review_service
node_author_controller -.->|"delegates"| node_paper_service
node_public_controller -.->|"delegates"| node_paper_service
node_paper_service -->|"stores papers"| node_paper_store
node_paper_service -->|"reads assignments"| node_review_store
node_paper_service -->|"looks up reviewers"| node_user_service
node_paper_service -->|"checks similarity"| node_plagiarism
node_paper_service -->|"notifies users"| node_notification_service
node_review_service -->|"stores reviews"| node_review_store
node_review_service -->|"loads paper"| node_paper_store
node_review_service -->|"summarizes reviewer"| node_user_service
node_review_service -->|"notifies users"| node_notification_service
node_notification_service -->|"saves notices"| node_notification_store

click node_app_router "https://github.com/hasritha-r/researchproject/blob/main/frontend/src/router/AppRouter.jsx"
click node_auth_context "https://github.com/hasritha-r/researchproject/blob/main/frontend/src/context/AuthContext.jsx"
click node_author_ui "https://github.com/hasritha-r/researchproject/tree/main/frontend/src/pages/author"
click node_editor_ui "https://github.com/hasritha-r/researchproject/tree/main/frontend/src/pages/editor"
click node_reviewer_ui "https://github.com/hasritha-r/researchproject/tree/main/frontend/src/pages/reviewer"
click node_auth_controller "https://github.com/hasritha-r/researchproject/blob/main/backend/src/main/java/com/journal/auth/controller/AuthController.java"
click node_auth_service "https://github.com/hasritha-r/researchproject/blob/main/backend/src/main/java/com/journal/auth/service/AuthService.java"
click node_jwt_service "https://github.com/hasritha-r/researchproject/blob/main/backend/src/main/java/com/journal/config/JwtService.java"
click node_user_service "https://github.com/hasritha-r/researchproject/blob/main/backend/src/main/java/com/journal/user/service/UserService.java"
click node_user_store "https://github.com/hasritha-r/researchproject/blob/main/backend/src/main/java/com/journal/user/model/UserAccount.java"
click node_author_controller "https://github.com/hasritha-r/researchproject/blob/main/backend/src/main/java/com/journal/paper/controller/AuthorController.java"
click node_editor_controller "https://github.com/hasritha-r/researchproject/blob/main/backend/src/main/java/com/journal/paper/controller/EditorController.java"
click node_public_controller "https://github.com/hasritha-r/researchproject/blob/main/backend/src/main/java/com/journal/paper/controller/PublicPaperController.java"
click node_paper_service "https://github.com/hasritha-r/researchproject/blob/main/backend/src/main/java/com/journal/paper/service/PaperService.java"
click node_paper_store "https://github.com/hasritha-r/researchproject/blob/main/backend/src/main/java/com/journal/paper/model/Paper.java"
click node_review_controller "https://github.com/hasritha-r/researchproject/blob/main/backend/src/main/java/com/journal/review/controller/ReviewerController.java"
click node_review_service "https://github.com/hasritha-r/researchproject/blob/main/backend/src/main/java/com/journal/review/service/ReviewService.java"
click node_review_store "https://github.com/hasritha-r/researchproject/blob/main/backend/src/main/java/com/journal/review/model/Review.java"
click node_plagiarism "https://github.com/hasritha-r/researchproject/blob/main/backend/src/main/java/com/journal/plagiarism/service/PlagiarismService.java"
click node_notification_service "https://github.com/hasritha-r/researchproject/blob/main/backend/src/main/java/com/journal/notification/service/NotificationService.java"
click node_notification_store "https://github.com/hasritha-r/researchproject/blob/main/backend/src/main/java/com/journal/notification/model/Notification.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_router,node_author_ui,node_editor_ui,node_reviewer_ui,node_journal_users toneBlue
class node_auth_context,node_auth_controller,node_auth_service,node_jwt_service,node_user_service,node_user_store toneAmber
class node_author_controller,node_editor_controller,node_public_controller,node_paper_service,node_paper_store,node_review_controller,node_review_service,node_review_store toneMint
class node_plagiarism,node_notification_service,node_notification_store toneRose
```

## Components

### Web experience

- [Role routing](https://github.com/hasritha-r/researchproject/blob/main/frontend/src/router/AppRouter.jsx): `frontend/src/router/AppRouter.jsx`
- [Author pages](https://github.com/hasritha-r/researchproject/tree/main/frontend/src/pages/author): `frontend/src/pages/author`
- [Editor pages](https://github.com/hasritha-r/researchproject/tree/main/frontend/src/pages/editor): `frontend/src/pages/editor`
- [Reviewer pages](https://github.com/hasritha-r/researchproject/tree/main/frontend/src/pages/reviewer): `frontend/src/pages/reviewer`

### Identity and access

- [Session state](https://github.com/hasritha-r/researchproject/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [Authentication API](https://github.com/hasritha-r/researchproject/blob/main/backend/src/main/java/com/journal/auth/controller/AuthController.java): `backend/src/main/java/com/journal/auth/controller/AuthController.java`
- [Authentication service](https://github.com/hasritha-r/researchproject/blob/main/backend/src/main/java/com/journal/auth/service/AuthService.java): `backend/src/main/java/com/journal/auth/service/AuthService.java`
- [JWT tokens](https://github.com/hasritha-r/researchproject/blob/main/backend/src/main/java/com/journal/config/JwtService.java): `backend/src/main/java/com/journal/config/JwtService.java`
- [User accounts](https://github.com/hasritha-r/researchproject/blob/main/backend/src/main/java/com/journal/user/service/UserService.java): `backend/src/main/java/com/journal/user/service/UserService.java`
- [User records](https://github.com/hasritha-r/researchproject/blob/main/backend/src/main/java/com/journal/user/model/UserAccount.java): `backend/src/main/java/com/journal/user/model/UserAccount.java`

### Editorial workflow

- [Author endpoints](https://github.com/hasritha-r/researchproject/blob/main/backend/src/main/java/com/journal/paper/controller/AuthorController.java): `backend/src/main/java/com/journal/paper/controller/AuthorController.java`
- [Editor endpoints](https://github.com/hasritha-r/researchproject/blob/main/backend/src/main/java/com/journal/paper/controller/EditorController.java): `backend/src/main/java/com/journal/paper/controller/EditorController.java`
- [Public papers](https://github.com/hasritha-r/researchproject/blob/main/backend/src/main/java/com/journal/paper/controller/PublicPaperController.java): `backend/src/main/java/com/journal/paper/controller/PublicPaperController.java`
- [Paper lifecycle](https://github.com/hasritha-r/researchproject/blob/main/backend/src/main/java/com/journal/paper/service/PaperService.java): `backend/src/main/java/com/journal/paper/service/PaperService.java`
- [Papers and versions](https://github.com/hasritha-r/researchproject/blob/main/backend/src/main/java/com/journal/paper/model/Paper.java): `backend/src/main/java/com/journal/paper/model/Paper.java`
- [Reviewer endpoints](https://github.com/hasritha-r/researchproject/blob/main/backend/src/main/java/com/journal/review/controller/ReviewerController.java): `backend/src/main/java/com/journal/review/controller/ReviewerController.java`
- [Review handling](https://github.com/hasritha-r/researchproject/blob/main/backend/src/main/java/com/journal/review/service/ReviewService.java): `backend/src/main/java/com/journal/review/service/ReviewService.java`
- [Review records](https://github.com/hasritha-r/researchproject/blob/main/backend/src/main/java/com/journal/review/model/Review.java): `backend/src/main/java/com/journal/review/model/Review.java`

### Supporting services

- [Similarity checks](https://github.com/hasritha-r/researchproject/blob/main/backend/src/main/java/com/journal/plagiarism/service/PlagiarismService.java): `backend/src/main/java/com/journal/plagiarism/service/PlagiarismService.java`
- [Notifications](https://github.com/hasritha-r/researchproject/blob/main/backend/src/main/java/com/journal/notification/service/NotificationService.java): `backend/src/main/java/com/journal/notification/service/NotificationService.java`
- [Notification records](https://github.com/hasritha-r/researchproject/blob/main/backend/src/main/java/com/journal/notification/model/Notification.java): `backend/src/main/java/com/journal/notification/model/Notification.java`

### Other components

- **Journal users**

## Connections

- Journal users → Role routing: use routes (evidence: `frontend/src/router/AppRouter.jsx`)
- Role routing → Session state: checks session (evidence: `frontend/src/router/AppRouter.jsx`)
- Role routing → Author pages: routes authors (evidence: `frontend/src/router/AppRouter.jsx`)
- Role routing → Editor pages: routes editors (evidence: `frontend/src/router/AppRouter.jsx`)
- Role routing → Reviewer pages: routes reviewers (evidence: `frontend/src/router/AppRouter.jsx`)
- Session state → Authentication API: calls API
- Authentication API → Authentication service: delegates (evidence: `backend/src/main/java/com/journal/auth/controller/AuthController.java`)
- Authentication service → User accounts: manages accounts (evidence: `backend/src/main/java/com/journal/auth/service/AuthService.java`)
- Authentication service → JWT tokens: issues tokens (evidence: `backend/src/main/java/com/journal/auth/service/AuthService.java`)
- User accounts → User records: persists accounts (evidence: `backend/src/main/java/com/journal/user/service/UserService.java`)
- Author pages → Author endpoints: submits papers
- Editor pages → Editor endpoints: manages decisions
- Reviewer pages → Reviewer endpoints: submits reviews
- Editor endpoints → Paper lifecycle: delegates (evidence: `backend/src/main/java/com/journal/paper/controller/EditorController.java`)
- Reviewer endpoints → Review handling: delegates (evidence: `backend/src/main/java/com/journal/review/controller/ReviewerController.java`)
- Author endpoints → Paper lifecycle: delegates (evidence: `backend/src/main/java/com/journal/paper/controller/AuthorController.java`)
- Public papers → Paper lifecycle: delegates
- Paper lifecycle → Papers and versions: stores papers (evidence: `backend/src/main/java/com/journal/paper/service/PaperService.java`)
- Paper lifecycle → Review records: reads assignments (evidence: `backend/src/main/java/com/journal/paper/service/PaperService.java`)
- Paper lifecycle → User accounts: looks up reviewers (evidence: `backend/src/main/java/com/journal/paper/service/PaperService.java`)
- Paper lifecycle → Similarity checks: checks similarity (evidence: `backend/src/main/java/com/journal/paper/service/PaperService.java`)
- Paper lifecycle → Notifications: notifies users (evidence: `backend/src/main/java/com/journal/paper/service/PaperService.java`)
- Review handling → Review records: stores reviews (evidence: `backend/src/main/java/com/journal/review/service/ReviewService.java`)
- Review handling → Papers and versions: loads paper (evidence: `backend/src/main/java/com/journal/review/service/ReviewService.java`)
- Review handling → User accounts: summarizes reviewer (evidence: `backend/src/main/java/com/journal/review/service/ReviewService.java`)
- Review handling → Notifications: notifies users (evidence: `backend/src/main/java/com/journal/review/service/ReviewService.java`)
- Notifications → Notification records: saves notices (evidence: `backend/src/main/java/com/journal/notification/service/NotificationService.java`)
