# lucasgoncsilva/swarden architecture

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

- Interactive diagram: https://gitdiagram.com/lucasgoncsilva/swarden
- Repository: https://github.com/lucasgoncsilva/swarden

## Overview

sWarden is a Django prototype password and credential manager. Its main user workflow is account registration and activation, sign-in, viewing and managing stored credentials, cards, and notes, then optionally exporting secrets by email. The graph also preserves the documented honeypot and administrative dashboard capabilities. The tree does not include the README-mentioned `secret` app, so its implementation path and internal behavior cannot be established; only source-referenced interactions are shown. Several app URL modules connect routes to views, but root URL wiring was not sampled.

Main entry points: [`SWARDEN/account/views.py`](https://github.com/lucasgoncsilva/swarden/blob/main/SWARDEN/account/views.py) (Account workflows), [`SWARDEN/mail/views.py`](https://github.com/lucasgoncsilva/swarden/blob/main/SWARDEN/mail/views.py) (Secret export), [`SWARDEN/honeypot/views.py`](https://github.com/lucasgoncsilva/swarden/blob/main/SWARDEN/honeypot/views.py) (Honeypot handler), [`SWARDEN/account/models.py`](https://github.com/lucasgoncsilva/swarden/blob/main/SWARDEN/account/models.py) (User and activation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_accounts["Accounts and access"]
  node_account_routes["Account routes<br/>[urls.py]"]
  node_account_views["Account workflows<br/>[views.py]"]
  node_user_data[("User and activation<br/>[models.py]")]
  node_account_forms["Registration forms<br/>[forms.py]"]
end

subgraph group_vault["Credential vault"]
  node_home_view["Vault overview<br/>[views.py]"]
  node_secret_domain[("Credentials, cards, notes")]
  node_mail_routes["Export routes<br/>[urls.py]"]
  node_mail_view["Secret export<br/>[views.py]"]
  node_mail_state[("Wake state<br/>[models.py]")]
end

subgraph group_security["Security and monitoring"]
  node_honeypot_routes["Honeypot routes<br/>[urls.py]"]
  node_honeypot_view["Honeypot handler<br/>[views.py]"]
  node_attempt_data[("Captured attempts<br/>[models.py]")]
end

subgraph group_platform["Web platform"]
  node_home_routes["Home routes<br/>[urls.py]"]
  node_shared_utils["Email and IP utilities<br/>[utils.py]"]
  node_general_view["General page<br/>[views.py]"]
  node_error_view["Error pages<br/>[views.py]"]
  node_admin_dashboard["Admin dashboard<br/>[admin.py]"]
  node_django_db[("Configured database")]
end

node_visitor(("Visitor"))
node_email_service["Email delivery"]

node_visitor -->|"opens account"| node_account_routes
node_account_routes -->|"routes requests"| node_account_views
node_account_views -.->|"validates input"| node_account_forms
node_account_views -->|"creates and activates"| node_user_data
node_account_views -->|"sends activation mail"| node_shared_utils
node_visitor -->|"opens home"| node_home_routes
node_home_routes -->|"routes requests"| node_home_view
node_home_view -->|"reads vault items"| node_secret_domain
node_visitor -->|"requests export"| node_mail_routes
node_mail_routes -->|"routes requests"| node_mail_view
node_mail_view -->|"queries owned items"| node_secret_domain
node_mail_view -->|"emails export"| node_shared_utils
node_mail_view -->|"records wake checks"| node_mail_state
node_shared_utils -->|"sends messages"| node_email_service
node_visitor -->|"submits decoy form"| node_honeypot_routes
node_honeypot_routes -->|"routes requests"| node_honeypot_view
node_honeypot_view -->|"gets client IP"| node_shared_utils
node_honeypot_view -->|"stores attempts"| node_attempt_data
node_honeypot_view -->|"checks authentication"| node_user_data
node_admin_dashboard -->|"counts users"| node_user_data
node_admin_dashboard -->|"counts vault items"| node_secret_domain
node_general_view -.->|"requires sign-in"| node_visitor
node_error_view -.->|"renders error response"| node_visitor
node_user_data -.->|"persists records"| node_django_db
node_secret_domain -.->|"persists vault data"| node_django_db

click node_account_routes "https://github.com/lucasgoncsilva/swarden/blob/main/SWARDEN/account/urls.py"
click node_account_views "https://github.com/lucasgoncsilva/swarden/blob/main/SWARDEN/account/views.py"
click node_user_data "https://github.com/lucasgoncsilva/swarden/blob/main/SWARDEN/account/models.py"
click node_account_forms "https://github.com/lucasgoncsilva/swarden/blob/main/SWARDEN/account/forms.py"
click node_home_routes "https://github.com/lucasgoncsilva/swarden/blob/main/SWARDEN/home/urls.py"
click node_home_view "https://github.com/lucasgoncsilva/swarden/blob/main/SWARDEN/home/views.py"
click node_mail_routes "https://github.com/lucasgoncsilva/swarden/blob/main/SWARDEN/mail/urls.py"
click node_mail_view "https://github.com/lucasgoncsilva/swarden/blob/main/SWARDEN/mail/views.py"
click node_mail_state "https://github.com/lucasgoncsilva/swarden/blob/main/SWARDEN/mail/models.py"
click node_shared_utils "https://github.com/lucasgoncsilva/swarden/blob/main/SWARDEN/utils.py"
click node_honeypot_routes "https://github.com/lucasgoncsilva/swarden/blob/main/SWARDEN/honeypot/urls.py"
click node_honeypot_view "https://github.com/lucasgoncsilva/swarden/blob/main/SWARDEN/honeypot/views.py"
click node_attempt_data "https://github.com/lucasgoncsilva/swarden/blob/main/SWARDEN/honeypot/models.py"
click node_general_view "https://github.com/lucasgoncsilva/swarden/blob/main/SWARDEN/general/views.py"
click node_error_view "https://github.com/lucasgoncsilva/swarden/blob/main/SWARDEN/err/views.py"
click node_admin_dashboard "https://github.com/lucasgoncsilva/swarden/blob/main/SWARDEN/CORE/admin.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_account_routes,node_account_views,node_user_data,node_account_forms toneBlue
class node_home_view,node_secret_domain,node_mail_routes,node_mail_view,node_mail_state toneAmber
class node_honeypot_routes,node_honeypot_view,node_attempt_data toneMint
class node_home_routes,node_shared_utils,node_general_view,node_error_view,node_admin_dashboard,node_django_db toneRose
class node_visitor,node_email_service toneIndigo
```

## Components

### Accounts and access

- [Account routes](https://github.com/lucasgoncsilva/swarden/blob/main/SWARDEN/account/urls.py): `SWARDEN/account/urls.py`
- [Account workflows](https://github.com/lucasgoncsilva/swarden/blob/main/SWARDEN/account/views.py): `SWARDEN/account/views.py`
- [User and activation](https://github.com/lucasgoncsilva/swarden/blob/main/SWARDEN/account/models.py): `SWARDEN/account/models.py`
- [Registration forms](https://github.com/lucasgoncsilva/swarden/blob/main/SWARDEN/account/forms.py): `SWARDEN/account/forms.py`

### Credential vault

- [Vault overview](https://github.com/lucasgoncsilva/swarden/blob/main/SWARDEN/home/views.py): `SWARDEN/home/views.py`
- **Credentials, cards, notes**
- [Export routes](https://github.com/lucasgoncsilva/swarden/blob/main/SWARDEN/mail/urls.py): `SWARDEN/mail/urls.py`
- [Secret export](https://github.com/lucasgoncsilva/swarden/blob/main/SWARDEN/mail/views.py): `SWARDEN/mail/views.py`
- [Wake state](https://github.com/lucasgoncsilva/swarden/blob/main/SWARDEN/mail/models.py): `SWARDEN/mail/models.py`

### Security and monitoring

- [Honeypot routes](https://github.com/lucasgoncsilva/swarden/blob/main/SWARDEN/honeypot/urls.py): `SWARDEN/honeypot/urls.py`
- [Honeypot handler](https://github.com/lucasgoncsilva/swarden/blob/main/SWARDEN/honeypot/views.py): `SWARDEN/honeypot/views.py`
- [Captured attempts](https://github.com/lucasgoncsilva/swarden/blob/main/SWARDEN/honeypot/models.py): `SWARDEN/honeypot/models.py`

### Web platform

- [Home routes](https://github.com/lucasgoncsilva/swarden/blob/main/SWARDEN/home/urls.py): `SWARDEN/home/urls.py`
- [Email and IP utilities](https://github.com/lucasgoncsilva/swarden/blob/main/SWARDEN/utils.py): `SWARDEN/utils.py`
- [General page](https://github.com/lucasgoncsilva/swarden/blob/main/SWARDEN/general/views.py): `SWARDEN/general/views.py`
- [Error pages](https://github.com/lucasgoncsilva/swarden/blob/main/SWARDEN/err/views.py): `SWARDEN/err/views.py`
- [Admin dashboard](https://github.com/lucasgoncsilva/swarden/blob/main/SWARDEN/CORE/admin.py): `SWARDEN/CORE/admin.py`
- **Configured database**

### Other components

- **Visitor**
- **Email delivery**

## Connections

- Visitor → Account routes: opens account (evidence: `SWARDEN/account/urls.py`)
- Account routes → Account workflows: routes requests (evidence: `SWARDEN/account/urls.py`)
- Account workflows → Registration forms: validates input
- Account workflows → User and activation: creates and activates (evidence: `SWARDEN/account/views.py`)
- Account workflows → Email and IP utilities: sends activation mail (evidence: `SWARDEN/account/views.py`)
- Visitor → Home routes: opens home (evidence: `SWARDEN/home/urls.py`)
- Home routes → Vault overview: routes requests (evidence: `SWARDEN/home/urls.py`)
- Vault overview → Credentials, cards, notes: reads vault items (evidence: `SWARDEN/home/views.py`)
- Visitor → Export routes: requests export (evidence: `SWARDEN/mail/urls.py`)
- Export routes → Secret export: routes requests (evidence: `SWARDEN/mail/urls.py`)
- Secret export → Credentials, cards, notes: queries owned items (evidence: `SWARDEN/mail/views.py`)
- Secret export → Email and IP utilities: emails export (evidence: `SWARDEN/mail/views.py`)
- Secret export → Wake state: records wake checks (evidence: `SWARDEN/mail/views.py`)
- Email and IP utilities → Email delivery: sends messages (evidence: `SWARDEN/utils.py`)
- Visitor → Honeypot routes: submits decoy form (evidence: `SWARDEN/honeypot/urls.py`)
- Honeypot routes → Honeypot handler: routes requests (evidence: `SWARDEN/honeypot/urls.py`)
- Honeypot handler → Email and IP utilities: gets client IP (evidence: `SWARDEN/honeypot/views.py`)
- Honeypot handler → Captured attempts: stores attempts (evidence: `SWARDEN/honeypot/views.py`)
- Honeypot handler → User and activation: checks authentication (evidence: `SWARDEN/honeypot/views.py`)
- Admin dashboard → User and activation: counts users (evidence: `SWARDEN/CORE/admin.py`)
- Admin dashboard → Credentials, cards, notes: counts vault items (evidence: `SWARDEN/CORE/admin.py`)
- General page → Visitor: requires sign-in
- Error pages → Visitor: renders error response
- User and activation → Configured database: persists records
- Credentials, cards, notes → Configured database: persists vault data
