# srmk-2005/guardians-of-comments architecture

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

- Interactive diagram: https://gitdiagram.com/srmk-2005/guardians-of-comments
- Repository: https://github.com/srmk-2005/guardians-of-comments

## Overview

Guardians-of-Comment combines a React account and API-key console, an Express service for accounts, subscriptions, keys, and comment-analysis requests, and Django moderation endpoints. The documented moderation workflow checks comment text for harmful content and URLs, then conditionally checks sensitivity; classifiers support English and Tanglish. Sampled code shows the Express-to-Django calls and classifier dispatch, but not the frontend’s Subscription implementation or the Django project’s full runtime configuration. The README describes VirusTotal and BERT capabilities; sampled code confirms those integrations, while the README’s claimed Flask backend does not match the supplied tree.

Main entry points: [`Frontend_Apiaas/src/App.jsx`](https://github.com/srmk-2005/guardians-of-comments/blob/guard/Frontend_Apiaas/src/App.jsx) (Route shell), [`fake_comments_project/harmful_comment_analysis/views.py`](https://github.com/srmk-2005/guardians-of-comments/blob/guard/fake_comments_project/harmful_comment_analysis/views.py) (Harmful endpoint), [`fake_comments_project/sensitive_comment_analysis/services/sensitivity/main.py`](https://github.com/srmk-2005/guardians-of-comments/blob/guard/fake_comments_project/sensitive_comment_analysis/services/sensitivity/main.py) (Language selection), [`Backend_Apiaas/hello-prisma/server.js`](https://github.com/srmk-2005/guardians-of-comments/blob/guard/Backend_Apiaas/hello-prisma/server.js) (Comment analysis route)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend console"]
  node_app["Route shell<br/>[App.jsx]"]
  node_auth["Account access<br/>[AuthPage.jsx]"]
  node_subscription["Subscription UI<br/>[Subscription.jsx]"]
  node_console["Key console<br/>[Core.jsx]"]
end

subgraph group_express["Express API"]
  node_express_api["Account and key routes<br/>[server.js]"]
  node_analysis_route["Comment analysis route<br/>[server.js]"]
  node_sql_access["SQL access<br/>[crud.js]"]
  node_database[("Application database<br/>[crud.js]")]
end

subgraph group_django["Django moderation"]
end

subgraph group_harmful["Harmful checks"]
  node_harmful_view["Harmful endpoint<br/>[views.py]"]
  node_harmful_cleanup["Text and URL extraction<br/>[classifier.py]"]
  node_harmful_classifier["Harmful classifier<br/>[harmful_main.py]"]
  node_harmful_model["BERT prediction<br/>[predict.py]"]
  node_url_check["Malicious URL check<br/>[phishingmain.py]"]
  node_virustotal{{"VirusTotal"}}
end

subgraph group_sensitive["Sensitivity checks"]
  node_sensitive_view["Sensitivity endpoint<br/>[views.py]"]
  node_sensitive_cleanup["Comment extraction<br/>[classifier.py]"]
  node_sensitive_classifier["Sensitivity dispatch<br/>[sensitive_main.py]"]
  node_language_router["Language selection<br/>[main.py]"]
  node_language_detect["Language detection<br/>[detectlang.py]"]
  node_english_model["English classifier"]
  node_tanglish_model["Tanglish classifier"]
end

node_user(("Platform user"))

node_user -->|"opens console"| node_app
node_app -->|"routes to"| node_auth
node_app -->|"routes to"| node_subscription
node_app -->|"routes to"| node_console
node_auth -->|"registers or signs in"| node_user
node_auth -->|"navigates to"| node_subscription
node_console -->|"manages API keys"| node_user
node_express_api -->|"executes queries"| node_sql_access
node_sql_access -->|"reads and writes"| node_database
node_analysis_route -->|"verifies key and post"| node_sql_access
node_analysis_route -->|"posts comment"| node_harmful_view
node_analysis_route -->|"conditionally posts"| node_sensitive_view
node_harmful_view -->|"extracts content"| node_harmful_cleanup
node_harmful_view -->|"classifies text"| node_harmful_classifier
node_harmful_view -->|"checks extracted URLs"| node_url_check
node_harmful_classifier -->|"predicts with"| node_harmful_model
node_url_check -->|"submits URL reports"| node_virustotal
node_sensitive_view -->|"extracts comment parts"| node_sensitive_cleanup
node_sensitive_view -->|"classifies comment"| node_sensitive_classifier
node_sensitive_classifier -->|"delegates classification"| node_language_router
node_language_router -->|"detects language"| node_language_detect
node_language_router -->|"dispatches English"| node_english_model
node_language_router -->|"dispatches Tanglish"| node_tanglish_model

click node_app "https://github.com/srmk-2005/guardians-of-comments/blob/guard/Frontend_Apiaas/src/App.jsx"
click node_auth "https://github.com/srmk-2005/guardians-of-comments/blob/guard/Frontend_Apiaas/src/components/AuthPage.jsx"
click node_subscription "https://github.com/srmk-2005/guardians-of-comments/blob/guard/Frontend_Apiaas/src/components/Subscription.jsx"
click node_console "https://github.com/srmk-2005/guardians-of-comments/blob/guard/Frontend_Apiaas/src/components/Core.jsx"
click node_express_api "https://github.com/srmk-2005/guardians-of-comments/blob/guard/Backend_Apiaas/hello-prisma/server.js"
click node_analysis_route "https://github.com/srmk-2005/guardians-of-comments/blob/guard/Backend_Apiaas/hello-prisma/server.js"
click node_sql_access "https://github.com/srmk-2005/guardians-of-comments/blob/guard/Backend_Apiaas/hello-prisma/crud.js"
click node_database "https://github.com/srmk-2005/guardians-of-comments/blob/guard/Backend_Apiaas/hello-prisma/crud.js"
click node_harmful_view "https://github.com/srmk-2005/guardians-of-comments/blob/guard/fake_comments_project/harmful_comment_analysis/views.py"
click node_harmful_cleanup "https://github.com/srmk-2005/guardians-of-comments/blob/guard/fake_comments_project/harmful_comment_analysis/services/classifier.py"
click node_harmful_classifier "https://github.com/srmk-2005/guardians-of-comments/blob/guard/fake_comments_project/harmful_comment_analysis/services/harmful_main.py"
click node_harmful_model "https://github.com/srmk-2005/guardians-of-comments/blob/guard/fake_comments_project/harmful_comment_analysis/services/harmfull/predict.py"
click node_url_check "https://github.com/srmk-2005/guardians-of-comments/blob/guard/fake_comments_project/harmful_comment_analysis/services/phishingmain.py"
click node_sensitive_view "https://github.com/srmk-2005/guardians-of-comments/blob/guard/fake_comments_project/sensitive_comment_analysis/views.py"
click node_sensitive_cleanup "https://github.com/srmk-2005/guardians-of-comments/blob/guard/fake_comments_project/sensitive_comment_analysis/services/classifier.py"
click node_sensitive_classifier "https://github.com/srmk-2005/guardians-of-comments/blob/guard/fake_comments_project/sensitive_comment_analysis/services/sensitive_main.py"
click node_language_router "https://github.com/srmk-2005/guardians-of-comments/blob/guard/fake_comments_project/sensitive_comment_analysis/services/sensitivity/main.py"
click node_language_detect "https://github.com/srmk-2005/guardians-of-comments/blob/guard/fake_comments_project/sensitive_comment_analysis/services/sensitivity/detectlang.py"
click node_english_model "https://github.com/srmk-2005/guardians-of-comments/blob/guard/fake_comments_project/sensitive_comment_analysis/services/sensitivity/english_classifier.py"
click node_tanglish_model "https://github.com/srmk-2005/guardians-of-comments/blob/guard/fake_comments_project/sensitive_comment_analysis/services/sensitivity/tamil_classifier.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_auth,node_subscription,node_console,node_user toneBlue
class node_express_api,node_analysis_route,node_sql_access,node_database toneAmber
class node_harmful_view,node_harmful_cleanup,node_harmful_classifier,node_harmful_model,node_url_check,node_virustotal toneRose
class node_sensitive_view,node_sensitive_cleanup,node_sensitive_classifier,node_language_router,node_language_detect,node_english_model,node_tanglish_model toneIndigo
```

## Components

### Frontend console

- [Route shell](https://github.com/srmk-2005/guardians-of-comments/blob/guard/Frontend_Apiaas/src/App.jsx): `Frontend_Apiaas/src/App.jsx`
- [Account access](https://github.com/srmk-2005/guardians-of-comments/blob/guard/Frontend_Apiaas/src/components/AuthPage.jsx): `Frontend_Apiaas/src/components/AuthPage.jsx`
- [Subscription UI](https://github.com/srmk-2005/guardians-of-comments/blob/guard/Frontend_Apiaas/src/components/Subscription.jsx): `Frontend_Apiaas/src/components/Subscription.jsx`
- [Key console](https://github.com/srmk-2005/guardians-of-comments/blob/guard/Frontend_Apiaas/src/components/Core.jsx): `Frontend_Apiaas/src/components/Core.jsx`

### Express API

- [Account and key routes](https://github.com/srmk-2005/guardians-of-comments/blob/guard/Backend_Apiaas/hello-prisma/server.js): `Backend_Apiaas/hello-prisma/server.js`
- [Comment analysis route](https://github.com/srmk-2005/guardians-of-comments/blob/guard/Backend_Apiaas/hello-prisma/server.js): `Backend_Apiaas/hello-prisma/server.js`
- [SQL access](https://github.com/srmk-2005/guardians-of-comments/blob/guard/Backend_Apiaas/hello-prisma/crud.js): `Backend_Apiaas/hello-prisma/crud.js`
- [Application database](https://github.com/srmk-2005/guardians-of-comments/blob/guard/Backend_Apiaas/hello-prisma/crud.js): `Backend_Apiaas/hello-prisma/crud.js`

### Harmful checks

- [Harmful endpoint](https://github.com/srmk-2005/guardians-of-comments/blob/guard/fake_comments_project/harmful_comment_analysis/views.py): `fake_comments_project/harmful_comment_analysis/views.py`
- [Text and URL extraction](https://github.com/srmk-2005/guardians-of-comments/blob/guard/fake_comments_project/harmful_comment_analysis/services/classifier.py): `fake_comments_project/harmful_comment_analysis/services/classifier.py`
- [Harmful classifier](https://github.com/srmk-2005/guardians-of-comments/blob/guard/fake_comments_project/harmful_comment_analysis/services/harmful_main.py): `fake_comments_project/harmful_comment_analysis/services/harmful_main.py`
- [BERT prediction](https://github.com/srmk-2005/guardians-of-comments/blob/guard/fake_comments_project/harmful_comment_analysis/services/harmfull/predict.py): `fake_comments_project/harmful_comment_analysis/services/harmfull/predict.py`
- [Malicious URL check](https://github.com/srmk-2005/guardians-of-comments/blob/guard/fake_comments_project/harmful_comment_analysis/services/phishingmain.py): `fake_comments_project/harmful_comment_analysis/services/phishingmain.py`
- **VirusTotal**

### Sensitivity checks

- [Sensitivity endpoint](https://github.com/srmk-2005/guardians-of-comments/blob/guard/fake_comments_project/sensitive_comment_analysis/views.py): `fake_comments_project/sensitive_comment_analysis/views.py`
- [Comment extraction](https://github.com/srmk-2005/guardians-of-comments/blob/guard/fake_comments_project/sensitive_comment_analysis/services/classifier.py): `fake_comments_project/sensitive_comment_analysis/services/classifier.py`
- [Sensitivity dispatch](https://github.com/srmk-2005/guardians-of-comments/blob/guard/fake_comments_project/sensitive_comment_analysis/services/sensitive_main.py): `fake_comments_project/sensitive_comment_analysis/services/sensitive_main.py`
- [Language selection](https://github.com/srmk-2005/guardians-of-comments/blob/guard/fake_comments_project/sensitive_comment_analysis/services/sensitivity/main.py): `fake_comments_project/sensitive_comment_analysis/services/sensitivity/main.py`
- [Language detection](https://github.com/srmk-2005/guardians-of-comments/blob/guard/fake_comments_project/sensitive_comment_analysis/services/sensitivity/detectlang.py): `fake_comments_project/sensitive_comment_analysis/services/sensitivity/detectlang.py`
- [English classifier](https://github.com/srmk-2005/guardians-of-comments/blob/guard/fake_comments_project/sensitive_comment_analysis/services/sensitivity/english_classifier.py): `fake_comments_project/sensitive_comment_analysis/services/sensitivity/english_classifier.py`
- [Tanglish classifier](https://github.com/srmk-2005/guardians-of-comments/blob/guard/fake_comments_project/sensitive_comment_analysis/services/sensitivity/tamil_classifier.py): `fake_comments_project/sensitive_comment_analysis/services/sensitivity/tamil_classifier.py`

### Other components

- **Platform user**

## Connections

- Platform user → Route shell: opens console
- Route shell → Account access: routes to (evidence: `Frontend_Apiaas/src/App.jsx`)
- Route shell → Subscription UI: routes to (evidence: `Frontend_Apiaas/src/App.jsx`)
- Route shell → Key console: routes to (evidence: `Frontend_Apiaas/src/App.jsx`)
- Account access → Platform user: registers or signs in (evidence: `Frontend_Apiaas/src/components/AuthPage.jsx`)
- Account access → Subscription UI: navigates to (evidence: `Frontend_Apiaas/src/components/AuthPage.jsx`)
- Key console → Platform user: manages API keys (evidence: `Frontend_Apiaas/src/components/Core.jsx`)
- Account and key routes → SQL access: executes queries (evidence: `Backend_Apiaas/hello-prisma/server.js`)
- SQL access → Application database: reads and writes (evidence: `Backend_Apiaas/hello-prisma/crud.js`)
- Comment analysis route → SQL access: verifies key and post (evidence: `Backend_Apiaas/hello-prisma/server.js`)
- Comment analysis route → Harmful endpoint: posts comment (evidence: `Backend_Apiaas/hello-prisma/server.js`)
- Comment analysis route → Sensitivity endpoint: conditionally posts (evidence: `Backend_Apiaas/hello-prisma/server.js`)
- Harmful endpoint → Text and URL extraction: extracts content (evidence: `fake_comments_project/harmful_comment_analysis/views.py`)
- Harmful endpoint → Harmful classifier: classifies text (evidence: `fake_comments_project/harmful_comment_analysis/views.py`)
- Harmful endpoint → Malicious URL check: checks extracted URLs (evidence: `fake_comments_project/harmful_comment_analysis/views.py`)
- Harmful classifier → BERT prediction: predicts with (evidence: `fake_comments_project/harmful_comment_analysis/services/harmful_main.py`)
- Malicious URL check → VirusTotal: submits URL reports (evidence: `fake_comments_project/harmful_comment_analysis/services/phishingmain.py`)
- Sensitivity endpoint → Comment extraction: extracts comment parts (evidence: `fake_comments_project/sensitive_comment_analysis/views.py`)
- Sensitivity endpoint → Sensitivity dispatch: classifies comment (evidence: `fake_comments_project/sensitive_comment_analysis/views.py`)
- Sensitivity dispatch → Language selection: delegates classification (evidence: `fake_comments_project/sensitive_comment_analysis/services/sensitive_main.py`)
- Language selection → Language detection: detects language (evidence: `fake_comments_project/sensitive_comment_analysis/services/sensitivity/main.py`)
- Language selection → English classifier: dispatches English (evidence: `fake_comments_project/sensitive_comment_analysis/services/sensitivity/main.py`)
- Language selection → Tanglish classifier: dispatches Tanglish (evidence: `fake_comments_project/sensitive_comment_analysis/services/sensitivity/main.py`)
