# fedexwarrior/landing-page architecture

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

- Interactive diagram: https://gitdiagram.com/fedexwarrior/landing-page
- Repository: https://github.com/fedexwarrior/landing-page

## Overview

This is a character-companion web app with chat, customizable image creation, account access, and credit purchases. The main user flow is orchestrated by the React app: users enter through the home screen, choose a product view, and can top up credits before returning from Stripe checkout. The sampled client code supports the view and checkout links shown here; the README is only a title, and the server files were indexed but not excerpted, so their internal behavior and connections are not inferred.

Main entry points: [`src/App.tsx`](https://github.com/fedexwarrior/landing-page/blob/master/src/App.tsx) (App coordinator), [`src/components/hero/HeroScreen.tsx`](https://github.com/fedexwarrior/landing-page/blob/master/src/components/hero/HeroScreen.tsx) (Home screen), [`src/components/SignUpModal.tsx`](https://github.com/fedexwarrior/landing-page/blob/master/src/components/SignUpModal.tsx) (Sign-up modal), [`src/components/credits/CreditsSection.tsx`](https://github.com/fedexwarrior/landing-page/blob/master/src/components/credits/CreditsSection.tsx) (Credits screen)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["App experience"]
  node_app["App coordinator<br/>[App.tsx]"]
  node_hero["Home screen<br/>[HeroScreen.tsx]"]
  node_chat["Companion chat<br/>[ChatInterface.tsx]"]
  node_chat_models["Chat models<br/>[chat.ts]"]
end

subgraph group_creation["Companion creation"]
  node_character_select["Character selection"]
  node_character_data["Character catalog<br/>[characters.ts]"]
  node_image_creation["Image creation"]
  node_character_models["Character models<br/>[character.ts]"]
end

subgraph group_account["Identity"]
  node_signup["Sign-up modal<br/>[SignUpModal.tsx]"]
  node_google_signin["Google sign-in"]
  node_auth_hook["Auth session hook<br/>[useAuthHarvest.tsx]"]
end

subgraph group_commerce["Credits and payments"]
  node_credits["Credits screen<br/>[CreditsSection.tsx]"]
  node_credit_hook["Checkout hook<br/>[useCredits.ts]"]
  node_stripe_checkout["Stripe checkout<br/>[StripeCheckout.tsx]"]
  node_success["Payment success<br/>[SuccessPage.tsx]"]
  node_cancel["Payment cancel<br/>[CancelPage.tsx]"]
  node_transaction_models["Transaction models<br/>[transaction.ts]"]
end

node_user(("Visitor"))
node_api["API handlers<br/>[index.ts]"]
node_stripe["Stripe"]

node_user -->|"uses"| node_app
node_app -->|"renders"| node_hero
node_app -->|"renders"| node_chat
node_app -->|"renders"| node_image_creation
node_app -->|"renders"| node_credits
node_app -->|"renders"| node_signup
node_app -->|"routes"| node_success
node_app -->|"routes"| node_cancel
node_signup -->|"renders"| node_google_signin
node_hero -->|"reads"| node_character_data
node_character_select -->|"reads"| node_character_data
node_credits -->|"uses"| node_credit_hook
node_credit_hook -->|"starts checkout"| node_stripe
node_success -->|"verifies session"| node_stripe

click node_app "https://github.com/fedexwarrior/landing-page/blob/master/src/App.tsx"
click node_hero "https://github.com/fedexwarrior/landing-page/blob/master/src/components/hero/HeroScreen.tsx"
click node_chat "https://github.com/fedexwarrior/landing-page/blob/master/src/components/chat-interface/ChatInterface.tsx"
click node_character_select "https://github.com/fedexwarrior/landing-page/blob/master/src/components/character-selection/CharacterSelection.tsx"
click node_character_data "https://github.com/fedexwarrior/landing-page/blob/master/src/config/characters.ts"
click node_image_creation "https://github.com/fedexwarrior/landing-page/blob/master/src/components/image-generation/ImageGeneration.tsx"
click node_character_models "https://github.com/fedexwarrior/landing-page/blob/master/src/types/character.ts"
click node_chat_models "https://github.com/fedexwarrior/landing-page/blob/master/src/types/chat.ts"
click node_signup "https://github.com/fedexwarrior/landing-page/blob/master/src/components/SignUpModal.tsx"
click node_google_signin "https://github.com/fedexwarrior/landing-page/blob/master/src/components/GoogleSignInButton.tsx"
click node_auth_hook "https://github.com/fedexwarrior/landing-page/blob/master/src/hooks/useAuthHarvest.tsx"
click node_credits "https://github.com/fedexwarrior/landing-page/blob/master/src/components/credits/CreditsSection.tsx"
click node_credit_hook "https://github.com/fedexwarrior/landing-page/blob/master/src/hooks/useCredits.ts"
click node_stripe_checkout "https://github.com/fedexwarrior/landing-page/blob/master/src/components/transaction-gateway/StripeCheckout.tsx"
click node_success "https://github.com/fedexwarrior/landing-page/blob/master/src/pages/SuccessPage.tsx"
click node_cancel "https://github.com/fedexwarrior/landing-page/blob/master/src/pages/CancelPage.tsx"
click node_transaction_models "https://github.com/fedexwarrior/landing-page/blob/master/src/types/transaction.ts"
click node_api "https://github.com/fedexwarrior/landing-page/blob/master/api/index.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_app,node_hero,node_chat,node_chat_models toneBlue
class node_character_select,node_character_data,node_image_creation,node_character_models toneAmber
class node_signup,node_google_signin,node_auth_hook,node_api toneMint
class node_credits,node_credit_hook,node_stripe_checkout,node_success,node_cancel,node_transaction_models toneRose
class node_user,node_stripe toneIndigo
```

## Components

### App experience

- [App coordinator](https://github.com/fedexwarrior/landing-page/blob/master/src/App.tsx): `src/App.tsx`
- [Home screen](https://github.com/fedexwarrior/landing-page/blob/master/src/components/hero/HeroScreen.tsx): `src/components/hero/HeroScreen.tsx`
- [Companion chat](https://github.com/fedexwarrior/landing-page/blob/master/src/components/chat-interface/ChatInterface.tsx): `src/components/chat-interface/ChatInterface.tsx`
- [Chat models](https://github.com/fedexwarrior/landing-page/blob/master/src/types/chat.ts): `src/types/chat.ts`

### Companion creation

- [Character selection](https://github.com/fedexwarrior/landing-page/blob/master/src/components/character-selection/CharacterSelection.tsx): `src/components/character-selection/CharacterSelection.tsx`
- [Character catalog](https://github.com/fedexwarrior/landing-page/blob/master/src/config/characters.ts): `src/config/characters.ts`
- [Image creation](https://github.com/fedexwarrior/landing-page/blob/master/src/components/image-generation/ImageGeneration.tsx): `src/components/image-generation/ImageGeneration.tsx`
- [Character models](https://github.com/fedexwarrior/landing-page/blob/master/src/types/character.ts): `src/types/character.ts`

### Identity

- [Sign-up modal](https://github.com/fedexwarrior/landing-page/blob/master/src/components/SignUpModal.tsx): `src/components/SignUpModal.tsx`
- [Google sign-in](https://github.com/fedexwarrior/landing-page/blob/master/src/components/GoogleSignInButton.tsx): `src/components/GoogleSignInButton.tsx`
- [Auth session hook](https://github.com/fedexwarrior/landing-page/blob/master/src/hooks/useAuthHarvest.tsx): `src/hooks/useAuthHarvest.tsx`

### Credits and payments

- [Credits screen](https://github.com/fedexwarrior/landing-page/blob/master/src/components/credits/CreditsSection.tsx): `src/components/credits/CreditsSection.tsx`
- [Checkout hook](https://github.com/fedexwarrior/landing-page/blob/master/src/hooks/useCredits.ts): `src/hooks/useCredits.ts`
- [Stripe checkout](https://github.com/fedexwarrior/landing-page/blob/master/src/components/transaction-gateway/StripeCheckout.tsx): `src/components/transaction-gateway/StripeCheckout.tsx`
- [Payment success](https://github.com/fedexwarrior/landing-page/blob/master/src/pages/SuccessPage.tsx): `src/pages/SuccessPage.tsx`
- [Payment cancel](https://github.com/fedexwarrior/landing-page/blob/master/src/pages/CancelPage.tsx): `src/pages/CancelPage.tsx`
- [Transaction models](https://github.com/fedexwarrior/landing-page/blob/master/src/types/transaction.ts): `src/types/transaction.ts`

### Other components

- **Visitor**
- [API handlers](https://github.com/fedexwarrior/landing-page/blob/master/api/index.ts): `api/index.ts`
- **Stripe**

## Connections

- Visitor → App coordinator: uses
- App coordinator → Home screen: renders (evidence: `src/App.tsx`)
- App coordinator → Companion chat: renders (evidence: `src/App.tsx`)
- App coordinator → Image creation: renders (evidence: `src/App.tsx`)
- App coordinator → Credits screen: renders (evidence: `src/App.tsx`)
- App coordinator → Sign-up modal: renders (evidence: `src/App.tsx`)
- App coordinator → Payment success: routes (evidence: `src/App.tsx`)
- App coordinator → Payment cancel: routes (evidence: `src/App.tsx`)
- Sign-up modal → Google sign-in: renders (evidence: `src/components/SignUpModal.tsx`)
- Home screen → Character catalog: reads (evidence: `src/components/hero/HeroScreen.tsx`)
- Character selection → Character catalog: reads (evidence: `src/components/character-selection/CharacterSelection.tsx`)
- Credits screen → Checkout hook: uses (evidence: `src/components/credits/CreditsSection.tsx`)
- Checkout hook → Stripe: starts checkout (evidence: `src/hooks/useCredits.ts`)
- Payment success → Stripe: verifies session (evidence: `src/pages/SuccessPage.tsx`)
