# j-codes-walkz/cardvault architecture

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

- Interactive diagram: https://gitdiagram.com/j-codes-walkz/cardvault
- Repository: https://github.com/j-codes-walkz/cardvault

## Overview

CardVault is a Django web app for Pokémon card collectors. Its principal workflow is to sign in, browse the shared card catalogue, and record a card as owned or wanted; collectors can also review cards. The graph preserves catalogue, collection, account, and review capabilities described in the README, but several corresponding handlers are not shown in the excerpts. Edges for those documented capabilities cite the README; the concrete My Cards route, view, and model relationships are supported by source excerpts.

Main entry points: [`collection/models.py`](https://github.com/j-codes-walkz/cardvault/blob/main/collection/models.py) (Owned and wanted), [`collection/views.py`](https://github.com/j-codes-walkz/cardvault/blob/main/collection/views.py) (My Cards view), [`cards/models.py`](https://github.com/j-codes-walkz/cardvault/blob/main/cards/models.py) (Cards and sets), [`accounts`](https://github.com/j-codes-walkz/cardvault/tree/main/accounts) (Account access)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_accounts["Accounts"]
  node_account["Account access"]
  node_allauth["Django allauth"]
end

subgraph group_catalogue["Card catalogue"]
  node_catalogue_browse["Browse cards"]
  node_card_data[("Cards and sets<br/>[models.py]")]
  node_card_detail["Card details"]
end

subgraph group_collection["My collection"]
  node_my_cards_route["My Cards route<br/>[urls.py]"]
  node_my_cards_view["My Cards view<br/>[views.py]"]
  node_collection_data[("Owned and wanted<br/>[models.py]")]
  node_collection_page["My Cards page<br/>[my_cards.html]"]
end

subgraph group_reviews["Card reviews"]
  node_review_actions["Review actions"]
  node_review_data[("Reviews<br/>[models.py]")]
end

node_collector(("Collector"))
node_postgres[("PostgreSQL")]

node_collector -->|"registers or signs in"| node_account
node_account -->|"uses authentication"| node_allauth
node_collector -->|"browses cards"| node_catalogue_browse
node_catalogue_browse -.->|"shows catalogue"| node_card_data
node_collector -->|"views card"| node_card_detail
node_card_detail -.->|"adds owned or wanted"| node_collection_data
node_collector -->|"opens My Cards"| node_my_cards_route
node_my_cards_route -->|"routes to"| node_my_cards_view
node_my_cards_view -->|"reads entries"| node_collection_data
node_my_cards_view -->|"renders"| node_collection_page
node_collector -->|"writes reviews"| node_review_actions
node_review_actions -.->|"creates or updates"| node_review_data
node_collection_data -->|"references card"| node_card_data
node_card_data -->|"persists catalogue"| node_postgres
node_collection_data -->|"persists entries"| node_postgres
node_review_data -->|"persists reviews"| node_postgres

click node_account "https://github.com/j-codes-walkz/cardvault/tree/main/accounts"
click node_catalogue_browse "https://github.com/j-codes-walkz/cardvault/tree/main/cards"
click node_card_data "https://github.com/j-codes-walkz/cardvault/blob/main/cards/models.py"
click node_card_detail "https://github.com/j-codes-walkz/cardvault/tree/main/cards"
click node_my_cards_route "https://github.com/j-codes-walkz/cardvault/blob/main/collection/urls.py"
click node_my_cards_view "https://github.com/j-codes-walkz/cardvault/blob/main/collection/views.py"
click node_collection_data "https://github.com/j-codes-walkz/cardvault/blob/main/collection/models.py"
click node_collection_page "https://github.com/j-codes-walkz/cardvault/blob/main/collection/templates/collection/my_cards.html"
click node_review_actions "https://github.com/j-codes-walkz/cardvault/tree/main/cards"
click node_review_data "https://github.com/j-codes-walkz/cardvault/blob/main/cards/models.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,node_allauth toneBlue
class node_catalogue_browse,node_card_data,node_card_detail,node_postgres toneAmber
class node_my_cards_route,node_my_cards_view,node_collection_data,node_collection_page toneMint
class node_review_actions,node_review_data toneRose
class node_collector toneIndigo
```

## Components

### Accounts

- [Account access](https://github.com/j-codes-walkz/cardvault/tree/main/accounts): `accounts`
- **Django allauth**

### Card catalogue

- [Browse cards](https://github.com/j-codes-walkz/cardvault/tree/main/cards): `cards`
- [Cards and sets](https://github.com/j-codes-walkz/cardvault/blob/main/cards/models.py): `cards/models.py`
- [Card details](https://github.com/j-codes-walkz/cardvault/tree/main/cards): `cards`

### My collection

- [My Cards route](https://github.com/j-codes-walkz/cardvault/blob/main/collection/urls.py): `collection/urls.py`
- [My Cards view](https://github.com/j-codes-walkz/cardvault/blob/main/collection/views.py): `collection/views.py`
- [Owned and wanted](https://github.com/j-codes-walkz/cardvault/blob/main/collection/models.py): `collection/models.py`
- [My Cards page](https://github.com/j-codes-walkz/cardvault/blob/main/collection/templates/collection/my_cards.html): `collection/templates/collection/my_cards.html`

### Card reviews

- [Review actions](https://github.com/j-codes-walkz/cardvault/tree/main/cards): `cards`
- [Reviews](https://github.com/j-codes-walkz/cardvault/blob/main/cards/models.py): `cards/models.py`

### Other components

- **Collector**
- **PostgreSQL**

## Connections

- Collector → Account access: registers or signs in (evidence: `README.md`)
- Account access → Django allauth: uses authentication (evidence: `README.md`)
- Collector → Browse cards: browses cards (evidence: `README.md`)
- Browse cards → Cards and sets: shows catalogue (evidence: `cards/tests.py`)
- Collector → Card details: views card (evidence: `README.md`)
- Card details → Owned and wanted: adds owned or wanted (evidence: `collection/models.py`)
- Collector → My Cards route: opens My Cards (evidence: `README.md`)
- My Cards route → My Cards view: routes to (evidence: `collection/urls.py`)
- My Cards view → Owned and wanted: reads entries (evidence: `collection/views.py`)
- My Cards view → My Cards page: renders (evidence: `collection/views.py`)
- Collector → Review actions: writes reviews (evidence: `README.md`)
- Review actions → Reviews: creates or updates (evidence: `cards/tests.py`)
- Owned and wanted → Cards and sets: references card (evidence: `collection/models.py`)
- Cards and sets → PostgreSQL: persists catalogue (evidence: `README.md`)
- Owned and wanted → PostgreSQL: persists entries (evidence: `README.md`)
- Reviews → PostgreSQL: persists reviews (evidence: `README.md`)
