# flag-boolean/security-webinfo architecture

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

- Interactive diagram: https://gitdiagram.com/flag-boolean/security-webinfo
- Repository: https://github.com/flag-boolean/security-webinfo

## Overview

Open Source Security Tools Registry is a React/FastAPI web app for browsing and maintaining a catalog of open-source security tools. Users register or log in, then search and filter the catalog, view tool details, and—when authenticated—create, edit, or delete entries. The frontend routes pages and sends requests through a shared API client; FastAPI routes handle authentication and catalog operations against SQLAlchemy models and the configured database. The README documents the supported security-tool categories. The graph follows shown calls and documented behavior; database initialization and some page-to-API details are only partially sampled.

Main entry points: [`backend/app/routes/auth.py`](https://github.com/flag-boolean/security-webinfo/blob/main/backend/app/routes/auth.py) (Authentication routes), [`backend/app/database.py`](https://github.com/flag-boolean/security-webinfo/blob/main/backend/app/database.py) (Database sessions), [`backend/app/routes/security_tools.py`](https://github.com/flag-boolean/security-webinfo/blob/main/backend/app/routes/security_tools.py) (Catalog routes), [`frontend/src/App.js`](https://github.com/flag-boolean/security-webinfo/blob/main/frontend/src/App.js) (Page router)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_app["Page router<br/>[App.js]"]
  node_layout["Navigation layout<br/>[Layout.js]"]
  node_login["Login page<br/>[Login.js]"]
  node_register["Registration page<br/>[Register.js]"]
  node_tools_page["Catalog page<br/>[ToolsList.js]"]
  node_api_client["API client<br/>[api.js]"]
end

subgraph group_api["API and identity"]
  node_fastapi["FastAPI application<br/>[main.py]"]
  node_auth_routes["Authentication routes<br/>[auth.py]"]
  node_passwords["Password hashing<br/>[auth.py]"]
  node_tools_routes["Catalog routes<br/>[security_tools.py]"]
  node_settings["Configuration<br/>[config.py]"]
end

subgraph group_domain["Catalog domain"]
  node_user_model["User model<br/>[user.py]"]
  node_tool_model["Security tool model<br/>[security_tool.py]"]
end

subgraph group_persistence["Persistence"]
  node_db_session["Database sessions<br/>[database.py]"]
  node_database[("Relational database")]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_layout
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_register
node_app -->|"routes to"| node_tools_page
node_login -->|"calls"| node_api_client
node_register -->|"calls"| node_api_client
node_tools_page -->|"calls"| node_api_client
node_api_client -.->|"HTTP requests"| node_auth_routes
node_api_client -.->|"HTTP requests"| node_tools_routes
node_fastapi -->|"registers"| node_auth_routes
node_fastapi -->|"registers"| node_tools_routes
node_fastapi -->|"reads"| node_settings
node_fastapi -->|"creates tables"| node_db_session
node_auth_routes -->|"verifies and hashes"| node_passwords
node_auth_routes -->|"queries and creates"| node_user_model
node_auth_routes -->|"opens sessions"| node_db_session
node_auth_routes -->|"signs tokens"| node_settings
node_tools_routes -->|"checks current user"| node_auth_routes
node_tools_routes -->|"queries and changes"| node_tool_model
node_tools_routes -->|"requires user"| node_user_model
node_tools_routes -->|"opens sessions"| node_db_session
node_user_model -->|"uses base"| node_db_session
node_tool_model -->|"uses base"| node_db_session
node_db_session -->|"gets database URL"| node_settings
node_db_session -.->|"connects"| node_database

click node_app "https://github.com/flag-boolean/security-webinfo/blob/main/frontend/src/App.js"
click node_layout "https://github.com/flag-boolean/security-webinfo/blob/main/frontend/src/components/Layout.js"
click node_login "https://github.com/flag-boolean/security-webinfo/blob/main/frontend/src/pages/Login.js"
click node_register "https://github.com/flag-boolean/security-webinfo/blob/main/frontend/src/pages/Register.js"
click node_tools_page "https://github.com/flag-boolean/security-webinfo/blob/main/frontend/src/pages/ToolsList.js"
click node_api_client "https://github.com/flag-boolean/security-webinfo/blob/main/frontend/src/services/api.js"
click node_fastapi "https://github.com/flag-boolean/security-webinfo/blob/main/backend/app/main.py"
click node_auth_routes "https://github.com/flag-boolean/security-webinfo/blob/main/backend/app/routes/auth.py"
click node_passwords "https://github.com/flag-boolean/security-webinfo/blob/main/backend/app/utils/auth.py"
click node_tools_routes "https://github.com/flag-boolean/security-webinfo/blob/main/backend/app/routes/security_tools.py"
click node_settings "https://github.com/flag-boolean/security-webinfo/blob/main/backend/app/config.py"
click node_user_model "https://github.com/flag-boolean/security-webinfo/blob/main/backend/app/models/user.py"
click node_tool_model "https://github.com/flag-boolean/security-webinfo/blob/main/backend/app/models/security_tool.py"
click node_db_session "https://github.com/flag-boolean/security-webinfo/blob/main/backend/app/database.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_layout,node_login,node_register,node_tools_page,node_api_client,node_user toneBlue
class node_fastapi,node_auth_routes,node_passwords,node_tools_routes,node_settings toneAmber
class node_user_model,node_tool_model toneMint
class node_db_session,node_database toneRose
```

## Components

### Web interface

- [Page router](https://github.com/flag-boolean/security-webinfo/blob/main/frontend/src/App.js): `frontend/src/App.js`
- [Navigation layout](https://github.com/flag-boolean/security-webinfo/blob/main/frontend/src/components/Layout.js): `frontend/src/components/Layout.js`
- [Login page](https://github.com/flag-boolean/security-webinfo/blob/main/frontend/src/pages/Login.js): `frontend/src/pages/Login.js`
- [Registration page](https://github.com/flag-boolean/security-webinfo/blob/main/frontend/src/pages/Register.js): `frontend/src/pages/Register.js`
- [Catalog page](https://github.com/flag-boolean/security-webinfo/blob/main/frontend/src/pages/ToolsList.js): `frontend/src/pages/ToolsList.js`
- [API client](https://github.com/flag-boolean/security-webinfo/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`

### API and identity

- [FastAPI application](https://github.com/flag-boolean/security-webinfo/blob/main/backend/app/main.py): `backend/app/main.py`
- [Authentication routes](https://github.com/flag-boolean/security-webinfo/blob/main/backend/app/routes/auth.py): `backend/app/routes/auth.py`
- [Password hashing](https://github.com/flag-boolean/security-webinfo/blob/main/backend/app/utils/auth.py): `backend/app/utils/auth.py`
- [Catalog routes](https://github.com/flag-boolean/security-webinfo/blob/main/backend/app/routes/security_tools.py): `backend/app/routes/security_tools.py`
- [Configuration](https://github.com/flag-boolean/security-webinfo/blob/main/backend/app/config.py): `backend/app/config.py`

### Catalog domain

- [User model](https://github.com/flag-boolean/security-webinfo/blob/main/backend/app/models/user.py): `backend/app/models/user.py`
- [Security tool model](https://github.com/flag-boolean/security-webinfo/blob/main/backend/app/models/security_tool.py): `backend/app/models/security_tool.py`

### Persistence

- [Database sessions](https://github.com/flag-boolean/security-webinfo/blob/main/backend/app/database.py): `backend/app/database.py`
- **Relational database**

### Other components

- **User**

## Connections

- User → Page router: uses (evidence: `frontend/src/App.js`)
- Page router → Navigation layout: routes to (evidence: `frontend/src/App.js`)
- Page router → Login page: routes to (evidence: `frontend/src/App.js`)
- Page router → Registration page: routes to (evidence: `frontend/src/App.js`)
- Page router → Catalog page: routes to (evidence: `frontend/src/App.js`)
- Login page → API client: calls (evidence: `frontend/src/pages/Login.js`)
- Registration page → API client: calls (evidence: `frontend/src/pages/Register.js`)
- Catalog page → API client: calls (evidence: `frontend/src/pages/ToolsList.js`)
- API client → Authentication routes: HTTP requests (evidence: `README.md`)
- API client → Catalog routes: HTTP requests (evidence: `README.md`)
- FastAPI application → Authentication routes: registers (evidence: `backend/app/main.py`)
- FastAPI application → Catalog routes: registers (evidence: `backend/app/main.py`)
- FastAPI application → Configuration: reads (evidence: `backend/app/main.py`)
- FastAPI application → Database sessions: creates tables (evidence: `backend/app/main.py`)
- Authentication routes → Password hashing: verifies and hashes (evidence: `backend/app/routes/auth.py`)
- Authentication routes → User model: queries and creates (evidence: `backend/app/routes/auth.py`)
- Authentication routes → Database sessions: opens sessions (evidence: `backend/app/routes/auth.py`)
- Authentication routes → Configuration: signs tokens (evidence: `backend/app/routes/auth.py`)
- Catalog routes → Authentication routes: checks current user (evidence: `backend/app/routes/security_tools.py`)
- Catalog routes → Security tool model: queries and changes (evidence: `backend/app/routes/security_tools.py`)
- Catalog routes → User model: requires user (evidence: `backend/app/routes/security_tools.py`)
- Catalog routes → Database sessions: opens sessions (evidence: `backend/app/routes/security_tools.py`)
- User model → Database sessions: uses base (evidence: `backend/app/models/user.py`)
- Security tool model → Database sessions: uses base (evidence: `backend/app/models/security_tool.py`)
- Database sessions → Configuration: gets database URL (evidence: `backend/app/database.py`)
- Database sessions → Relational database: connects
