# bogoomi010/certpeek architecture

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

- Interactive diagram: https://gitdiagram.com/bogoomi010/certpeek
- Repository: https://github.com/bogoomi010/certpeek

## Overview

CertPeek is a local Windows certificate-inspection app: users select or drop a file, enter a PKCS#12 password if needed, and view certificate details without installing anything or making network requests. The frontend invokes a Tauri command that recognizes PEM, DER, or PKCS#12 data and returns parsed certificates; the UI presents status, fields, extensions, fingerprints, and copy actions. README capabilities supplement the partial App excerpt. The graph omits uncertain UI-internal transitions and notes the evidence limit through its documented links.

Main entry points: [`src/App.tsx`](https://github.com/bogoomi010/certpeek/blob/main/src/App.tsx) (File and detail UI), [`src-tauri/src/lib.rs`](https://github.com/bogoomi010/certpeek/blob/main/src-tauri/src/lib.rs) (Certificate parse command), [`src/main.tsx`](https://github.com/bogoomi010/certpeek/blob/main/src/main.tsx) (React mount), [`src/strings.ts`](https://github.com/bogoomi010/certpeek/blob/main/src/strings.ts) (Localized strings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry"]
  node_react_mount["React mount<br/>[main.tsx]"]
  node_tauri_runtime["Tauri runtime<br/>[lib.rs]"]
end

subgraph group_frontend["Certificate interface"]
  node_app["File and detail UI<br/>[App.tsx]"]
  node_strings["Localized strings<br/>[strings.ts]"]
  node_display["Certificate details and status<br/>[App.tsx]"]
  node_copy_action["Copy details<br/>[App.tsx]"]
  node_ui_components["UI component wrappers<br/>[action-button.tsx]"]
end

subgraph group_backend["Parsing backend"]
  node_parse_command["Certificate parse command<br/>[lib.rs]"]
  node_format_detection["Format detection and extraction<br/>[lib.rs]"]
  node_certificate_details["Certificate field extraction<br/>[lib.rs]"]
end

node_user(("User"))
node_certificate_data["Selected certificate file"]
node_certificate_result["Parsed certificate details"]
node_pkcs12_library["PKCS&#35;12 archive parsing"]
node_x509_parser["X.509 parsing"]

node_user -->|"selects or drops"| node_app
node_app -->|"reads locally"| node_certificate_data
node_react_mount -->|"renders"| node_app
node_app -->|"uses labels"| node_strings
node_app -->|"invokes parse_cert"| node_parse_command
node_app -.->|"supplies password"| node_parse_command
node_tauri_runtime -->|"registers command"| node_parse_command
node_parse_command -->|"dispatches format"| node_format_detection
node_format_detection -->|"parses PEM or DER"| node_x509_parser
node_format_detection -->|"opens archive"| node_pkcs12_library
node_format_detection -->|"extracts certificates"| node_certificate_details
node_certificate_details -->|"reads certificate fields"| node_x509_parser
node_certificate_details -->|"returns details"| node_certificate_result
node_parse_command -->|"returns certificates"| node_certificate_result
node_app -->|"renders details"| node_display
node_app -->|"offers copy"| node_copy_action
node_app -->|"uses controls"| node_ui_components

click node_react_mount "https://github.com/bogoomi010/certpeek/blob/main/src/main.tsx"
click node_app "https://github.com/bogoomi010/certpeek/blob/main/src/App.tsx"
click node_strings "https://github.com/bogoomi010/certpeek/blob/main/src/strings.ts"
click node_tauri_runtime "https://github.com/bogoomi010/certpeek/blob/main/src-tauri/src/lib.rs"
click node_parse_command "https://github.com/bogoomi010/certpeek/blob/main/src-tauri/src/lib.rs"
click node_format_detection "https://github.com/bogoomi010/certpeek/blob/main/src-tauri/src/lib.rs"
click node_certificate_details "https://github.com/bogoomi010/certpeek/blob/main/src-tauri/src/lib.rs"
click node_display "https://github.com/bogoomi010/certpeek/blob/main/src/App.tsx"
click node_copy_action "https://github.com/bogoomi010/certpeek/blob/main/src/App.tsx"
click node_ui_components "https://github.com/bogoomi010/certpeek/blob/main/seed-design/ui/action-button.tsx"

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_react_mount,node_tauri_runtime,node_user toneBlue
class node_app,node_strings,node_display,node_copy_action,node_ui_components toneAmber
class node_parse_command,node_format_detection,node_certificate_details toneMint
class node_certificate_data,node_certificate_result,node_pkcs12_library,node_x509_parser toneIndigo
```

## Components

### App entry

- [React mount](https://github.com/bogoomi010/certpeek/blob/main/src/main.tsx): `src/main.tsx`
- [Tauri runtime](https://github.com/bogoomi010/certpeek/blob/main/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`

### Certificate interface

- [File and detail UI](https://github.com/bogoomi010/certpeek/blob/main/src/App.tsx): `src/App.tsx`
- [Localized strings](https://github.com/bogoomi010/certpeek/blob/main/src/strings.ts): `src/strings.ts`
- [Certificate details and status](https://github.com/bogoomi010/certpeek/blob/main/src/App.tsx): `src/App.tsx`
- [Copy details](https://github.com/bogoomi010/certpeek/blob/main/src/App.tsx): `src/App.tsx`
- [UI component wrappers](https://github.com/bogoomi010/certpeek/blob/main/seed-design/ui/action-button.tsx): `seed-design/ui/action-button.tsx`

### Parsing backend

- [Certificate parse command](https://github.com/bogoomi010/certpeek/blob/main/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`
- [Format detection and extraction](https://github.com/bogoomi010/certpeek/blob/main/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`
- [Certificate field extraction](https://github.com/bogoomi010/certpeek/blob/main/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`

### Other components

- **User**
- **Selected certificate file**
- **Parsed certificate details**
- **PKCS#12 archive parsing**
- **X.509 parsing**

## Connections

- User → File and detail UI: selects or drops (evidence: `README.md`)
- File and detail UI → Selected certificate file: reads locally (evidence: `README.md`)
- React mount → File and detail UI: renders (evidence: `src/main.tsx`)
- File and detail UI → Localized strings: uses labels (evidence: `src/App.tsx`)
- File and detail UI → Certificate parse command: invokes parse_cert (evidence: `README.md`)
- File and detail UI → Certificate parse command: supplies password
- Tauri runtime → Certificate parse command: registers command (evidence: `src-tauri/src/lib.rs`)
- Certificate parse command → Format detection and extraction: dispatches format (evidence: `src-tauri/src/lib.rs`)
- Format detection and extraction → X.509 parsing: parses PEM or DER (evidence: `src-tauri/src/lib.rs`)
- Format detection and extraction → PKCS#12 archive parsing: opens archive (evidence: `src-tauri/src/lib.rs`)
- Format detection and extraction → Certificate field extraction: extracts certificates (evidence: `src-tauri/src/lib.rs`)
- Certificate field extraction → X.509 parsing: reads certificate fields (evidence: `src-tauri/src/lib.rs`)
- Certificate field extraction → Parsed certificate details: returns details (evidence: `src-tauri/src/lib.rs`)
- Certificate parse command → Parsed certificate details: returns certificates (evidence: `src-tauri/src/lib.rs`)
- File and detail UI → Certificate details and status: renders details (evidence: `src/App.tsx`)
- File and detail UI → Copy details: offers copy (evidence: `src/App.tsx`)
- File and detail UI → UI component wrappers: uses controls (evidence: `src/App.tsx`)
