# navyaxkumar/community_service architecture

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

- Interactive diagram: https://gitdiagram.com/navyaxkumar/community_service
- Repository: https://github.com/navyaxkumar/community_service

## Overview

DigitalShield is a fraud-awareness learning platform with a React client and ASP.NET Core API. Users can register or log in, check suspicious messages or URLs, study learning modules, take quizzes, and track progress; administrators manage learning content. The README documents a controller–service–repository–SQL Server backend and a modular fraud-analysis sequence. The graph includes documented API capabilities, but many controller/service implementations were not sampled, so those relationships are left unasserted. Frontend request wiring is shown where the supplied source establishes it.

Main entry points: [`frontend/src/routes/AppRoutes.tsx`](https://github.com/navyaxkumar/community_service/blob/main/frontend/src/routes/AppRoutes.tsx) (Route selection), [`backend/DigitalShield.API/Authentication/AuthenticationService.cs`](https://github.com/navyaxkumar/community_service/blob/main/backend/DigitalShield.API/Authentication/AuthenticationService.cs) (Authentication service), [`backend/DigitalShield.API/Services/FraudAnalysisService.cs`](https://github.com/navyaxkumar/community_service/blob/main/backend/DigitalShield.API/Services/FraudAnalysisService.cs) (Fraud analysis service), [`frontend/src/App.tsx`](https://github.com/navyaxkumar/community_service/blob/main/frontend/src/App.tsx) (Application shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["Application shell<br/>[App.tsx]"]
  node_routes["Route selection<br/>[AppRoutes.tsx]"]
  node_authcontext["Session context<br/>[AuthContext.tsx]"]
  node_checker["Scam checker"]
  node_learningpages["Learning and quizzes"]
  node_dashboard["Dashboard<br/>[DashboardPage.tsx]"]
  node_admin["Admin content<br/>[AdminPage.tsx]"]
  node_authservice["Auth requests<br/>[authService.ts]"]
  node_fraudservice["Fraud requests<br/>[fraudService.ts]"]
  node_apiclient["HTTP client<br/>[apiClient.ts]"]
end

subgraph group_api["API and identity"]
  node_controllers["REST controllers<br/>[Controllers]"]
  node_authcontroller["Authentication endpoints<br/>[AuthController.cs]"]
  node_authservicebackend["Authentication service"]
  node_jwt["JWT tokens<br/>[JwtTokenService.cs]"]
end

subgraph group_learning["Learning and progress"]
  node_learningcontroller["Learning endpoints"]
  node_progresscontroller["Progress endpoints"]
  node_quizservice["Quiz service<br/>[QuizService.cs]"]
end

subgraph group_fraud["Fraud assessment"]
  node_fraudservicebackend["Fraud analysis service"]
  node_analyzer["Rule analyzer<br/>[FraudAnalyzer.cs]"]
  node_rules["Heuristic rules<br/>[Rules]"]
  node_scoring["Risk scoring"]
  node_recommendations["Safety recommendations"]
end

subgraph group_persistence["Persistence"]
  node_repositories["Repositories<br/>[Repositories]"]
  node_userrepo["User repository<br/>[UserRepository.cs]"]
  node_dbcontext["EF Core context"]
  node_sql[("SQL Server")]
end

node_visitor(("Learner or admin"))

node_visitor -->|"uses"| node_app
node_app -->|"provides session"| node_authcontext
node_app -->|"renders routes"| node_routes
node_routes -->|"routes to"| node_checker
node_routes -->|"routes to"| node_learningpages
node_routes -->|"routes to"| node_dashboard
node_routes -->|"routes to"| node_admin
node_authcontext -->|"uses"| node_authservice
node_authservice -->|"sends requests"| node_apiclient
node_fraudservice -->|"sends requests"| node_apiclient
node_apiclient -.->|"calls API"| node_controllers
node_controllers -.->|"includes"| node_authcontroller
node_authcontroller -.->|"delegates to"| node_authservicebackend
node_authservicebackend -->|"reads and writes"| node_userrepo
node_authservicebackend -->|"creates token"| node_jwt
node_authservicebackend -->|"uses repository"| node_repositories
node_learningcontroller -.->|"uses service"| node_quizservice
node_progresscontroller -.->|"persists progress"| node_repositories
node_fraudservice -.->|"submits check"| node_fraudservicebackend
node_fraudservicebackend -->|"analyzes"| node_analyzer
node_analyzer -->|"evaluates"| node_rules
node_fraudservicebackend -->|"scores indicators"| node_scoring
node_fraudservicebackend -->|"generates advice"| node_recommendations
node_repositories -->|"uses EF Core"| node_dbcontext
node_userrepo -->|"uses context"| node_dbcontext
node_dbcontext -->|"persists data"| node_sql

click node_app "https://github.com/navyaxkumar/community_service/blob/main/frontend/src/App.tsx"
click node_routes "https://github.com/navyaxkumar/community_service/blob/main/frontend/src/routes/AppRoutes.tsx"
click node_authcontext "https://github.com/navyaxkumar/community_service/blob/main/frontend/src/context/AuthContext.tsx"
click node_checker "https://github.com/navyaxkumar/community_service/blob/main/frontend/src/pages/ScamCheckerPage.tsx"
click node_learningpages "https://github.com/navyaxkumar/community_service/tree/main/frontend/src/pages"
click node_dashboard "https://github.com/navyaxkumar/community_service/blob/main/frontend/src/pages/DashboardPage.tsx"
click node_admin "https://github.com/navyaxkumar/community_service/blob/main/frontend/src/pages/AdminPage.tsx"
click node_authservice "https://github.com/navyaxkumar/community_service/blob/main/frontend/src/services/authService.ts"
click node_fraudservice "https://github.com/navyaxkumar/community_service/blob/main/frontend/src/services/fraudService.ts"
click node_apiclient "https://github.com/navyaxkumar/community_service/blob/main/frontend/src/services/apiClient.ts"
click node_controllers "https://github.com/navyaxkumar/community_service/tree/main/backend/DigitalShield.API/Controllers"
click node_authcontroller "https://github.com/navyaxkumar/community_service/blob/main/backend/DigitalShield.API/Controllers/AuthController.cs"
click node_authservicebackend "https://github.com/navyaxkumar/community_service/blob/main/backend/DigitalShield.API/Authentication/AuthenticationService.cs"
click node_jwt "https://github.com/navyaxkumar/community_service/blob/main/backend/DigitalShield.API/Authentication/JwtTokenService.cs"
click node_learningcontroller "https://github.com/navyaxkumar/community_service/blob/main/backend/DigitalShield.API/Controllers/LearningModulesController.cs"
click node_progresscontroller "https://github.com/navyaxkumar/community_service/blob/main/backend/DigitalShield.API/Controllers/ProgressController.cs"
click node_quizservice "https://github.com/navyaxkumar/community_service/blob/main/backend/DigitalShield.API/Services/QuizService.cs"
click node_fraudservicebackend "https://github.com/navyaxkumar/community_service/blob/main/backend/DigitalShield.API/Services/FraudAnalysisService.cs"
click node_analyzer "https://github.com/navyaxkumar/community_service/blob/main/backend/DigitalShield.API/Fraud/Analyzer/FraudAnalyzer.cs"
click node_rules "https://github.com/navyaxkumar/community_service/tree/main/backend/DigitalShield.API/Fraud/Rules"
click node_scoring "https://github.com/navyaxkumar/community_service/blob/main/backend/DigitalShield.API/Fraud/Scoring/RiskScoringService.cs"
click node_recommendations "https://github.com/navyaxkumar/community_service/blob/main/backend/DigitalShield.API/Fraud/Recommendations/RecommendationService.cs"
click node_repositories "https://github.com/navyaxkumar/community_service/tree/main/backend/DigitalShield.API/Repositories"
click node_userrepo "https://github.com/navyaxkumar/community_service/blob/main/backend/DigitalShield.API/Repositories/UserRepository.cs"
click node_dbcontext "https://github.com/navyaxkumar/community_service/blob/main/backend/DigitalShield.API/Data/ApplicationDbContext.cs"

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_routes,node_authcontext,node_checker,node_learningpages,node_dashboard,node_admin,node_authservice,node_fraudservice,node_apiclient toneBlue
class node_controllers,node_authcontroller,node_authservicebackend,node_jwt toneAmber
class node_learningcontroller,node_progresscontroller,node_quizservice toneMint
class node_fraudservicebackend,node_analyzer,node_rules,node_scoring,node_recommendations toneRose
class node_repositories,node_userrepo,node_dbcontext,node_sql,node_visitor toneIndigo
```

## Components

### Web client

- [Application shell](https://github.com/navyaxkumar/community_service/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Route selection](https://github.com/navyaxkumar/community_service/blob/main/frontend/src/routes/AppRoutes.tsx): `frontend/src/routes/AppRoutes.tsx`
- [Session context](https://github.com/navyaxkumar/community_service/blob/main/frontend/src/context/AuthContext.tsx): `frontend/src/context/AuthContext.tsx`
- [Scam checker](https://github.com/navyaxkumar/community_service/blob/main/frontend/src/pages/ScamCheckerPage.tsx): `frontend/src/pages/ScamCheckerPage.tsx`
- [Learning and quizzes](https://github.com/navyaxkumar/community_service/tree/main/frontend/src/pages): `frontend/src/pages`
- [Dashboard](https://github.com/navyaxkumar/community_service/blob/main/frontend/src/pages/DashboardPage.tsx): `frontend/src/pages/DashboardPage.tsx`
- [Admin content](https://github.com/navyaxkumar/community_service/blob/main/frontend/src/pages/AdminPage.tsx): `frontend/src/pages/AdminPage.tsx`
- [Auth requests](https://github.com/navyaxkumar/community_service/blob/main/frontend/src/services/authService.ts): `frontend/src/services/authService.ts`
- [Fraud requests](https://github.com/navyaxkumar/community_service/blob/main/frontend/src/services/fraudService.ts): `frontend/src/services/fraudService.ts`
- [HTTP client](https://github.com/navyaxkumar/community_service/blob/main/frontend/src/services/apiClient.ts): `frontend/src/services/apiClient.ts`

### API and identity

- [REST controllers](https://github.com/navyaxkumar/community_service/tree/main/backend/DigitalShield.API/Controllers): `backend/DigitalShield.API/Controllers`
- [Authentication endpoints](https://github.com/navyaxkumar/community_service/blob/main/backend/DigitalShield.API/Controllers/AuthController.cs): `backend/DigitalShield.API/Controllers/AuthController.cs`
- [Authentication service](https://github.com/navyaxkumar/community_service/blob/main/backend/DigitalShield.API/Authentication/AuthenticationService.cs): `backend/DigitalShield.API/Authentication/AuthenticationService.cs`
- [JWT tokens](https://github.com/navyaxkumar/community_service/blob/main/backend/DigitalShield.API/Authentication/JwtTokenService.cs): `backend/DigitalShield.API/Authentication/JwtTokenService.cs`

### Learning and progress

- [Learning endpoints](https://github.com/navyaxkumar/community_service/blob/main/backend/DigitalShield.API/Controllers/LearningModulesController.cs): `backend/DigitalShield.API/Controllers/LearningModulesController.cs`
- [Progress endpoints](https://github.com/navyaxkumar/community_service/blob/main/backend/DigitalShield.API/Controllers/ProgressController.cs): `backend/DigitalShield.API/Controllers/ProgressController.cs`
- [Quiz service](https://github.com/navyaxkumar/community_service/blob/main/backend/DigitalShield.API/Services/QuizService.cs): `backend/DigitalShield.API/Services/QuizService.cs`

### Fraud assessment

- [Fraud analysis service](https://github.com/navyaxkumar/community_service/blob/main/backend/DigitalShield.API/Services/FraudAnalysisService.cs): `backend/DigitalShield.API/Services/FraudAnalysisService.cs`
- [Rule analyzer](https://github.com/navyaxkumar/community_service/blob/main/backend/DigitalShield.API/Fraud/Analyzer/FraudAnalyzer.cs): `backend/DigitalShield.API/Fraud/Analyzer/FraudAnalyzer.cs`
- [Heuristic rules](https://github.com/navyaxkumar/community_service/tree/main/backend/DigitalShield.API/Fraud/Rules): `backend/DigitalShield.API/Fraud/Rules`
- [Risk scoring](https://github.com/navyaxkumar/community_service/blob/main/backend/DigitalShield.API/Fraud/Scoring/RiskScoringService.cs): `backend/DigitalShield.API/Fraud/Scoring/RiskScoringService.cs`
- [Safety recommendations](https://github.com/navyaxkumar/community_service/blob/main/backend/DigitalShield.API/Fraud/Recommendations/RecommendationService.cs): `backend/DigitalShield.API/Fraud/Recommendations/RecommendationService.cs`

### Persistence

- [Repositories](https://github.com/navyaxkumar/community_service/tree/main/backend/DigitalShield.API/Repositories): `backend/DigitalShield.API/Repositories`
- [User repository](https://github.com/navyaxkumar/community_service/blob/main/backend/DigitalShield.API/Repositories/UserRepository.cs): `backend/DigitalShield.API/Repositories/UserRepository.cs`
- [EF Core context](https://github.com/navyaxkumar/community_service/blob/main/backend/DigitalShield.API/Data/ApplicationDbContext.cs): `backend/DigitalShield.API/Data/ApplicationDbContext.cs`
- **SQL Server**

### Other components

- **Learner or admin**

## Connections

- Learner or admin → Application shell: uses
- Application shell → Session context: provides session (evidence: `frontend/src/App.tsx`)
- Application shell → Route selection: renders routes (evidence: `frontend/src/App.tsx`)
- Route selection → Scam checker: routes to (evidence: `frontend/src/routes/AppRoutes.tsx`)
- Route selection → Learning and quizzes: routes to (evidence: `frontend/src/routes/AppRoutes.tsx`)
- Route selection → Dashboard: routes to (evidence: `frontend/src/routes/AppRoutes.tsx`)
- Route selection → Admin content: routes to (evidence: `frontend/src/routes/AppRoutes.tsx`)
- Session context → Auth requests: uses (evidence: `frontend/src/context/AuthContext.tsx`)
- Auth requests → HTTP client: sends requests (evidence: `frontend/src/services/authService.ts`)
- Fraud requests → HTTP client: sends requests (evidence: `frontend/src/services/fraudService.ts`)
- HTTP client → REST controllers: calls API
- REST controllers → Authentication endpoints: includes
- Authentication endpoints → Authentication service: delegates to
- Authentication service → User repository: reads and writes (evidence: `backend/DigitalShield.API/Authentication/AuthenticationService.cs`)
- Authentication service → JWT tokens: creates token (evidence: `backend/DigitalShield.API/Authentication/AuthenticationService.cs`)
- Authentication service → Repositories: uses repository (evidence: `backend/DigitalShield.API/Authentication/AuthenticationService.cs`)
- Learning endpoints → Quiz service: uses service
- Progress endpoints → Repositories: persists progress
- Fraud requests → Fraud analysis service: submits check
- Fraud analysis service → Rule analyzer: analyzes (evidence: `README.md`)
- Rule analyzer → Heuristic rules: evaluates (evidence: `README.md`)
- Fraud analysis service → Risk scoring: scores indicators (evidence: `README.md`)
- Fraud analysis service → Safety recommendations: generates advice (evidence: `README.md`)
- Repositories → EF Core context: uses EF Core (evidence: `README.md`)
- User repository → EF Core context: uses context
- EF Core context → SQL Server: persists data (evidence: `README.md`)
