# davidvarghese10/rooted-animal-dating-app architecture

> Architecture diagram of the GitHub repository davidvarghese10/rooted-animal-dating-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-04-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/davidvarghese10/rooted-animal-dating-app
- Repository: https://github.com/davidvarghese10/rooted-animal-dating-app

## Overview

1. ROOTED is a client-side React single-page application, built with TypeScript and Vite. The architecture is mostly frontend-only: the UI renders in the browser, with no dedicated server in the repo. The main external integration is the Google Gemini API for AI-assisted features.

2. The top-level application entry points are `index.tsx`, `index.html`, and `App.tsx`. `index.tsx` mounts the app, `App.tsx` acts as the composition root, and `index.html` plus `vite.config.ts` define the browser build/runtime boundary.

3. The app’s core domain is “animal matchmaking” and discovery. That domain is modeled locally through `types.ts` and seeded data in `data/mockProfiles.ts`, which likely drive profile cards, matches, and filtering behavior across the interface.

4. The main product surface appears to be a discover-style browsing experience, with separate page components under `components/pages/` for `StoriesPage`, `ProfilePage`, `SettingsPage`, `NotificationsPage`, `PremiumPage`, `HelpPage`, and `PrivacyPage`. These are likely switched in-app rather than loaded as separate routes, making the page layer a set of feature panels inside one SPA shell.

5. Visual browsing is built from reusable UI components in `components/`, especially `ProfileCard`, `GlassCard`, `CustomCursor`, `ChatModal`, and `AIAssistant`. This indicates a card-driven layout with modal interaction and a themed visual layer, rather than a traditional form-heavy app.

6. The AI subsystem is isolated in `services/geminiService.ts`. That separation is important: the rest of the app can treat AI as a service boundary, while this module handles request construction and API communication with Gemini for features like “AI assistant” or profile enhancement.

7. Chat and assistant flows are distinct UI interactions. `ChatModal` suggests conversational exchange tied to a profile or match, while `AIAssistant` likely provides contextual help or recommendations. These features probably consume profile data and user prompts, then return suggestions or generated content through the Gemini service.

8. The app’s primary data flow is likely: mock profile dataset → filtering/matching logic in the UI → profile cards and discovery views → optional AI augmentation via Gemini → chat/assistant modal outputs. In other words, local data powers the core experience, and AI is an enhancement layer rather than the system of record.

9. Styling and interaction design are a major part of the architecture. `style.css` appears to contain global theming, while the component names suggest a polished “glassmorphism” aesthetic and custom cursor behavior. This means the presentation layer is intentionally centralized and highly branded.

10. The repository also contains `script.js`, which suggests some non-React or supplemental browser logic. It likely supports behavior not convenient to keep inside the TypeScript component tree, but it should be treated as an auxiliary client-side script rather than a separate subsystem.

11. Build and delivery are handled through standard frontend tooling: npm scripts, Vite, TypeScript, and GitHub Actions via `.github/workflows/node.js.yml`. The README also indicates GitHub Pages deployment, so the runtime model is static hosting with client-side navigation and browser-only execution.

12. From an architecture-diagram perspective, the important boundaries are: browser UI components, local mock/data models, the Gemini API integration, and the static hosting/build pipeline. There is no evidence of a database, authentication backend, or persistent server layer in this repository.

Main entry points: [`App.tsx`](https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/App.tsx) (App.tsx), [`style.css`](https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/style.css) (style.css), [`components/ProfileCard.tsx`](https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/components/ProfileCard.tsx) (ProfileCard), [`components/pages/StoriesPage.tsx`](https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/components/pages/StoriesPage.tsx) (StoriesPage)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_group_app_shell["App shell"]
  node_node_index_html["index.html<br/>entry shell<br/>[index.html]"]
  node_node_index_tsx["index.tsx<br/>react entry<br/>[index.tsx]"]
  node_node_app_tsx["App.tsx<br/>composition root<br/>[App.tsx]"]
end

subgraph group_group_ui["UI layer"]
  node_node_profile_card["ProfileCard<br/>ui card<br/>[ProfileCard.tsx]"]
  node_node_glass_card["GlassCard<br/>ui primitive<br/>[GlassCard.tsx]"]
  node_node_custom_cursor["CustomCursor<br/>interaction ui<br/>[CustomCursor.tsx]"]
  node_node_chat_modal["ChatModal<br/>conversation ui<br/>[ChatModal.tsx]"]
  node_node_ai_assistant["AIAssistant<br/>assistant ui<br/>[AIAssistant.tsx]"]
  node_node_stories_page["StoriesPage<br/>page panel<br/>[StoriesPage.tsx]"]
  node_node_profile_page["ProfilePage<br/>page panel<br/>[ProfilePage.tsx]"]
  node_node_settings_page["SettingsPage<br/>page panel<br/>[SettingsPage.tsx]"]
  node_node_notifications_page["NotificationsPage<br/>page panel"]
  node_node_premium_page["PremiumPage<br/>page panel<br/>[PremiumPage.tsx]"]
  node_node_help_page["HelpPage<br/>page panel<br/>[HelpPage.tsx]"]
  node_node_privacy_page["PrivacyPage<br/>page panel<br/>[PrivacyPage.tsx]"]
