How davidvarghese10/rooted-animal-dating-app works
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 App.tsx · style.css style.css · ProfileCard.tsx ProfileCard · StoriesPage.tsx StoriesPage
Components 23
App shell
Browser entry and SPA composition root
- index.html · Browser document and mount target
index.html - index.tsx · Mounts the React app
index.tsx - App.tsx · Top-level app wiring and screen composition
App.tsx
UI layer
Reusable components and in-app page panels
- ProfileCard · Primary profile/discovery card
components/ProfileCard.tsx - GlassCard · Shared branded card container
components/GlassCard.tsx - CustomCursor · Pointer and motion styling layer
components/CustomCursor.tsx - ChatModal · Profile or match chat dialog
components/ChatModal.tsx - AIAssistant · Contextual AI help and suggestions
components/AIAssistant.tsx - StoriesPage · Discovery or content browsing panel
components/pages/StoriesPage.tsx - ProfilePage · User profile and profile details panel
components/pages/ProfilePage.tsx - SettingsPage · App preferences and configuration panel
components/pages/SettingsPage.tsx - NotificationsPage · Alerts and inbox-style notification panel
components/pages/NotificationsPage.tsx - PremiumPage · Upgrade and monetization panel
components/pages/PremiumPage.tsx - HelpPage · Support and guidance panel
components/pages/HelpPage.tsx - PrivacyPage · Privacy and policy panel
components/pages/PrivacyPage.tsx
Domain and services
Local animal matchmaking data model and AI integration
- types.ts · Shared data shapes for profiles and app state
types.ts - mockProfiles · Local profile dataset driving discovery
data/mockProfiles.ts - Gemini service · Request boundary for Google Gemini API
services/geminiService.ts
Build and delivery
Frontend build, static hosting, and CI
- style.css · Central theme, layout, and branding styles
style.css - script.js · Supplemental client-side browser behavior
script.js - vite.config.ts · Vite build and dev-server boundary
vite.config.ts - package.json · Scripts and dependency definitions
package.json - node.js.yml · GitHub Actions build and verification pipeline
.github/workflows/node.js.yml
Connections 28
- 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