# swanayamediaproductionwebsitea-hash/swanaya-pulse- architecture

> Architecture diagram of the GitHub repository swanayamediaproductionwebsitea-hash/swanaya-pulse-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-
- Repository: https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-

## Overview

#### Purpose and entry points
This is a TypeScript React application centered on AI-assisted marketing/content workflows, research access, SEO auditing, and user-facing product/landing experiences. The browser entry point is `src/main.tsx`, which mounts the application root in `src/App.tsx` into `index.html`. A separate TypeScript server entry exists at `server.ts`, indicating an optional or companion server-side runtime.

#### Application shell and experience routing
`src/App.tsx` is the likely composition boundary for the product shell, page selection, shared overlays, and feature visibility. The UI has multiple first-class experience surfaces rather than a single narrow workflow:
- Main/home and interactive acquisition experiences: `src/components/Home.tsx`, `src/components/InteractiveLanding.tsx`, `src/components/AdLandingPage.tsx`
- Product showcase and FAQ content: `src/components/SwanayaShowcase.tsx`, `src/components/FaqExperiences.tsx`
- Shared modal/popup layer: `src/components/PopupHub.tsx`, `src/components/LegalModal.tsx`, `src/components/AboutModal.tsx`

#### AI content and planning workflow
The core product workflow appears to move from planning/research into generated content and actionable tasks:
- `src/components/ContentPlanner.tsx` provides planning input or calendar/strategy generation.
- `src/components/ContentWriter.tsx` is the content-generation/editing stage.
- `src/components/AiTodo.tsx` represents task extraction, tracking, or AI-guided follow-up.
- `src/components/AssistantWidget.tsx` is a persistent assistant interaction boundary.

These components should remain separated by durable domain data (briefs, plans, drafts, tasks) rather than sharing tightly coupled display state.

#### Research, SEO, and live information
Research access and SEO analysis are distinct product modules:
- `src/components/ResearchAccessPage.tsx` and `src/components/ResearchNoticeBanner.tsx` control research-oriented access and disclosure states.
- `src/components/SeoAuditDashboard.tsx` presents audit results and likely acts as the boundary for SEO-analysis data.
- `src/components/RealTimeTicker.tsx` represents time-sensitive or continuously refreshed information.

External AI, research, SEO, or data-provider calls are not identifiable from the supplied tree; these UI modules should not be assumed to call providers directly.

#### Identity, consent, and account boundaries
Authentication, onboarding consent, and profile management are explicit concerns:
- `src/components/LoginModule.tsx`
- `src/components/FirstLoginConsentModal.tsx`
- `src/components/ProfileSettings.tsx`

Administrative observability is separately surfaced through `src/components/AdminActivityLog.tsx`. Legal and consent UX is represented by `src/components/LegalCenter.tsx` and `src/components/LegalModal.tsx`, suggesting that policy acceptance should be treated as a durable user-state boundary.

#### Data and infrastructure
The repository contains two persistence/infrastructure signals:
- Firebase client integration and Firestore authorization rules: `src/lib/firebase.ts`, `firestore.rules`, `firebase-applet-config.json`
- Drizzle-managed relational schema and migrations: `src/db/schema.ts`, `src/db/index.ts`, `drizzle/0000_secret_bucky.sql`

This indicates Firebase/Firestore and a Drizzle-backed database may coexist. Database access belongs behind `src/db/index.ts` and server-side boundaries, while browser Firebase access belongs behind `src/lib/firebase.ts`; avoid exposing relational credentials or server database operations to client components.

#### Runtime and visual platform
The frontend uses React/TSX with Vite configuration: `src/main.tsx`, `vite.config.ts`, `src/index.css`. The visual platform includes a dedicated 3D/background layer in `src/components/Background3D.tsx`, which should remain isolated from business workflows to prevent rendering concerns from affecting application state. Static verification/SEO assets are served from `public/`, including `public/robots.txt` and `public/sitemap.xml`.

