# shuryansh07/sparka-solutions architecture

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

- Interactive diagram: https://gitdiagram.com/shuryansh07/sparka-solutions
- Repository: https://github.com/shuryansh07/sparka-solutions

## Overview

Sparka is a marketing website and customer-discovery intake product. Visitors explore the company and solutions, then choose a guided questionnaire, free-text description, or consultation request; discovery can be saved and resumed, and submissions return a recap and reference while syncing to Zoho CRM for a representative to follow up. Staff can inspect submissions and retry failed CRM syncs. The graph combines sampled code relationships with README-documented capabilities; several page and service internals were not sampled, so those links are documented or left unverified.

Main entry points: [`frontend/src/features/discovery/pages`](https://github.com/shuryansh07/sparka-solutions/tree/main/frontend/src/features/discovery/pages) (Discovery pages), [`backend/src/modules/submissions/submission.service.js`](https://github.com/shuryansh07/sparka-solutions/blob/main/backend/src/modules/submissions/submission.service.js) (Submission service), [`backend/src/routes.js`](https://github.com/shuryansh07/sparka-solutions/blob/main/backend/src/routes.js) (API routes), [`frontend/src/app/router.jsx`](https://github.com/shuryansh07/sparka-solutions/blob/main/frontend/src/app/router.jsx) (Web router)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Website"]
  node_router["Web router<br/>[router.jsx]"]
  node_home["Home page<br/>[HomePage.jsx]"]
  node_hero["Home hero<br/>[Hero.jsx]"]
  node_solutions["Solutions page<br/>[SolutionsPage.jsx]"]
  node_solution_grid["Solution grid<br/>[SolutionGrid.jsx]"]
end

subgraph group_discovery["Discovery experience"]
  node_discovery_pages["Discovery pages"]
  node_discovery_shell["Discovery shell<br/>[DiscoveryShell.jsx]"]
  node_path_cards["Path cards<br/>[PathCards.jsx]"]
  node_guide_page["Guided discovery<br/>[GuideMePage.jsx]"]
  node_describe_page["Describe need<br/>[DescribePage.jsx]"]
  node_talk_form["Consultation form<br/>[TalkForm.jsx]"]
  node_discovery_store["Discovery state<br/>[discovery.store.js]"]
  node_flow["Question flow<br/>[flow.js]"]
  node_discovery_api["Discovery API client<br/>[discovery.api.js]"]
end

subgraph group_api["Intake API"]
  node_api_routes["API routes<br/>[routes.js]"]
  node_discovery_routes["Discovery routes"]
  node_discovery_controller["Discovery controller"]
  node_discovery_service["Discovery service"]
  node_summarizer["Text organizer"]
  node_consultation["Consultation service"]
  node_submission["Submission service"]
  node_admin["Admin operations<br/>[admin.routes.js]"]
  node_health["Health endpoint<br/>[health.routes.js]"]
end

subgraph group_operations["Storage and operations"]
  node_repository_select["Repository selector<br/>[index.js]"]
  node_catalyst_store[("Catalyst datastore")]
  node_memory_store[("Local memory store")]
  node_zoho["Zoho CRM<br/>[crm.service.js]"]
end

node_visitor(("Visitor"))
node_staff(("Staff"))

node_visitor -->|"opens"| node_router
node_router -->|"routes to"| node_home
node_router -->|"routes to"| node_solutions
node_router -->|"routes to"| node_discovery_pages
node_home -->|"renders"| node_hero
node_home -->|"renders"| node_path_cards
node_solutions -->|"renders"| node_solution_grid
node_discovery_pages -.->|"uses"| node_discovery_shell
node_discovery_pages -.->|"offers paths"| node_path_cards
node_discovery_pages -.->|"includes"| node_guide_page
node_discovery_pages -.->|"includes"| node_describe_page
node_discovery_pages -.->|"includes"| node_talk_form
node_guide_page -->|"updates"| node_discovery_store
node_guide_page -->|"uses"| node_flow
node_discovery_store -->|"requests"| node_discovery_api
node_discovery_store -->|"filters answers"| node_flow
node_discovery_api -->|"calls endpoints"| node_discovery_routes
node_discovery_routes -->|"dispatches"| node_discovery_controller
node_discovery_controller -->|"calls"| node_discovery_service
node_discovery_service -->|"organizes text"| node_summarizer
node_discovery_service -->|"creates submission"| node_submission
node_api_routes -->|"mounts"| node_discovery_routes
node_api_routes -.->|"mounts route"| node_consultation
node_api_routes -->|"mounts"| node_admin
node_api_routes -->|"mounts"| node_health
node_consultation -->|"creates request"| node_submission
node_admin -->|"retries CRM"| node_submission
node_submission -->|"syncs lead"| node_zoho
node_submission -.->|"persists records"| node_repository_select
node_repository_select -->|"selects driver"| node_catalyst_store
node_repository_select -->|"selects driver"| node_memory_store
node_staff -->|"reviews failures"| node_admin

click node_router "https://github.com/shuryansh07/sparka-solutions/blob/main/frontend/src/app/router.jsx"
click node_home "https://github.com/shuryansh07/sparka-solutions/blob/main/frontend/src/features/home/HomePage.jsx"
click node_hero "https://github.com/shuryansh07/sparka-solutions/blob/main/frontend/src/features/home/components/Hero.jsx"
click node_solutions "https://github.com/shuryansh07/sparka-solutions/blob/main/frontend/src/features/solutions/SolutionsPage.jsx"
click node_solution_grid "https://github.com/shuryansh07/sparka-solutions/blob/main/frontend/src/features/solutions/components/SolutionGrid.jsx"
click node_discovery_pages "https://github.com/shuryansh07/sparka-solutions/tree/main/frontend/src/features/discovery/pages"
click node_discovery_shell "https://github.com/shuryansh07/sparka-solutions/blob/main/frontend/src/features/discovery/components/DiscoveryShell.jsx"
click node_path_cards "https://github.com/shuryansh07/sparka-solutions/blob/main/frontend/src/features/discovery/components/PathCards.jsx"
click node_guide_page "https://github.com/shuryansh07/sparka-solutions/blob/main/frontend/src/features/discovery/pages/GuideMePage.jsx"
click node_describe_page "https://github.com/shuryansh07/sparka-solutions/blob/main/frontend/src/features/discovery/pages/DescribePage.jsx"
click node_talk_form "https://github.com/shuryansh07/sparka-solutions/blob/main/frontend/src/features/discovery/components/TalkForm.jsx"
click node_discovery_store "https://github.com/shuryansh07/sparka-solutions/blob/main/frontend/src/features/discovery/store/discovery.store.js"
click node_flow "https://github.com/shuryansh07/sparka-solutions/blob/main/frontend/src/features/discovery/lib/flow.js"
click node_discovery_api "https://github.com/shuryansh07/sparka-solutions/blob/main/frontend/src/features/discovery/api/discovery.api.js"
click node_api_routes "https://github.com/shuryansh07/sparka-solutions/blob/main/backend/src/routes.js"
click node_discovery_routes "https://github.com/shuryansh07/sparka-solutions/blob/main/backend/src/modules/discovery/discovery.routes.js"
click node_discovery_controller "https://github.com/shuryansh07/sparka-solutions/blob/main/backend/src/modules/discovery/discovery.controller.js"
click node_discovery_service "https://github.com/shuryansh07/sparka-solutions/blob/main/backend/src/modules/discovery/discovery.service.js"
click node_summarizer "https://github.com/shuryansh07/sparka-solutions/blob/main/backend/src/modules/discovery/summarizer.service.js"
click node_consultation "https://github.com/shuryansh07/sparka-solutions/blob/main/backend/src/modules/consultation/consultation.service.js"
click node_submission "https://github.com/shuryansh07/sparka-solutions/blob/main/backend/src/modules/submissions/submission.service.js"
click node_admin "https://github.com/shuryansh07/sparka-solutions/blob/main/backend/src/modules/admin/admin.routes.js"
click node_health "https://github.com/shuryansh07/sparka-solutions/blob/main/backend/src/modules/health/health.routes.js"
click node_repository_select "https://github.com/shuryansh07/sparka-solutions/blob/main/backend/src/repositories/index.js"
click node_catalyst_store "https://github.com/shuryansh07/sparka-solutions/blob/main/backend/src/repositories/catalyst.repository.js"
click node_memory_store "https://github.com/shuryansh07/sparka-solutions/blob/main/backend/src/repositories/memory.repository.js"
click node_zoho "https://github.com/shuryansh07/sparka-solutions/blob/main/backend/src/integrations/zoho-crm/crm.service.js"

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_router,node_home,node_hero,node_solutions,node_solution_grid toneBlue
class node_discovery_pages,node_discovery_shell,node_path_cards,node_guide_page,node_describe_page,node_talk_form,node_discovery_store,node_flow,node_discovery_api toneAmber
class node_api_routes,node_discovery_routes,node_discovery_controller,node_discovery_service,node_summarizer,node_consultation,node_submission,node_admin,node_health toneMint
class node_repository_select,node_catalyst_store,node_memory_store,node_zoho toneRose
class node_visitor,node_staff toneIndigo
```

## Components

### Website

- [Web router](https://github.com/shuryansh07/sparka-solutions/blob/main/frontend/src/app/router.jsx): `frontend/src/app/router.jsx`
- [Home page](https://github.com/shuryansh07/sparka-solutions/blob/main/frontend/src/features/home/HomePage.jsx): `frontend/src/features/home/HomePage.jsx`
- [Home hero](https://github.com/shuryansh07/sparka-solutions/blob/main/frontend/src/features/home/components/Hero.jsx): `frontend/src/features/home/components/Hero.jsx`
- [Solutions page](https://github.com/shuryansh07/sparka-solutions/blob/main/frontend/src/features/solutions/SolutionsPage.jsx): `frontend/src/features/solutions/SolutionsPage.jsx`
- [Solution grid](https://github.com/shuryansh07/sparka-solutions/blob/main/frontend/src/features/solutions/components/SolutionGrid.jsx): `frontend/src/features/solutions/components/SolutionGrid.jsx`

### Discovery experience

- [Discovery pages](https://github.com/shuryansh07/sparka-solutions/tree/main/frontend/src/features/discovery/pages): `frontend/src/features/discovery/pages`
- [Discovery shell](https://github.com/shuryansh07/sparka-solutions/blob/main/frontend/src/features/discovery/components/DiscoveryShell.jsx): `frontend/src/features/discovery/components/DiscoveryShell.jsx`
- [Path cards](https://github.com/shuryansh07/sparka-solutions/blob/main/frontend/src/features/discovery/components/PathCards.jsx): `frontend/src/features/discovery/components/PathCards.jsx`
- [Guided discovery](https://github.com/shuryansh07/sparka-solutions/blob/main/frontend/src/features/discovery/pages/GuideMePage.jsx): `frontend/src/features/discovery/pages/GuideMePage.jsx`
- [Describe need](https://github.com/shuryansh07/sparka-solutions/blob/main/frontend/src/features/discovery/pages/DescribePage.jsx): `frontend/src/features/discovery/pages/DescribePage.jsx`
- [Consultation form](https://github.com/shuryansh07/sparka-solutions/blob/main/frontend/src/features/discovery/components/TalkForm.jsx): `frontend/src/features/discovery/components/TalkForm.jsx`
- [Discovery state](https://github.com/shuryansh07/sparka-solutions/blob/main/frontend/src/features/discovery/store/discovery.store.js): `frontend/src/features/discovery/store/discovery.store.js`
- [Question flow](https://github.com/shuryansh07/sparka-solutions/blob/main/frontend/src/features/discovery/lib/flow.js): `frontend/src/features/discovery/lib/flow.js`
- [Discovery API client](https://github.com/shuryansh07/sparka-solutions/blob/main/frontend/src/features/discovery/api/discovery.api.js): `frontend/src/features/discovery/api/discovery.api.js`

### Intake API

- [API routes](https://github.com/shuryansh07/sparka-solutions/blob/main/backend/src/routes.js): `backend/src/routes.js`
- [Discovery routes](https://github.com/shuryansh07/sparka-solutions/blob/main/backend/src/modules/discovery/discovery.routes.js): `backend/src/modules/discovery/discovery.routes.js`
- [Discovery controller](https://github.com/shuryansh07/sparka-solutions/blob/main/backend/src/modules/discovery/discovery.controller.js): `backend/src/modules/discovery/discovery.controller.js`
- [Discovery service](https://github.com/shuryansh07/sparka-solutions/blob/main/backend/src/modules/discovery/discovery.service.js): `backend/src/modules/discovery/discovery.service.js`
- [Text organizer](https://github.com/shuryansh07/sparka-solutions/blob/main/backend/src/modules/discovery/summarizer.service.js): `backend/src/modules/discovery/summarizer.service.js`
- [Consultation service](https://github.com/shuryansh07/sparka-solutions/blob/main/backend/src/modules/consultation/consultation.service.js): `backend/src/modules/consultation/consultation.service.js`
- [Submission service](https://github.com/shuryansh07/sparka-solutions/blob/main/backend/src/modules/submissions/submission.service.js): `backend/src/modules/submissions/submission.service.js`
- [Admin operations](https://github.com/shuryansh07/sparka-solutions/blob/main/backend/src/modules/admin/admin.routes.js): `backend/src/modules/admin/admin.routes.js`
- [Health endpoint](https://github.com/shuryansh07/sparka-solutions/blob/main/backend/src/modules/health/health.routes.js): `backend/src/modules/health/health.routes.js`

### Storage and operations

- [Repository selector](https://github.com/shuryansh07/sparka-solutions/blob/main/backend/src/repositories/index.js): `backend/src/repositories/index.js`
- [Catalyst datastore](https://github.com/shuryansh07/sparka-solutions/blob/main/backend/src/repositories/catalyst.repository.js): `backend/src/repositories/catalyst.repository.js`
- [Local memory store](https://github.com/shuryansh07/sparka-solutions/blob/main/backend/src/repositories/memory.repository.js): `backend/src/repositories/memory.repository.js`
- [Zoho CRM](https://github.com/shuryansh07/sparka-solutions/blob/main/backend/src/integrations/zoho-crm/crm.service.js): `backend/src/integrations/zoho-crm/crm.service.js`

### Other components

- **Visitor**
- **Staff**

## Connections

- Visitor → Web router: opens (evidence: `frontend/src/app/router.jsx`)
- Web router → Home page: routes to (evidence: `frontend/src/app/router.jsx`)
- Web router → Solutions page: routes to (evidence: `frontend/src/app/router.jsx`)
- Web router → Discovery pages: routes to (evidence: `frontend/src/app/router.jsx`)
- Home page → Home hero: renders (evidence: `frontend/src/features/home/HomePage.jsx`)
- Home page → Path cards: renders (evidence: `frontend/src/features/home/HomePage.jsx`)
- Solutions page → Solution grid: renders (evidence: `frontend/src/features/solutions/SolutionsPage.jsx`)
- Discovery pages → Discovery shell: uses (evidence: `frontend/src/features/discovery/pages/GuideMePage.jsx`)
- Discovery pages → Path cards: offers paths
- Discovery pages → Guided discovery: includes
- Discovery pages → Describe need: includes
- Discovery pages → Consultation form: includes
- Guided discovery → Discovery state: updates (evidence: `frontend/src/features/discovery/pages/GuideMePage.jsx`)
- Guided discovery → Question flow: uses (evidence: `frontend/src/features/discovery/pages/GuideMePage.jsx`)
- Discovery state → Discovery API client: requests (evidence: `frontend/src/features/discovery/store/discovery.store.js`)
- Discovery state → Question flow: filters answers (evidence: `frontend/src/features/discovery/store/discovery.store.js`)
- Discovery API client → Discovery routes: calls endpoints (evidence: `README.md`)
- Discovery routes → Discovery controller: dispatches (evidence: `backend/src/modules/discovery/discovery.routes.js`)
- Discovery controller → Discovery service: calls (evidence: `backend/src/modules/discovery/discovery.controller.js`)
- Discovery service → Text organizer: organizes text (evidence: `backend/src/modules/discovery/discovery.service.js`)
- Discovery service → Submission service: creates submission (evidence: `backend/src/modules/discovery/discovery.service.js`)
- API routes → Discovery routes: mounts (evidence: `backend/src/routes.js`)
- API routes → Consultation service: mounts route (evidence: `backend/src/routes.js`)
- API routes → Admin operations: mounts (evidence: `backend/src/routes.js`)
- API routes → Health endpoint: mounts (evidence: `backend/src/routes.js`)
- Consultation service → Submission service: creates request (evidence: `backend/src/modules/consultation/consultation.service.js`)
- Admin operations → Submission service: retries CRM (evidence: `backend/src/modules/admin/admin.routes.js`)
- Submission service → Zoho CRM: syncs lead (evidence: `backend/src/modules/submissions/submission.service.js`)
- Submission service → Repository selector: persists records (evidence: `README.md`)
- Repository selector → Catalyst datastore: selects driver (evidence: `backend/src/repositories/index.js`)
- Repository selector → Local memory store: selects driver (evidence: `backend/src/repositories/index.js`)
- Staff → Admin operations: reviews failures (evidence: `README.md`)
