# irshadalam-dev/sparklink architecture

> Architecture diagram of the GitHub repository irshadalam-dev/sparklink, 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/irshadalam-dev/sparklink
- Repository: https://github.com/irshadalam-dev/sparklink

## Overview

SparkLink is a link-in-bio builder: a creator signs in, edits profile details and links, then shares a themed public profile. The graph follows routing, authenticated editing, persistence, and public rendering, with authentication and avatar storage shown as backend capabilities. Several feature modules were not sampled in full; their inclusion and any uncertain relationships are limited to the README, tree, and SOURCE INDEX references.

Main entry points: [`src/App.tsx`](https://github.com/irshadalam-dev/sparklink/blob/main/src/App.tsx) (Routes and providers), [`src/lib/supabase.ts`](https://github.com/irshadalam-dev/sparklink/blob/main/src/lib/supabase.ts) (Supabase client), [`src/layouts/DashboardLayout.tsx`](https://github.com/irshadalam-dev/sparklink/blob/main/src/layouts/DashboardLayout.tsx) (Dashboard shell), [`src/pages/Dashboard/LinkEditor.tsx`](https://github.com/irshadalam-dev/sparklink/blob/main/src/pages/Dashboard/LinkEditor.tsx) (Link editor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application routing"]
  node_app["Routes and providers<br/>[App.tsx]"]
  node_supabase_client["Supabase client<br/>[supabase.ts]"]
  node_platform["Supabase services"]
  node_toast["Toast notifications<br/>[ToastProvider.tsx]"]
  node_error_boundary["Error boundary<br/>[ErrorBoundary.tsx]"]
  node_spinner["Loading indicator<br/>[LoadingSpinner.tsx]"]
end

subgraph group_identity["Account access"]
  node_auth["Sign-in and signup<br/>[AuthPage.tsx]"]
  node_callback["Auth callback<br/>[AuthCallback.tsx]"]
  node_password["Password recovery"]
  node_password_update["Password update"]
end

subgraph group_creator["Creator dashboard"]
  node_dashboard["Dashboard shell"]
  node_editor["Link editor<br/>[LinkEditor.tsx]"]
  node_settings["Profile settings"]
  node_themes["Theme selector<br/>[ThemeSelector.tsx]"]
  node_preview["Phone preview<br/>[PreviewMockup.tsx]"]
end

subgraph group_profiles["Public presence"]
  node_public["Public profile<br/>[PublicProfile.tsx]"]
  node_notfound["Not found view<br/>[NotFound.tsx]"]
  node_database[("Profile and link data<br/>[schema.sql]")]
  node_avatar_storage["Avatar storage"]
end

node_creator(("Creator"))

node_creator -->|"uses"| node_app
node_app -->|"routes to"| node_auth
node_app -->|"routes to"| node_callback
node_app -->|"routes to"| node_password
node_app -->|"routes to"| node_password_update
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_public
node_app -->|"provides"| node_toast
node_app -->|"wraps"| node_error_boundary
node_auth -->|"authenticates with"| node_supabase_client
node_callback -->|"checks session"| node_supabase_client
node_dashboard -->|"checks session"| node_supabase_client
node_editor -->|"reads and writes"| node_supabase_client
node_settings -->|"reads and writes"| node_supabase_client
node_public -->|"fetches profile and links"| node_supabase_client
node_supabase_client -->|"connects to"| node_platform
node_platform -->|"stores profile and links"| node_database
node_platform -->|"stores avatars"| node_avatar_storage
node_dashboard -.->|"renders"| node_editor
node_dashboard -.->|"renders"| node_settings
node_editor -->|"renders"| node_preview
node_settings -->|"offers themes"| node_themes
node_public -->|"shows when absent"| node_notfound
node_editor -->|"reports outcomes"| node_toast
node_settings -->|"reports outcomes"| node_toast
node_dashboard -->|"shows while loading"| node_spinner
node_editor -->|"shows while loading"| node_spinner
node_public -->|"shows while loading"| node_spinner

click node_app "https://github.com/irshadalam-dev/sparklink/blob/main/src/App.tsx"
click node_auth "https://github.com/irshadalam-dev/sparklink/blob/main/src/pages/AuthPage.tsx"
click node_callback "https://github.com/irshadalam-dev/sparklink/blob/main/src/pages/AuthCallback.tsx"
click node_password "https://github.com/irshadalam-dev/sparklink/blob/main/src/pages/ResetPasswordPage.tsx"
click node_password_update "https://github.com/irshadalam-dev/sparklink/blob/main/src/pages/UpdatePasswordPage.tsx"
click node_dashboard "https://github.com/irshadalam-dev/sparklink/blob/main/src/layouts/DashboardLayout.tsx"
click node_editor "https://github.com/irshadalam-dev/sparklink/blob/main/src/pages/Dashboard/LinkEditor.tsx"
click node_settings "https://github.com/irshadalam-dev/sparklink/blob/main/src/components/ProfileSettings.tsx"
click node_themes "https://github.com/irshadalam-dev/sparklink/blob/main/src/components/ThemeSelector.tsx"
click node_preview "https://github.com/irshadalam-dev/sparklink/blob/main/src/components/PreviewMockup.tsx"
click node_public "https://github.com/irshadalam-dev/sparklink/blob/main/src/pages/PublicProfile.tsx"
click node_notfound "https://github.com/irshadalam-dev/sparklink/blob/main/src/pages/NotFound.tsx"
click node_supabase_client "https://github.com/irshadalam-dev/sparklink/blob/main/src/lib/supabase.ts"
click node_database "https://github.com/irshadalam-dev/sparklink/blob/main/supabase/schema.sql"
click node_toast "https://github.com/irshadalam-dev/sparklink/blob/main/src/components/ui/ToastProvider.tsx"
click node_error_boundary "https://github.com/irshadalam-dev/sparklink/blob/main/src/components/ui/ErrorBoundary.tsx"
click node_spinner "https://github.com/irshadalam-dev/sparklink/blob/main/src/components/ui/LoadingSpinner.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_app,node_supabase_client,node_platform,node_toast,node_error_boundary,node_spinner toneBlue
class node_auth,node_callback,node_password,node_password_update toneAmber
class node_dashboard,node_editor,node_settings,node_themes,node_preview toneMint
class node_public,node_notfound,node_database,node_avatar_storage toneRose
class node_creator toneIndigo
```

## Components

### Application routing

- [Routes and providers](https://github.com/irshadalam-dev/sparklink/blob/main/src/App.tsx): `src/App.tsx`
- [Supabase client](https://github.com/irshadalam-dev/sparklink/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`
- **Supabase services**
- [Toast notifications](https://github.com/irshadalam-dev/sparklink/blob/main/src/components/ui/ToastProvider.tsx): `src/components/ui/ToastProvider.tsx`
- [Error boundary](https://github.com/irshadalam-dev/sparklink/blob/main/src/components/ui/ErrorBoundary.tsx): `src/components/ui/ErrorBoundary.tsx`
- [Loading indicator](https://github.com/irshadalam-dev/sparklink/blob/main/src/components/ui/LoadingSpinner.tsx): `src/components/ui/LoadingSpinner.tsx`

### Account access

- [Sign-in and signup](https://github.com/irshadalam-dev/sparklink/blob/main/src/pages/AuthPage.tsx): `src/pages/AuthPage.tsx`
- [Auth callback](https://github.com/irshadalam-dev/sparklink/blob/main/src/pages/AuthCallback.tsx): `src/pages/AuthCallback.tsx`
- [Password recovery](https://github.com/irshadalam-dev/sparklink/blob/main/src/pages/ResetPasswordPage.tsx): `src/pages/ResetPasswordPage.tsx`
- [Password update](https://github.com/irshadalam-dev/sparklink/blob/main/src/pages/UpdatePasswordPage.tsx): `src/pages/UpdatePasswordPage.tsx`

### Creator dashboard

- [Dashboard shell](https://github.com/irshadalam-dev/sparklink/blob/main/src/layouts/DashboardLayout.tsx): `src/layouts/DashboardLayout.tsx`
- [Link editor](https://github.com/irshadalam-dev/sparklink/blob/main/src/pages/Dashboard/LinkEditor.tsx): `src/pages/Dashboard/LinkEditor.tsx`
- [Profile settings](https://github.com/irshadalam-dev/sparklink/blob/main/src/components/ProfileSettings.tsx): `src/components/ProfileSettings.tsx`
- [Theme selector](https://github.com/irshadalam-dev/sparklink/blob/main/src/components/ThemeSelector.tsx): `src/components/ThemeSelector.tsx`
- [Phone preview](https://github.com/irshadalam-dev/sparklink/blob/main/src/components/PreviewMockup.tsx): `src/components/PreviewMockup.tsx`

### Public presence

- [Public profile](https://github.com/irshadalam-dev/sparklink/blob/main/src/pages/PublicProfile.tsx): `src/pages/PublicProfile.tsx`
- [Not found view](https://github.com/irshadalam-dev/sparklink/blob/main/src/pages/NotFound.tsx): `src/pages/NotFound.tsx`
- [Profile and link data](https://github.com/irshadalam-dev/sparklink/blob/main/supabase/schema.sql): `supabase/schema.sql`
- **Avatar storage**

### Other components

- **Creator**

## Connections

- Creator → Routes and providers: uses (evidence: `README.md`)
- Routes and providers → Sign-in and signup: routes to (evidence: `src/App.tsx`)
- Routes and providers → Auth callback: routes to (evidence: `src/App.tsx`)
- Routes and providers → Password recovery: routes to (evidence: `src/App.tsx`)
- Routes and providers → Password update: routes to (evidence: `src/App.tsx`)
- Routes and providers → Dashboard shell: routes to (evidence: `src/App.tsx`)
- Routes and providers → Public profile: routes to (evidence: `src/App.tsx`)
- Routes and providers → Toast notifications: provides (evidence: `src/App.tsx`)
- Routes and providers → Error boundary: wraps (evidence: `src/App.tsx`)
- Sign-in and signup → Supabase client: authenticates with (evidence: `src/pages/AuthPage.tsx`)
- Auth callback → Supabase client: checks session (evidence: `src/pages/AuthCallback.tsx`)
- Dashboard shell → Supabase client: checks session (evidence: `src/layouts/DashboardLayout.tsx`)
- Link editor → Supabase client: reads and writes (evidence: `src/pages/Dashboard/LinkEditor.tsx`)
- Profile settings → Supabase client: reads and writes (evidence: `src/components/ProfileSettings.tsx`)
- Public profile → Supabase client: fetches profile and links (evidence: `src/pages/PublicProfile.tsx`)
- Supabase client → Supabase services: connects to (evidence: `src/lib/supabase.ts`)
- Supabase services → Profile and link data: stores profile and links (evidence: `README.md`)
- Supabase services → Avatar storage: stores avatars (evidence: `README.md`)
- Dashboard shell → Link editor: renders
- Dashboard shell → Profile settings: renders
- Link editor → Phone preview: renders (evidence: `src/pages/Dashboard/LinkEditor.tsx`)
- Profile settings → Theme selector: offers themes (evidence: `src/components/ProfileSettings.tsx`)
- Public profile → Not found view: shows when absent (evidence: `src/pages/PublicProfile.tsx`)
- Link editor → Toast notifications: reports outcomes (evidence: `src/pages/Dashboard/LinkEditor.tsx`)
- Profile settings → Toast notifications: reports outcomes (evidence: `src/components/ProfileSettings.tsx`)
- Dashboard shell → Loading indicator: shows while loading (evidence: `src/layouts/DashboardLayout.tsx`)
- Link editor → Loading indicator: shows while loading (evidence: `src/pages/Dashboard/LinkEditor.tsx`)
- Public profile → Loading indicator: shows while loading (evidence: `src/pages/PublicProfile.tsx`)
