# thecodetech/lbs-invitation architecture

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

- Interactive diagram: https://gitdiagram.com/thecodetech/lbs-invitation
- Repository: https://github.com/thecodetech/lbs-invitation

## Overview

LBS Invitation Generator is a browser-only tool for creating personalized invitations for individual visitors or in bulk. The user enters meeting details and visitor names (manually or via CSV); the app keeps data in localStorage, previews a selected invitation, and exports PDF/PNG files, ZIP collections, or a combined PDF. WhatsApp sharing is also available. The graph reflects the sampled calls and README-documented capabilities; the asset path is identified in source comments, though the file tree does not list the image itself.

Main entry points: [`src/App.jsx`](https://github.com/thecodetech/lbs-invitation/blob/main/src/App.jsx) (App state and layout), [`src/components/InvitationPreview.jsx`](https://github.com/thecodetech/lbs-invitation/blob/main/src/components/InvitationPreview.jsx) (Live preview), [`src/components/BulkActions.jsx`](https://github.com/thecodetech/lbs-invitation/blob/main/src/components/BulkActions.jsx) (Bulk actions), [`src/utils/renderInvitation.js`](https://github.com/thecodetech/lbs-invitation/blob/main/src/utils/renderInvitation.js) (Canvas renderer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and inputs"]
  node_entry["React entry<br/>[main.jsx]"]
  node_app["App state and layout<br/>[App.jsx]"]
  node_header["Header<br/>[Header.jsx]"]
  node_meeting["Meeting details<br/>[MeetingForm.jsx]"]
  node_visitors["Visitor list<br/>[VisitorList.jsx]"]
  node_csv["CSV parser<br/>[csvImport.js]"]
  node_date["Date formatter<br/>[formatDate.js]"]
end

subgraph group_invitation["Invitation rendering"]
  node_template["Template configuration<br/>[templateConfig.js]"]
  node_artwork["Invitation artwork"]
  node_preview["Live preview"]
  node_render["Canvas renderer"]
end

subgraph group_exports["Exports and sharing"]
  node_bulk["Bulk actions<br/>[BulkActions.jsx]"]
  node_pdf["PDF builder<br/>[pdfExport.js]"]
  node_zip["ZIP and downloads<br/>[zipExport.js]"]
end

subgraph group_persistence["Local persistence"]
  node_storage[("localStorage wrapper<br/>[storage.js]")]
end

node_user(("LBS user"))
node_whatsapp["WhatsApp"]
node_browser["Browser share and download APIs"]

node_user -->|"opens app"| node_entry
node_entry -->|"renders"| node_app
node_app -->|"renders"| node_header
node_app -->|"renders"| node_meeting
node_app -->|"renders"| node_visitors
node_app -->|"renders"| node_preview
node_app -->|"renders"| node_bulk
node_app -->|"loads template"| node_template
node_meeting -->|"formats date"| node_date
node_visitors -->|"parses import"| node_csv
node_app -->|"loads and saves"| node_storage
node_preview -->|"renders canvas"| node_render
node_render -->|"draws template"| node_artwork
node_preview -->|"builds PDF"| node_pdf
node_preview -->|"downloads PNG"| node_zip
node_preview -->|"opens link"| node_whatsapp
node_preview -->|"shares image"| node_browser
node_bulk -->|"renders visitors"| node_render
node_bulk -->|"builds PDFs"| node_pdf
node_bulk -->|"packages files"| node_zip
node_pdf -->|"saves PDF"| node_browser
node_zip -->|"triggers download"| node_browser

click node_entry "https://github.com/thecodetech/lbs-invitation/blob/main/src/main.jsx"
click node_app "https://github.com/thecodetech/lbs-invitation/blob/main/src/App.jsx"
click node_header "https://github.com/thecodetech/lbs-invitation/blob/main/src/components/Header.jsx"
click node_meeting "https://github.com/thecodetech/lbs-invitation/blob/main/src/components/MeetingForm.jsx"
click node_visitors "https://github.com/thecodetech/lbs-invitation/blob/main/src/components/VisitorList.jsx"
click node_csv "https://github.com/thecodetech/lbs-invitation/blob/main/src/utils/csvImport.js"
click node_date "https://github.com/thecodetech/lbs-invitation/blob/main/src/utils/formatDate.js"
click node_template "https://github.com/thecodetech/lbs-invitation/blob/main/src/config/templateConfig.js"
click node_preview "https://github.com/thecodetech/lbs-invitation/blob/main/src/components/InvitationPreview.jsx"
click node_render "https://github.com/thecodetech/lbs-invitation/blob/main/src/utils/renderInvitation.js"
click node_bulk "https://github.com/thecodetech/lbs-invitation/blob/main/src/components/BulkActions.jsx"
click node_pdf "https://github.com/thecodetech/lbs-invitation/blob/main/src/utils/pdfExport.js"
click node_zip "https://github.com/thecodetech/lbs-invitation/blob/main/src/utils/zipExport.js"
click node_storage "https://github.com/thecodetech/lbs-invitation/blob/main/src/utils/storage.js"

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_app,node_header,node_meeting,node_visitors,node_csv,node_date,node_user,node_browser toneBlue
class node_template,node_artwork,node_preview,node_render toneAmber
class node_bulk,node_pdf,node_zip toneMint
class node_storage toneRose
class node_whatsapp toneIndigo
```

## Components

### App and inputs

- [React entry](https://github.com/thecodetech/lbs-invitation/blob/main/src/main.jsx): `src/main.jsx`
- [App state and layout](https://github.com/thecodetech/lbs-invitation/blob/main/src/App.jsx): `src/App.jsx`
- [Header](https://github.com/thecodetech/lbs-invitation/blob/main/src/components/Header.jsx): `src/components/Header.jsx`
- [Meeting details](https://github.com/thecodetech/lbs-invitation/blob/main/src/components/MeetingForm.jsx): `src/components/MeetingForm.jsx`
- [Visitor list](https://github.com/thecodetech/lbs-invitation/blob/main/src/components/VisitorList.jsx): `src/components/VisitorList.jsx`
- [CSV parser](https://github.com/thecodetech/lbs-invitation/blob/main/src/utils/csvImport.js): `src/utils/csvImport.js`
- [Date formatter](https://github.com/thecodetech/lbs-invitation/blob/main/src/utils/formatDate.js): `src/utils/formatDate.js`

### Invitation rendering

- [Template configuration](https://github.com/thecodetech/lbs-invitation/blob/main/src/config/templateConfig.js): `src/config/templateConfig.js`
- **Invitation artwork**
- [Live preview](https://github.com/thecodetech/lbs-invitation/blob/main/src/components/InvitationPreview.jsx): `src/components/InvitationPreview.jsx`
- [Canvas renderer](https://github.com/thecodetech/lbs-invitation/blob/main/src/utils/renderInvitation.js): `src/utils/renderInvitation.js`

### Exports and sharing

- [Bulk actions](https://github.com/thecodetech/lbs-invitation/blob/main/src/components/BulkActions.jsx): `src/components/BulkActions.jsx`
- [PDF builder](https://github.com/thecodetech/lbs-invitation/blob/main/src/utils/pdfExport.js): `src/utils/pdfExport.js`
- [ZIP and downloads](https://github.com/thecodetech/lbs-invitation/blob/main/src/utils/zipExport.js): `src/utils/zipExport.js`

### Local persistence

- [localStorage wrapper](https://github.com/thecodetech/lbs-invitation/blob/main/src/utils/storage.js): `src/utils/storage.js`

### Other components

- **LBS user**
- **WhatsApp**
- **Browser share and download APIs**

## Connections

- LBS user → React entry: opens app (evidence: `README.md`)
- React entry → App state and layout: renders (evidence: `src/main.jsx`)
- App state and layout → Header: renders (evidence: `src/App.jsx`)
- App state and layout → Meeting details: renders (evidence: `src/App.jsx`)
- App state and layout → Visitor list: renders (evidence: `src/App.jsx`)
- App state and layout → Live preview: renders (evidence: `src/App.jsx`)
- App state and layout → Bulk actions: renders (evidence: `src/App.jsx`)
- App state and layout → Template configuration: loads template (evidence: `src/App.jsx`)
- Meeting details → Date formatter: formats date (evidence: `src/components/MeetingForm.jsx`)
- Visitor list → CSV parser: parses import (evidence: `src/components/VisitorList.jsx`)
- App state and layout → localStorage wrapper: loads and saves (evidence: `src/App.jsx`)
- Live preview → Canvas renderer: renders canvas (evidence: `src/components/InvitationPreview.jsx`)
- Canvas renderer → Invitation artwork: draws template (evidence: `src/utils/renderInvitation.js`)
- Live preview → PDF builder: builds PDF (evidence: `src/components/InvitationPreview.jsx`)
- Live preview → ZIP and downloads: downloads PNG (evidence: `src/components/InvitationPreview.jsx`)
- Live preview → WhatsApp: opens link (evidence: `src/components/InvitationPreview.jsx`)
- Live preview → Browser share and download APIs: shares image (evidence: `src/components/InvitationPreview.jsx`)
- Bulk actions → Canvas renderer: renders visitors (evidence: `src/components/BulkActions.jsx`)
- Bulk actions → PDF builder: builds PDFs (evidence: `src/components/BulkActions.jsx`)
- Bulk actions → ZIP and downloads: packages files (evidence: `src/components/BulkActions.jsx`)
- PDF builder → Browser share and download APIs: saves PDF
- ZIP and downloads → Browser share and download APIs: triggers download (evidence: `src/utils/zipExport.js`)