end

subgraph group_group_domain["Domain and services"]
  node_node_types["types.ts<br/>domain types<br/>[types.ts]"]
  node_node_mock_profiles["mockProfiles<br/>seed data<br/>[mockProfiles.ts]"]
  node_node_gemini_service["Gemini service<br/>ai integration<br/>[geminiService.ts]"]
end

subgraph group_group_delivery["Build and delivery"]
  node_node_style_css["style.css<br/>global styles<br/>[style.css]"]
  node_node_script_js["script.js<br/>auxiliary script<br/>[script.js]"]
  node_node_vite_config["vite.config.ts<br/>build config<br/>[vite.config.ts]"]
  node_node_package_json["package.json<br/>tooling manifest<br/>[package.json]"]
  node_node_workflow["node.js.yml<br/>ci workflow<br/>[node.js.yml]"]
end

node_node_index_html -->|"loads"| node_node_index_tsx
node_node_index_tsx -->|"mounts"| node_node_app_tsx
node_node_app_tsx -->|"composes"| node_node_stories_page
node_node_app_tsx -->|"composes"| node_node_profile_page
node_node_app_tsx -->|"composes"| node_node_settings_page
node_node_app_tsx -->|"composes"| node_node_notifications_page
node_node_app_tsx -->|"composes"| node_node_premium_page
node_node_app_tsx -->|"composes"| node_node_help_page
node_node_app_tsx -->|"composes"| node_node_privacy_page
node_node_app_tsx -->|"uses"| node_node_profile_card
node_node_app_tsx -->|"uses"| node_node_chat_modal
node_node_app_tsx -->|"uses"| node_node_ai_assistant
node_node_profile_card -->|"wraps"| node_node_glass_card
node_node_profile_card -->|"reads"| node_node_types
node_node_stories_page -->|"reads"| node_node_mock_profiles
node_node_stories_page -->|"reads"| node_node_types
node_node_chat_modal -->|"calls"| node_node_gemini_service
node_node_ai_assistant -->|"calls"| node_node_gemini_service
node_node_gemini_service -->|"uses"| node_node_types
node_node_profile_page -->|"reads"| node_node_mock_profiles
node_node_style_css -->|"styles"| node_node_app_tsx
node_node_style_css -->|"styles"| node_node_glass_card
node_node_style_css -->|"styles"| node_node_custom_cursor
node_node_script_js -->|"augments"| node_node_app_tsx
node_node_vite_config -->|"serves"| node_node_index_html
node_node_vite_config -->|"bundles"| node_node_app_tsx
node_node_package_json -->|"drives"| node_node_vite_config
node_node_workflow -->|"runs"| node_node_package_json

