# cursedhardware/esim-qrcode-portal architecture

> Architecture diagram of the GitHub repository cursedhardware/esim-qrcode-portal, 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/cursedhardware/esim-qrcode-portal
- Repository: https://github.com/cursedhardware/esim-qrcode-portal

## Overview

The eSIM QRCode Portal turns an activation code supplied in the URL into QR-based and manual installation guidance, with device-specific setup links. Its runtime stages are browser entry, code parsing/context, and installation presentation. The README documents the portal’s purpose but no additional capabilities. Core component relationships are supported by excerpts; the surrounding page footer and hash hook are also represented. Deployment metadata scripts are omitted as delivery machinery.

Main entry points: [`src/components/Card.tsx`](https://github.com/cursedhardware/esim-qrcode-portal/blob/main/src/components/Card.tsx) (Activation card), [`src/components/QRCodeEntry.tsx`](https://github.com/cursedhardware/esim-qrcode-portal/blob/main/src/components/QRCodeEntry.tsx) (QR installation), [`src/components/hooks/lpa.ts`](https://github.com/cursedhardware/esim-qrcode-portal/blob/main/src/components/hooks/lpa.ts) (Activation provider), [`src/components/Entry.tsx`](https://github.com/cursedhardware/esim-qrcode-portal/blob/main/src/components/Entry.tsx) (Portal layout)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Portal UI"]
  node_entry["Page entry<br/>[index.ts]"]
  node_portal["Portal layout<br/>[Entry.tsx]"]
  node_card["Activation card<br/>[Card.tsx]"]
  node_footer["Footer<br/>[Footer.tsx]"]
end

subgraph group_activation["Activation Data"]
  node_hash["Confirmation hash<br/>[hash.ts]"]
  node_provider["Activation provider<br/>[lpa.ts]"]
  node_code["Activation parser<br/>[ActivationCode.ts]"]
end

subgraph group_install["Install Methods"]
  node_qr["QR installation<br/>[QRCodeEntry.tsx]"]
  node_manual["Manual installation<br/>[ManualEntry.tsx]"]
  node_line["Section divider<br/>[LineBreak.tsx]"]
  node_android["Android intent<br/>[AndroidIntent.ts]"]
  node_apple["Apple support check<br/>[Apple.ts]"]
end

node_visitor(("Portal visitor"))

node_visitor -->|"opens portal"| node_entry
node_entry -->|"renders"| node_portal
node_portal -->|"renders"| node_card
node_portal -->|"renders"| node_footer
node_card -->|"reads hash"| node_hash
node_card -->|"provides code"| node_provider
node_provider -->|"parses code"| node_code
node_card -->|"renders"| node_qr
node_card -->|"renders"| node_manual
node_card -->|"renders"| node_line
node_qr -->|"reads activation"| node_provider
node_manual -->|"reads activation"| node_provider
node_qr -->|"builds intent"| node_android
node_qr -->|"checks support"| node_apple

click node_entry "https://github.com/cursedhardware/esim-qrcode-portal/blob/main/src/index.ts"
click node_portal "https://github.com/cursedhardware/esim-qrcode-portal/blob/main/src/components/Entry.tsx"
click node_card "https://github.com/cursedhardware/esim-qrcode-portal/blob/main/src/components/Card.tsx"
click node_footer "https://github.com/cursedhardware/esim-qrcode-portal/blob/main/src/components/Footer.tsx"
click node_hash "https://github.com/cursedhardware/esim-qrcode-portal/blob/main/src/components/hooks/hash.ts"
click node_provider "https://github.com/cursedhardware/esim-qrcode-portal/blob/main/src/components/hooks/lpa.ts"
click node_code "https://github.com/cursedhardware/esim-qrcode-portal/blob/main/src/utils/ActivationCode.ts"
click node_qr "https://github.com/cursedhardware/esim-qrcode-portal/blob/main/src/components/QRCodeEntry.tsx"
click node_manual "https://github.com/cursedhardware/esim-qrcode-portal/blob/main/src/components/ManualEntry.tsx"
click node_line "https://github.com/cursedhardware/esim-qrcode-portal/blob/main/src/components/LineBreak.tsx"
click node_android "https://github.com/cursedhardware/esim-qrcode-portal/blob/main/src/utils/AndroidIntent.ts"
click node_apple "https://github.com/cursedhardware/esim-qrcode-portal/blob/main/src/utils/Apple.ts"

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_entry,node_portal,node_card,node_footer toneBlue
class node_hash,node_provider,node_code toneAmber
class node_qr,node_manual,node_line,node_android,node_apple toneMint
class node_visitor toneIndigo
```

## Components

### Portal UI

- [Page entry](https://github.com/cursedhardware/esim-qrcode-portal/blob/main/src/index.ts): `src/index.ts`
- [Portal layout](https://github.com/cursedhardware/esim-qrcode-portal/blob/main/src/components/Entry.tsx): `src/components/Entry.tsx`
- [Activation card](https://github.com/cursedhardware/esim-qrcode-portal/blob/main/src/components/Card.tsx): `src/components/Card.tsx`
- [Footer](https://github.com/cursedhardware/esim-qrcode-portal/blob/main/src/components/Footer.tsx): `src/components/Footer.tsx`

### Activation Data

- [Confirmation hash](https://github.com/cursedhardware/esim-qrcode-portal/blob/main/src/components/hooks/hash.ts): `src/components/hooks/hash.ts`
- [Activation provider](https://github.com/cursedhardware/esim-qrcode-portal/blob/main/src/components/hooks/lpa.ts): `src/components/hooks/lpa.ts`
- [Activation parser](https://github.com/cursedhardware/esim-qrcode-portal/blob/main/src/utils/ActivationCode.ts): `src/utils/ActivationCode.ts`

### Install Methods

- [QR installation](https://github.com/cursedhardware/esim-qrcode-portal/blob/main/src/components/QRCodeEntry.tsx): `src/components/QRCodeEntry.tsx`
- [Manual installation](https://github.com/cursedhardware/esim-qrcode-portal/blob/main/src/components/ManualEntry.tsx): `src/components/ManualEntry.tsx`
- [Section divider](https://github.com/cursedhardware/esim-qrcode-portal/blob/main/src/components/LineBreak.tsx): `src/components/LineBreak.tsx`
- [Android intent](https://github.com/cursedhardware/esim-qrcode-portal/blob/main/src/utils/AndroidIntent.ts): `src/utils/AndroidIntent.ts`
- [Apple support check](https://github.com/cursedhardware/esim-qrcode-portal/blob/main/src/utils/Apple.ts): `src/utils/Apple.ts`

### Other components

- **Portal visitor**

## Connections

- Portal visitor → Page entry: opens portal (evidence: `README.md`)
- Page entry → Portal layout: renders (evidence: `src/index.ts`)
- Portal layout → Activation card: renders (evidence: `src/components/Entry.tsx`)
- Portal layout → Footer: renders (evidence: `src/components/Entry.tsx`)
- Activation card → Confirmation hash: reads hash (evidence: `src/components/Card.tsx`)
- Activation card → Activation provider: provides code (evidence: `src/components/Card.tsx`)
- Activation provider → Activation parser: parses code (evidence: `src/components/hooks/lpa.ts`)
- Activation card → QR installation: renders (evidence: `src/components/Card.tsx`)
- Activation card → Manual installation: renders (evidence: `src/components/Card.tsx`)
- Activation card → Section divider: renders (evidence: `src/components/Card.tsx`)
- QR installation → Activation provider: reads activation (evidence: `src/components/QRCodeEntry.tsx`)
- Manual installation → Activation provider: reads activation (evidence: `src/components/ManualEntry.tsx`)
- QR installation → Android intent: builds intent (evidence: `src/components/QRCodeEntry.tsx`)
- QR installation → Apple support check: checks support (evidence: `src/components/QRCodeEntry.tsx`)
