# vasipallie/onestore architecture

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

- Interactive diagram: https://gitdiagram.com/vasipallie/onestore
- Repository: https://github.com/vasipallie/onestore

## Overview

1. **Repository shape**
   - This repo is centered on a **Python CLI password manager** with a small **Node-based web layer** alongside it.
   - The core product boundary is: **terminal client + local encryption + Supabase-backed cloud persistence**.

2. **Primary runtime: CLI application**
   - `cli/cli.py` is the main application entrypoint for OneStore.
   - `cli/release/cli.exe` is a packaged Windows release artifact, which suggests the CLI is distributed as a standalone executable rather than only as source.

3. **User interaction model**
   - The CLI exposes the main user flows described in the README: `auth`, `password-gen`, `passstore`, `passretrieve`, `clear-passstore`, `support`, and `exit`.
   - This makes the terminal the main control plane for authentication and password operations.

4. **Security boundary: encryption happens locally**
   - The key architectural guarantee is that passwords are **encrypted on the user’s device before any cloud sync**.
   - The README says Fernet is used for encryption, with the encryption key derived from the user’s **5-word keyphrase**.
   - That means the cloud never receives plaintext passwords; it only stores encrypted payloads and whatever is needed for account verification.

5. **Identity and recovery model**
   - The 5-word keyphrase is the main recovery mechanism and is intentionally unrecoverable by the service.
   - This creates a strict zero-knowledge boundary: losing the keyphrases means losing access to stored secrets.

6. **Cloud dependency**
   - The README identifies **Supabase** as the cloud backend for authentication and database storage.
   - Architecturally, Supabase is the external persistence/auth layer for user accounts and encrypted password records, while the client remains responsible for decrypting and encrypting data.

7. **Password storage flow**
   - The expected data flow is: user enters or generates a password → CLI encrypts it locally → encrypted value is synced to Supabase.
   - Retrieval reverses that flow: CLI fetches encrypted data from Supabase → derives the local key from the keyphrases → decrypts locally for display/use.

8. **Password generation flow**
   - The CLI includes a password generator, and the README notes **WonderWords** as part of the tech stack.
   - That suggests generated passwords and/or keyphrases are produced client-side, keeping secret generation out of the backend.

9. **Web subsystem**
   - `OneStore Web/index.js`, `OneStore Web/views/index.ejs`, and `OneStore Web/views/files` indicate a separate **server-rendered Node web app**.
   - The presence of EJS templates suggests a simple presentation layer rather than a SPA or heavy frontend stack.
   - Based on the tree alone, this web app appears separate from the core CLI and is likely for landing/help/support or a lightweight web interface.

10. **Assets and documentation**
   - `assets/onestore.png` is branding used in the README and likely in the web UI.
   - `readme.md` is the main source of product behavior, command surface, and security model.

11. **Release and packaging**
   - The checked-in executable under `cli/release/` shows the project is intended to ship as a prebuilt desktop/terminal binary.
   - That matters for architecture because end users do not need to run a server locally to use the CLI core.

12. **Important repo note for a diagram**
   - The README references files and folders such as `server/`, `requirements.txt`, and `backup.py`, but the current tree shows `OneStore Web/` instead.
   - So the safest architecture diagram is to center on the **current** split: **Python CLI core + external Supabase + separate Node/EJS web app**.