click node_node_index_html "https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/index.html"
click node_node_index_tsx "https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/index.tsx"
click node_node_app_tsx "https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/App.tsx"
click node_node_types "https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/types.ts"
click node_node_mock_profiles "https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/data/mockProfiles.ts"
click node_node_gemini_service "https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/services/geminiService.ts"
click node_node_profile_card "https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/components/ProfileCard.tsx"
click node_node_glass_card "https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/components/GlassCard.tsx"
click node_node_custom_cursor "https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/components/CustomCursor.tsx"
click node_node_chat_modal "https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/components/ChatModal.tsx"
click node_node_ai_assistant "https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/components/AIAssistant.tsx"
click node_node_stories_page "https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/components/pages/StoriesPage.tsx"
click node_node_profile_page "https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/components/pages/ProfilePage.tsx"
click node_node_settings_page "https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/components/pages/SettingsPage.tsx"
click node_node_notifications_page "https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/components/pages/NotificationsPage.tsx"
click node_node_premium_page "https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/components/pages/PremiumPage.tsx"
click node_node_help_page "https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/components/pages/HelpPage.tsx"
click node_node_privacy_page "https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/components/pages/PrivacyPage.tsx"
click node_node_style_css "https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/style.css"
click node_node_script_js "https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/script.js"
click node_node_vite_config "https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/vite.config.ts"
click node_node_package_json "https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/package.json"
click node_node_workflow "https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/.github/workflows/node.js.yml"

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_node_index_html,node_node_index_tsx,node_node_app_tsx toneBlue
class node_node_profile_card,node_node_glass_card,node_node_custom_cursor,node_node_chat_modal,node_node_ai_assistant,node_node_stories_page,node_node_profile_page,node_node_settings_page,node_node_notifications_page,node_node_premium_page,node_node_help_page,node_node_privacy_page toneAmber
class node_node_types,node_node_mock_profiles,node_node_gemini_service toneMint
class node_node_style_css,node_node_script_js,node_node_vite_config,node_node_package_json,node_node_workflow toneRose
```

## Components

### App shell

Browser entry and SPA composition root

- [index.html](https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/index.html): entry shell · Browser document and mount target · `index.html`
- [index.tsx](https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/index.tsx): react entry · Mounts the React app · `index.tsx`
- [App.tsx](https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/App.tsx): composition root · Top-level app wiring and screen composition · `App.tsx`

### UI layer

Reusable components and in-app page panels

- [ProfileCard](https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/components/ProfileCard.tsx): ui card · Primary profile/discovery card · `components/ProfileCard.tsx`
- [GlassCard](https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/components/GlassCard.tsx): ui primitive · Shared branded card container · `components/GlassCard.tsx`
- [CustomCursor](https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/components/CustomCursor.tsx): interaction ui · Pointer and motion styling layer · `components/CustomCursor.tsx`
- [ChatModal](https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/components/ChatModal.tsx): conversation ui · Profile or match chat dialog · `components/ChatModal.tsx`
- [AIAssistant](https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/components/AIAssistant.tsx): assistant ui · Contextual AI help and suggestions · `components/AIAssistant.tsx`
- [StoriesPage](https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/components/pages/StoriesPage.tsx): page panel · Discovery or content browsing panel · `components/pages/StoriesPage.tsx`
- [ProfilePage](https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/components/pages/ProfilePage.tsx): page panel · User profile and profile details panel · `components/pages/ProfilePage.tsx`
- [SettingsPage](https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/components/pages/SettingsPage.tsx): page panel · App preferences and configuration panel · `components/pages/SettingsPage.tsx`
- [NotificationsPage](https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/components/pages/NotificationsPage.tsx): page panel · Alerts and inbox-style notification panel · `components/pages/NotificationsPage.tsx`
- [PremiumPage](https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/components/pages/PremiumPage.tsx): page panel · Upgrade and monetization panel · `components/pages/PremiumPage.tsx`
- [HelpPage](https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/components/pages/HelpPage.tsx): page panel · Support and guidance panel · `components/pages/HelpPage.tsx`
- [PrivacyPage](https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/components/pages/PrivacyPage.tsx): page panel · Privacy and policy panel · `components/pages/PrivacyPage.tsx`

### Domain and services

Local animal matchmaking data model and AI integration

- [types.ts](https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/types.ts): domain types · Shared data shapes for profiles and app state · `types.ts`
- [mockProfiles](https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/data/mockProfiles.ts): seed data · Local profile dataset driving discovery · `data/mockProfiles.ts`
- [Gemini service](https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/services/geminiService.ts): ai integration · Request boundary for Google Gemini API · `services/geminiService.ts`

### Build and delivery

Frontend build, static hosting, and CI

- [style.css](https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/style.css): global styles · Central theme, layout, and branding styles · `style.css`
- [script.js](https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/script.js): auxiliary script · Supplemental client-side browser behavior · `script.js`
- [vite.config.ts](https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/vite.config.ts): build config · Vite build and dev-server boundary · `vite.config.ts`
- [package.json](https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/package.json): tooling manifest · Scripts and dependency definitions · `package.json`
- [node.js.yml](https://github.com/davidvarghese10/rooted-animal-dating-app/blob/main/.github/workflows/node.js.yml): ci workflow · GitHub Actions build and verification pipeline · `.github/workflows/node.js.yml`

## Connections

- index.html → index.tsx: loads · HTML document bootstraps the SPA entry
- index.tsx → App.tsx: mounts · React entry mounts the top-level app
- App.tsx → StoriesPage: composes · App shell selects the main browsing surface
- App.tsx → ProfilePage: composes · App shell can render profile view
- App.tsx → SettingsPage: composes · App shell can render settings view
- App.tsx → NotificationsPage: composes · App shell can render notifications view
- App.tsx → PremiumPage: composes · App shell can render premium view
- App.tsx → HelpPage: composes · App shell can render help view
- App.tsx → PrivacyPage: composes · App shell can render privacy view
- App.tsx → ProfileCard: uses · Core discovery UI is built from profile cards
- App.tsx → ChatModal: uses · App opens chat interactions from the shell
- App.tsx → AIAssistant: uses · App exposes AI-assisted helper flows
- ProfileCard → GlassCard: wraps · Profile cards inherit the shared glassmorphism shell
- ProfileCard → types.ts: reads · Card rendering depends on shared profile types
- StoriesPage → mockProfiles: reads · Discovery page consumes seeded profile data
- StoriesPage → types.ts: reads · Filters and match logic rely on domain types
- ChatModal → Gemini service: calls · Conversation or assistant flows can use Gemini
- AIAssistant → Gemini service: calls · AI assistant is the primary Gemini consumer
- Gemini service → types.ts: uses · Service exchanges typed profile or prompt payloads
- ProfilePage → mockProfiles: reads · Profile details are sourced from local data
- style.css → App.tsx: styles · Global styling shapes the SPA shell
- style.css → GlassCard: styles · Central theme defines shared visual treatment
- style.css → CustomCursor: styles · Global styles support branded pointer behavior
- script.js → App.tsx: augments · Supplemental browser logic complements the React tree
- vite.config.ts → index.html: serves · Vite defines the browser build/runtime boundary
- vite.config.ts → App.tsx: bundles · App code is compiled through Vite
- package.json → vite.config.ts: drives · Tooling manifest powers the Vite-based workflow
- node.js.yml → package.json: runs · CI executes repository scripts and checks
