# divitgangrade-lab/turbo.tutor architecture

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

- Interactive diagram: https://gitdiagram.com/divitgangrade-lab/turbo.tutor
- Repository: https://github.com/divitgangrade-lab/turbo.tutor

## Overview

TurboTutor is a static tutoring marketing site. Its main visitor flow is to configure a tutoring plan, add it to the kart, and send a request by email or text for the tutor to confirm; no online payment or site-owned backend handles that request. Separate capabilities include rotating offers, newsletter signup, public reviews and visit counts, and numerous locally bundled visual islands. The tree and excerpts support the review API and island implementations, but not the page markup or most plan/kart internals, so those workflow nodes use null paths and their links rely on README documentation.

Main entry points: [`enhance.js`](https://github.com/divitgangrade-lab/turbo.tutor/blob/main/enhance.js) (Island loading), [`reviews-api/index.js`](https://github.com/divitgangrade-lab/turbo.tutor/blob/main/reviews-api/index.js) (Reviews and visits API), [`src/pit-rating/PeekRating.jsx`](https://github.com/divitgangrade-lab/turbo.tutor/blob/main/src/pit-rating/PeekRating.jsx) (Pit wall reviews), [`src/visit-counter/Counter.jsx`](https://github.com/divitgangrade-lab/turbo.tutor/blob/main/src/visit-counter/Counter.jsx) (Visit counter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_journey["Plan and contact"]
  node_plan_builder["Plan builder"]
  node_price_summary["Price summary"]
  node_kart["Kart"]
  node_request_contact["Request contact"]
end

subgraph group_engagement["Offers and community"]
  node_offers["Offers"]
  node_newsletter["Newsletter signup<br/>[enhance.js]"]
  node_review_ui["Pit wall reviews<br/>[PeekRating.jsx]"]
  node_visit_ui["Visit counter<br/>[Counter.jsx]"]
end

subgraph group_service["Public API"]
  node_reviews_api["Reviews and visits API<br/>[index.js]"]
  node_d1[("Cloudflare D1")]
end

subgraph group_islands["Visual islands"]
  node_island_loader["Island loading<br/>[enhance.js]"]
  node_gallery["Circular gallery"]
  node_interactive_islands["Interactive islands<br/>[Dock.jsx]"]
  node_shader_islands["Shader effects<br/>[GridScan.jsx]"]
  node_landing_islands["Landing effects<br/>[FlyingButton.jsx]"]
  node_legal_topography["Legal backgrounds<br/>[Topography.jsx]"]
  node_bento["Magic Bento<br/>[MagicBento.jsx]"]
  node_paper_crumple["Paper Crumple<br/>[PaperCrumple.jsx]"]
  node_elastic_mesh["Elastic Mesh<br/>[ElasticMesh.jsx]"]
  node_fluid_glass["Fluid Glass<br/>[FluidGlass.jsx]"]
  node_laser_flow["Laser Flow<br/>[LaserFlow.jsx]"]
  node_pattern_waves["Pattern Waves<br/>[PatternWaves.jsx]"]
  node_tech_text["Tech Text<br/>[TechText.jsx]"]
end

node_visitor(("Visitor"))
node_tutor(("Tutor"))
node_formsubmit["FormSubmit"]

node_visitor -->|"chooses plan"| node_plan_builder
node_plan_builder -->|"recalculates price"| node_price_summary
node_price_summary -->|"adds plan"| node_kart
node_kart -->|"builds request"| node_request_contact
node_request_contact -->|"sends by email or text"| node_tutor
node_visitor -->|"views offers"| node_offers
node_visitor -->|"signs up"| node_newsletter
node_newsletter -->|"sends signup"| node_formsubmit
node_formsubmit -->|"delivers signup"| node_tutor
node_visitor -->|"posts review"| node_review_ui
node_review_ui -->|"submits and reads"| node_reviews_api
node_visitor -->|"views count"| node_visit_ui
node_visit_ui -->|"reads visits"| node_reviews_api
node_reviews_api -->|"reads and writes"| node_d1
node_island_loader -->|"loads near viewport"| node_gallery
node_island_loader -->|"loads locally"| node_interactive_islands
node_island_loader -->|"loads near viewport"| node_shader_islands
node_island_loader -->|"loads on approach"| node_landing_islands
node_island_loader -->|"loads on approach"| node_legal_topography
node_island_loader -->|"loads locally"| node_bento
node_island_loader -->|"loads near footer"| node_paper_crumple
node_island_loader -->|"loads on 404"| node_elastic_mesh
node_island_loader -->|"loads near contact"| node_fluid_glass
node_island_loader -->|"loads near promise"| node_laser_flow
node_island_loader -->|"loads near signup"| node_pattern_waves
node_island_loader -->|"loads near footer"| node_tech_text

click node_newsletter "https://github.com/divitgangrade-lab/turbo.tutor/blob/main/enhance.js"
click node_review_ui "https://github.com/divitgangrade-lab/turbo.tutor/blob/main/src/pit-rating/PeekRating.jsx"
click node_visit_ui "https://github.com/divitgangrade-lab/turbo.tutor/blob/main/src/visit-counter/Counter.jsx"
click node_reviews_api "https://github.com/divitgangrade-lab/turbo.tutor/blob/main/reviews-api/index.js"
click node_island_loader "https://github.com/divitgangrade-lab/turbo.tutor/blob/main/enhance.js"
click node_gallery "https://github.com/divitgangrade-lab/turbo.tutor/blob/main/src/circular-gallery/CircularGallery.jsx"
click node_interactive_islands "https://github.com/divitgangrade-lab/turbo.tutor/blob/main/src/dock/Dock.jsx"
click node_shader_islands "https://github.com/divitgangrade-lab/turbo.tutor/blob/main/src/grid-scan/GridScan.jsx"
click node_landing_islands "https://github.com/divitgangrade-lab/turbo.tutor/blob/main/src/flying-button/FlyingButton.jsx"
click node_legal_topography "https://github.com/divitgangrade-lab/turbo.tutor/blob/main/src/legal-bg/Topography.jsx"
click node_bento "https://github.com/divitgangrade-lab/turbo.tutor/blob/main/src/magic-bento/MagicBento.jsx"
click node_paper_crumple "https://github.com/divitgangrade-lab/turbo.tutor/blob/main/src/paper-crumple/PaperCrumple.jsx"
click node_elastic_mesh "https://github.com/divitgangrade-lab/turbo.tutor/blob/main/src/elastic-mesh/ElasticMesh.jsx"
click node_fluid_glass "https://github.com/divitgangrade-lab/turbo.tutor/blob/main/src/fluid-glass/FluidGlass.jsx"
click node_laser_flow "https://github.com/divitgangrade-lab/turbo.tutor/blob/main/src/laser-flow/LaserFlow.jsx"
click node_pattern_waves "https://github.com/divitgangrade-lab/turbo.tutor/blob/main/src/pattern-waves/PatternWaves.jsx"
click node_tech_text "https://github.com/divitgangrade-lab/turbo.tutor/blob/main/src/tech-text/TechText.jsx"

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_plan_builder,node_price_summary,node_kart,node_request_contact toneBlue
class node_offers,node_newsletter,node_review_ui,node_visit_ui toneAmber
class node_reviews_api,node_d1 toneMint
class node_island_loader,node_gallery,node_interactive_islands,node_shader_islands,node_landing_islands,node_legal_topography,node_bento,node_paper_crumple,node_elastic_mesh,node_fluid_glass,node_laser_flow,node_pattern_waves,node_tech_text toneRose
class node_visitor,node_tutor,node_formsubmit toneIndigo
```

## Components

### Plan and contact

- **Plan builder**
- **Price summary**
- **Kart**
- **Request contact**

### Offers and community

- **Offers**
- [Newsletter signup](https://github.com/divitgangrade-lab/turbo.tutor/blob/main/enhance.js): `enhance.js`
- [Pit wall reviews](https://github.com/divitgangrade-lab/turbo.tutor/blob/main/src/pit-rating/PeekRating.jsx): `src/pit-rating/PeekRating.jsx`
- [Visit counter](https://github.com/divitgangrade-lab/turbo.tutor/blob/main/src/visit-counter/Counter.jsx): `src/visit-counter/Counter.jsx`

### Public API

- [Reviews and visits API](https://github.com/divitgangrade-lab/turbo.tutor/blob/main/reviews-api/index.js): `reviews-api/index.js`
- **Cloudflare D1**

### Visual islands

- [Island loading](https://github.com/divitgangrade-lab/turbo.tutor/blob/main/enhance.js): `enhance.js`
- [Circular gallery](https://github.com/divitgangrade-lab/turbo.tutor/blob/main/src/circular-gallery/CircularGallery.jsx): `src/circular-gallery/CircularGallery.jsx`
- [Interactive islands](https://github.com/divitgangrade-lab/turbo.tutor/blob/main/src/dock/Dock.jsx): `src/dock/Dock.jsx`
- [Shader effects](https://github.com/divitgangrade-lab/turbo.tutor/blob/main/src/grid-scan/GridScan.jsx): `src/grid-scan/GridScan.jsx`
- [Landing effects](https://github.com/divitgangrade-lab/turbo.tutor/blob/main/src/flying-button/FlyingButton.jsx): `src/flying-button/FlyingButton.jsx`
- [Legal backgrounds](https://github.com/divitgangrade-lab/turbo.tutor/blob/main/src/legal-bg/Topography.jsx): `src/legal-bg/Topography.jsx`
- [Magic Bento](https://github.com/divitgangrade-lab/turbo.tutor/blob/main/src/magic-bento/MagicBento.jsx): `src/magic-bento/MagicBento.jsx`
- [Paper Crumple](https://github.com/divitgangrade-lab/turbo.tutor/blob/main/src/paper-crumple/PaperCrumple.jsx): `src/paper-crumple/PaperCrumple.jsx`
- [Elastic Mesh](https://github.com/divitgangrade-lab/turbo.tutor/blob/main/src/elastic-mesh/ElasticMesh.jsx): `src/elastic-mesh/ElasticMesh.jsx`
- [Fluid Glass](https://github.com/divitgangrade-lab/turbo.tutor/blob/main/src/fluid-glass/FluidGlass.jsx): `src/fluid-glass/FluidGlass.jsx`
- [Laser Flow](https://github.com/divitgangrade-lab/turbo.tutor/blob/main/src/laser-flow/LaserFlow.jsx): `src/laser-flow/LaserFlow.jsx`
- [Pattern Waves](https://github.com/divitgangrade-lab/turbo.tutor/blob/main/src/pattern-waves/PatternWaves.jsx): `src/pattern-waves/PatternWaves.jsx`
- [Tech Text](https://github.com/divitgangrade-lab/turbo.tutor/blob/main/src/tech-text/TechText.jsx): `src/tech-text/TechText.jsx`

### Other components

- **Visitor**
- **Tutor**
- **FormSubmit**

## Connections

- Visitor → Plan builder: chooses plan
- Plan builder → Price summary: recalculates price
- Price summary → Kart: adds plan
- Kart → Request contact: builds request
- Request contact → Tutor: sends by email or text
- Visitor → Offers: views offers
- Visitor → Newsletter signup: signs up
- Newsletter signup → FormSubmit: sends signup
- FormSubmit → Tutor: delivers signup
- Visitor → Pit wall reviews: posts review
- Pit wall reviews → Reviews and visits API: submits and reads
- Visitor → Visit counter: views count
- Visit counter → Reviews and visits API: reads visits
- Reviews and visits API → Cloudflare D1: reads and writes (evidence: `reviews-api/index.js`)
- Island loading → Circular gallery: loads near viewport
- Island loading → Interactive islands: loads locally
- Island loading → Shader effects: loads near viewport
- Island loading → Landing effects: loads on approach
- Island loading → Legal backgrounds: loads on approach
- Island loading → Magic Bento: loads locally
- Island loading → Paper Crumple: loads near footer
- Island loading → Elastic Mesh: loads on 404
- Island loading → Fluid Glass: loads near contact
- Island loading → Laser Flow: loads near promise
- Island loading → Pattern Waves: loads near signup
- Island loading → Tech Text: loads near footer