Main entry points: [`src/App.tsx`](https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/src/App.tsx) (Application shell), [`src/components/ContentWriter.tsx`](https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/src/components/ContentWriter.tsx) (Content writing), [`index.html`](https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/index.html) (HTML document), [`src/main.tsx`](https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/src/main.tsx) (React bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_browser["Browser App"]
  node_html["HTML document<br/>web entry<br/>[index.html]"]
  node_main["React bootstrap<br/>browser entry<br/>[main.tsx]"]
  node_app["Application shell<br/>React composition<br/>[App.tsx]"]
  node_visuals["Visual platform<br/>background UI<br/>[Background3D.tsx]"]
  node_landing["Landing experiences<br/>marketing UI<br/>[Home.tsx]"]
  node_overlays["Shared overlays<br/>modal UI<br/>[PopupHub.tsx]"]
  node_assets["Search verification assets<br/>static public files<br/>[robots.txt]"]
end

subgraph group_workflows["Product Workflows"]
  node_planner["Content planning<br/>workflow UI<br/>[ContentPlanner.tsx]"]
  node_writer["Content writing<br/>workflow UI<br/>[ContentWriter.tsx]"]
  node_todos["AI task follow-up<br/>workflow UI<br/>[AiTodo.tsx]"]
  node_assistant["Assistant widget<br/>persistent AI UI"]
  node_research["Research access<br/>research UI"]
  node_seo["SEO audit dashboard<br/>analysis UI"]
  node_ticker["Live information<br/>refreshing UI<br/>[RealTimeTicker.tsx]"]
end

subgraph group_identity["Identity &amp; Governance"]
  node_auth["Authentication<br/>identity UI<br/>[LoginModule.tsx]"]
  node_account["Account consent &amp; profile<br/>user-state UI"]
  node_admin["Activity log<br/>admin UI"]
end

subgraph group_data["Data Boundaries"]
  node_firebase[("Firebase client<br/>browser data integration<br/>[firebase.ts]")]
  node_server["Server runtime<br/>TypeScript server entry<br/>[server.ts]"]
  node_database[("Relational data access<br/>Drizzle database layer<br/>[index.ts]")]
end

node_html -->|"loads"| node_main
node_main -->|"mounts"| node_app
node_app -->|"renders"| node_visuals
node_app -->|"selects surface"| node_landing
node_app -->|"hosts"| node_overlays
node_app -->|"hosts"| node_planner
node_app -->|"hosts"| node_writer
node_app -->|"hosts"| node_todos
node_app -->|"hosts"| node_assistant
node_app -->|"hosts"| node_research
node_app -->|"hosts"| node_seo
node_app -->|"hosts"| node_ticker
node_app -->|"hosts"| node_auth
node_app -->|"hosts"| node_account
node_app -->|"hosts"| node_admin
node_planner -.->|"plans and briefs"| node_writer
node_writer -.->|"draft-derived tasks"| node_todos
node_auth -.->|"uses client identity"| node_firebase
node_account -.->|"persists user state"| node_firebase
node_server -->|"uses protected access"| node_database
node_html -.->|"public crawl assets"| node_assets

click node_html "https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/index.html"
click node_main "https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/src/main.tsx"
click node_app "https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/src/App.tsx"
click node_visuals "https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/src/components/Background3D.tsx"
click node_landing "https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/src/components/Home.tsx"
click node_overlays "https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/src/components/PopupHub.tsx"
click node_planner "https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/src/components/ContentPlanner.tsx"
click node_writer "https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/src/components/ContentWriter.tsx"
click node_todos "https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/src/components/AiTodo.tsx"
click node_assistant "https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/src/components/AssistantWidget.tsx"
click node_research "https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/src/components/ResearchAccessPage.tsx"
click node_seo "https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/src/components/SeoAuditDashboard.tsx"
click node_ticker "https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/src/components/RealTimeTicker.tsx"
click node_auth "https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/src/components/LoginModule.tsx"
click node_account "https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/src/components/FirstLoginConsentModal.tsx"
click node_admin "https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/src/components/AdminActivityLog.tsx"
click node_firebase "https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/src/lib/firebase.ts"
click node_server "https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/server.ts"
click node_database "https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/src/db/index.ts"
click node_assets "https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/public/robots.txt"

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_html,node_main,node_app,node_visuals,node_landing,node_overlays,node_assets toneBlue
class node_planner,node_writer,node_todos,node_assistant,node_research,node_seo,node_ticker toneAmber
class node_auth,node_account,node_admin toneMint
class node_firebase,node_server,node_database toneRose
```

## Components

### Browser App

- [HTML document](https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/index.html): web entry · `index.html`
- [React bootstrap](https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/src/main.tsx): browser entry · `src/main.tsx`
- [Application shell](https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/src/App.tsx): React composition · Selects experiences and shared UI. · `src/App.tsx`
- [Visual platform](https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/src/components/Background3D.tsx): background UI · Isolated 3D rendering and global styling. · `src/components/Background3D.tsx`
- [Landing experiences](https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/src/components/Home.tsx): marketing UI · Home, interactive, ad, showcase, and FAQ surfaces. · `src/components/Home.tsx`
- [Shared overlays](https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/src/components/PopupHub.tsx): modal UI · Popup, legal, and about dialogs. · `src/components/PopupHub.tsx`
- [Search verification assets](https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/public/robots.txt): static public files · Robots and sitemap are served as static assets. · `public/robots.txt`

### Product Workflows

- [Content planning](https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/src/components/ContentPlanner.tsx): workflow UI · Creates briefs and plans. · `src/components/ContentPlanner.tsx`
- [Content writing](https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/src/components/ContentWriter.tsx): workflow UI · Generates and edits drafts from plans. · `src/components/ContentWriter.tsx`
- [AI task follow-up](https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/src/components/AiTodo.tsx): workflow UI · Tracks tasks extracted from workflow output. · `src/components/AiTodo.tsx`
- [Assistant widget](https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/src/components/AssistantWidget.tsx): persistent AI UI · `src/components/AssistantWidget.tsx`
- [Research access](https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/src/components/ResearchAccessPage.tsx): research UI · Includes access state and disclosure banner. · `src/components/ResearchAccessPage.tsx`
- [SEO audit dashboard](https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/src/components/SeoAuditDashboard.tsx): analysis UI · `src/components/SeoAuditDashboard.tsx`
- [Live information](https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/src/components/RealTimeTicker.tsx): refreshing UI · `src/components/RealTimeTicker.tsx`

### Identity & Governance

- [Authentication](https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/src/components/LoginModule.tsx): identity UI · `src/components/LoginModule.tsx`
- [Account consent & profile](https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/src/components/FirstLoginConsentModal.tsx): user-state UI · Manages first-login consent and profile settings. · `src/components/FirstLoginConsentModal.tsx`
- [Activity log](https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/src/components/AdminActivityLog.tsx): admin UI · `src/components/AdminActivityLog.tsx`

### Data Boundaries

- [Firebase client](https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/src/lib/firebase.ts): browser data integration · Browser-facing Firebase and Firestore boundary. · `src/lib/firebase.ts`
- [Server runtime](https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/server.ts): TypeScript server entry · Companion server-side boundary for protected operations. · `server.ts`
- [Relational data access](https://github.com/swanayamediaproductionwebsitea-hash/swanaya-pulse-/blob/main/src/db/index.ts): Drizzle database layer · Owns schema-backed relational access and migrations. · `src/db/index.ts`

## Connections

- HTML document → React bootstrap: loads
- React bootstrap → Application shell: mounts
- Application shell → Visual platform: renders
- Application shell → Landing experiences: selects surface
- Application shell → Shared overlays: hosts
- Application shell → Content planning: hosts
- Application shell → Content writing: hosts
- Application shell → AI task follow-up: hosts
- Application shell → Assistant widget: hosts
- Application shell → Research access: hosts
- Application shell → SEO audit dashboard: hosts
- Application shell → Live information: hosts
- Application shell → Authentication: hosts
- Application shell → Account consent & profile: hosts
- Application shell → Activity log: hosts
- Content planning → Content writing: plans and briefs
- Content writing → AI task follow-up: draft-derived tasks
- Authentication → Firebase client: uses client identity
- Account consent & profile → Firebase client: persists user state
- Server runtime → Relational data access: uses protected access
- HTML document → Search verification assets: public crawl assets