Main entry points: [`OneStore Web/index.js`](https://github.com/vasipallie/onestore/blob/HEAD/OneStore%20Web/index.js) (Web app), [`cli/cli.py`](https://github.com/vasipallie/onestore/blob/main/cli/cli.py) (CLI app), [`readme.md`](https://github.com/vasipallie/onestore/blob/main/readme.md) (README), [`OneStore Web/package.json`](https://github.com/vasipallie/onestore/blob/HEAD/OneStore%20Web/package.json) (Package manifest)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["Python CLI"]
  node_cli_entry["CLI app<br/>python entrypoint<br/>[cli.py]"]
  node_cli_release["Windows build<br/>packaged binary<br/>[cli.exe]"]
  node_cli_auth(("Auth flow<br/>user flow"))
  node_cli_password_gen(("Password gen<br/>generator"))
  node_cli_store(("Store secrets<br/>encryption flow"))
  node_cli_retrieve(("Retrieve secrets<br/>decryption flow"))
  node_cli_keyphrase{{"Keyphrase<br/>local derivation"}}
  node_cli_crypto{{"Fernet crypto<br/>security library"}}
end

subgraph group_web["Node Web"]
  node_web_index["Web app<br/>node entrypoint<br/>[index.js]"]
  node_web_template["Home view<br/>ejs template<br/>[index.ejs]"]
  node_web_files["View files<br/>web assets"]
  node_npm_manifest["Package manifest<br/>node package<br/>[package.json]"]
  node_npm_lock["Lockfile<br/>[package-lock.json]"]
end

subgraph group_external["External services"]
  node_supabase[("Supabase<br/>cloud backend")]
  node_wonderwords{{"WonderWords<br/>word generator"}}
end

subgraph group_repo["Docs & assets"]
  node_readme["README<br/>documentation<br/>[readme.md]"]
  node_brand["Brand asset<br/>image asset"]
  node_gitignore["Ignore rules<br/>repo config<br/>[.gitignore]"]
end

node_cli_entry -->|"offers"| node_cli_auth
node_cli_entry -->|"offers"| node_cli_password_gen
node_cli_entry -->|"drives"| node_cli_store
node_cli_entry -->|"drives"| node_cli_retrieve
node_cli_store -->|"encrypts with"| node_cli_crypto
node_cli_retrieve -->|"decrypts with"| node_cli_crypto
node_cli_crypto -->|"derives key from"| node_cli_keyphrase
node_cli_store -->|"syncs to"| node_supabase
node_cli_retrieve -->|"fetches from"| node_supabase
node_cli_auth -->|"authenticates via"| node_supabase
node_cli_password_gen -->|"uses"| node_wonderwords
node_web_index -->|"renders"| node_web_template
node_web_index -->|"serves"| node_web_files
node_web_index -.->|"integrates with"| node_supabase
node_readme -->|"documents"| node_cli_entry
node_readme -->|"documents"| node_cli_crypto
node_readme -->|"documents"| node_supabase
node_readme -.->|"mentions"| node_web_index
node_brand -.->|"used by"| node_readme
node_brand -.->|"used by"| node_web_index
node_npm_manifest -->|"boots"| node_web_index
node_npm_lock -->|"pins"| node_npm_manifest
node_gitignore -.->|"excludes"| node_cli_release

click node_cli_entry "https://github.com/vasipallie/onestore/blob/main/cli/cli.py"
click node_cli_release "https://github.com/vasipallie/onestore/blob/main/cli/release/cli.exe"
click node_web_index "https://github.com/vasipallie/onestore/blob/main/OneStore Web/index.js"
click node_web_template "https://github.com/vasipallie/onestore/blob/main/OneStore Web/views/index.ejs"
click node_web_files "https://github.com/vasipallie/onestore/tree/main/OneStore Web/views/files"
click node_readme "https://github.com/vasipallie/onestore/blob/main/readme.md"
click node_npm_manifest "https://github.com/vasipallie/onestore/blob/main/OneStore Web/package.json"
click node_npm_lock "https://github.com/vasipallie/onestore/blob/main/OneStore Web/package-lock.json"
click node_gitignore "https://github.com/vasipallie/onestore/blob/main/.gitignore"

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_cli_entry,node_cli_release,node_cli_auth,node_cli_password_gen,node_cli_store,node_cli_retrieve,node_cli_keyphrase,node_cli_crypto toneBlue
class node_web_index,node_web_template,node_web_files,node_npm_manifest,node_npm_lock toneAmber
class node_supabase,node_wonderwords toneMint
class node_readme,node_brand,node_gitignore toneRose
```

## Components

### Python CLI

Terminal password manager, local encryption boundary, and packaged release

- [CLI app](https://github.com/vasipallie/onestore/blob/main/cli/cli.py): python entrypoint · Main terminal control plane for OneStore · `cli/cli.py`
- [Windows build](https://github.com/vasipallie/onestore/blob/main/cli/release/cli.exe): packaged binary · Prebuilt executable distribution artifact · `cli/release/cli.exe`
- **Auth flow**: user flow · Login and account verification actions
- **Password gen**: generator · Client-side password creation
- **Store secrets**: encryption flow · Encrypts passwords locally before sync
- **Retrieve secrets**: decryption flow · Fetches encrypted data and decrypts locally
- **Keyphrase**: local derivation · Five-word recovery secret used to derive the encryption key
- **Fernet crypto**: security library · Local encryption and decryption boundary

### Node Web

Small server-rendered web layer

- [Web app](https://github.com/vasipallie/onestore/blob/HEAD/OneStore%20Web/index.js): node entrypoint · Server-rendered Node application · `OneStore Web/index.js`
- [Home view](https://github.com/vasipallie/onestore/blob/HEAD/OneStore%20Web/views/index.ejs): ejs template · Primary rendered page · `OneStore Web/views/index.ejs`
- [View files](https://github.com/vasipallie/onestore/tree/HEAD/OneStore%20Web/views/files): web assets · Auxiliary view-side files · `OneStore Web/views/files`
- [Package manifest](https://github.com/vasipallie/onestore/blob/HEAD/OneStore%20Web/package.json): node package · Node web app package definition · `OneStore Web/package.json`
- [Lockfile](https://github.com/vasipallie/onestore/blob/HEAD/OneStore%20Web/package-lock.json): node lockfile · Pinned dependency resolution for web app · `OneStore Web/package-lock.json`

### External services

Cloud backend and client-side generation dependency

- **Supabase**: cloud backend · Authentication and encrypted record persistence
- **WonderWords**: word generator · Client-side word generation support

### Docs & assets

Repository documentation and branding

- [README](https://github.com/vasipallie/onestore/blob/main/readme.md): documentation · Describes commands, flows, and security model · `readme.md`
- **Brand asset**: image asset · Project logo used by docs and web UI
- [Ignore rules](https://github.com/vasipallie/onestore/blob/main/.gitignore): repo config · Repository ignore configuration · `.gitignore`

## Connections

- CLI app → Auth flow: offers · CLI exposes authentication as a core command
- CLI app → Password gen: offers · CLI includes password generation flow
- CLI app → Store secrets: drives · CLI handles password storage workflow
- CLI app → Retrieve secrets: drives · CLI handles password retrieval workflow
- Store secrets → Fernet crypto: encrypts with · Passwords are encrypted locally before cloud sync
- Retrieve secrets → Fernet crypto: decrypts with · Encrypted records are decrypted on the device
- Fernet crypto → Keyphrase: derives key from · Five-word phrase is the recovery secret
- Store secrets → Supabase: syncs to · Encrypted password records are stored in the cloud
- Retrieve secrets → Supabase: fetches from · Client reads encrypted records from Supabase
- Auth flow → Supabase: authenticates via · Account verification and sign-in use Supabase
- Password gen → WonderWords: uses · Word generation support for client-side creation
- Web app → Home view: renders · Node app serves the EJS view
- Web app → View files: serves · Web app includes view-side files
- Web app → Supabase: integrates with · Web layer likely relies on the same cloud backend
- README → CLI app: documents · README defines the CLI command surface and behavior
- README → Fernet crypto: documents · README explains local encryption and zero-knowledge boundary
- README → Supabase: documents · README names Supabase as backend storage and auth
- README → Web app: mentions · README references the separate Node web subsystem
- Brand asset → README: used by · Branding appears in repository documentation
- Brand asset → Web app: used by · Logo likely reused by the web interface
- Package manifest → Web app: boots · Node package defines the web entrypoint
- Lockfile → Package manifest: pins · Lockfile constrains web dependencies
- Ignore rules → Windows build: excludes · Repo ignore rules likely keep build artifacts out of source control
