# mr-swapnil25/getrawdata architecture

> Architecture diagram of the GitHub repository mr-swapnil25/getrawdata, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mr-swapnil25/getrawdata
- Repository: https://github.com/mr-swapnil25/getrawdata

## Overview

GetRawData is an illustrated industrial-data website for prospective buyers and factory partners. Visitors explore its methodology, industry examples, trust information and illustrated studies; interested visitors submit enquiries, while individuals can submit privacy-rights requests. The documented capture-to-package stages describe the proposed data workflow, not a live data-production pipeline. The graph includes major documented capabilities, but several page and component implementations were not excerpted, so their internal wiring is not asserted.

Main entry points: [`src/pages`](https://github.com/mr-swapnil25/getrawdata/tree/main/src/pages) (Site pages), [`src/lib/rights.mjs`](https://github.com/mr-swapnil25/getrawdata/blob/main/src/lib/rights.mjs) (Rights handler), [`src/lib/enquiry.mjs`](https://github.com/mr-swapnil25/getrawdata/blob/main/src/lib/enquiry.mjs) (Enquiry handler), [`src/middleware.ts`](https://github.com/mr-swapnil25/getrawdata/blob/main/src/middleware.ts) (Development middleware)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Website experience"]
  node_pages["Site pages"]
  node_site_content["Site records<br/>[site.ts]"]
  node_enquiry_forms["Enquiry forms<br/>[Enquiry.astro]"]
  node_delivery_form["Delivery form<br/>[DeliveryForm.astro]"]
end

subgraph group_content["Studies and methodology"]
  node_study_views["Illustrated studies<br/>[Study.astro]"]
  node_assembly_study["Assembly model<br/>[assembly-model.mjs]"]
  node_shaft_art["Shaft SVG route<br/>[shaft-study.svg.ts]"]
  node_motion["Study motion<br/>[study-motion.ts]"]
  node_pressing_pose["Pressing pose<br/>[pressing-pose.mjs]"]
  node_map["West Bengal map"]
end

subgraph group_enquiries["Enquiry handling"]
  node_enquiry_routes["Enquiry API routes<br/>[enquiry.js]"]
  node_enquiry_status_route["Enquiry status route<br/>[status.js]"]
  node_enquiry_handler["Enquiry handler<br/>[enquiry.mjs]"]
end

subgraph group_rights["Privacy requests"]
  node_rights_form["Rights form<br/>[RightsForm.astro]"]
  node_rights_route["Rights API route<br/>[rights.js]"]
  node_rights_handler["Rights handler<br/>[rights.mjs]"]
  node_privacy_store[("D1 request store")]
  node_middleware["Development middleware<br/>[middleware.ts]"]
end

node_visitor(("Site visitors"))
node_formspree["Formspree"]

node_visitor -->|"browses"| node_pages
node_pages -->|"uses records"| node_site_content
node_visitor -->|"submits enquiry"| node_enquiry_forms
node_enquiry_forms -.->|"posts enquiry"| node_enquiry_routes
node_enquiry_routes -->|"delegates"| node_enquiry_handler
node_enquiry_status_route -->|"checks status"| node_enquiry_handler
node_enquiry_handler -->|"forwards submission"| node_formspree
node_visitor -->|"requests rights"| node_rights_form
node_rights_form -.->|"posts request"| node_rights_route
node_rights_route -->|"delegates"| node_rights_handler
node_rights_handler -->|"records request"| node_privacy_store
node_rights_handler -->|"forwards fallback"| node_formspree
node_middleware -->|"handles dev requests"| node_rights_handler
node_middleware -->|"handles dev requests"| node_enquiry_handler
node_pages -.->|"presents studies"| node_study_views
node_shaft_art -->|"renders model"| node_assembly_study
node_motion -->|"computes pose"| node_pressing_pose
node_pages -.->|"presents coverage"| node_map

click node_pages "https://github.com/mr-swapnil25/getrawdata/tree/main/src/pages"
click node_site_content "https://github.com/mr-swapnil25/getrawdata/blob/main/src/content/site.ts"
click node_enquiry_forms "https://github.com/mr-swapnil25/getrawdata/blob/main/src/components/Enquiry.astro"
click node_delivery_form "https://github.com/mr-swapnil25/getrawdata/blob/main/src/components/DeliveryForm.astro"
click node_rights_form "https://github.com/mr-swapnil25/getrawdata/blob/main/src/components/RightsForm.astro"
click node_study_views "https://github.com/mr-swapnil25/getrawdata/blob/main/src/components/Study.astro"
click node_assembly_study "https://github.com/mr-swapnil25/getrawdata/blob/main/src/lib/assembly-model.mjs"
click node_shaft_art "https://github.com/mr-swapnil25/getrawdata/blob/main/src/pages/art/shaft-study.svg.ts"
click node_motion "https://github.com/mr-swapnil25/getrawdata/blob/main/src/lib/study-motion.ts"
click node_pressing_pose "https://github.com/mr-swapnil25/getrawdata/blob/main/src/lib/pressing-pose.mjs"
click node_map "https://github.com/mr-swapnil25/getrawdata/blob/main/src/components/WestBengalCoverageMap.astro"
click node_enquiry_routes "https://github.com/mr-swapnil25/getrawdata/blob/main/functions/api/enquiry.js"
click node_enquiry_status_route "https://github.com/mr-swapnil25/getrawdata/blob/main/functions/api/enquiry/status.js"
click node_enquiry_handler "https://github.com/mr-swapnil25/getrawdata/blob/main/src/lib/enquiry.mjs"
click node_rights_route "https://github.com/mr-swapnil25/getrawdata/blob/main/functions/api/rights.js"
click node_rights_handler "https://github.com/mr-swapnil25/getrawdata/blob/main/src/lib/rights.mjs"
click node_middleware "https://github.com/mr-swapnil25/getrawdata/blob/main/src/middleware.ts"

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_pages,node_site_content,node_enquiry_forms,node_delivery_form toneBlue
class node_study_views,node_assembly_study,node_shaft_art,node_motion,node_pressing_pose,node_map toneAmber
class node_enquiry_routes,node_enquiry_status_route,node_enquiry_handler toneMint
class node_rights_form,node_rights_route,node_rights_handler,node_privacy_store,node_middleware toneRose
class node_visitor,node_formspree toneIndigo
```

## Components

### Website experience

- [Site pages](https://github.com/mr-swapnil25/getrawdata/tree/main/src/pages): `src/pages`
- [Site records](https://github.com/mr-swapnil25/getrawdata/blob/main/src/content/site.ts): `src/content/site.ts`
- [Enquiry forms](https://github.com/mr-swapnil25/getrawdata/blob/main/src/components/Enquiry.astro): `src/components/Enquiry.astro`
- [Delivery form](https://github.com/mr-swapnil25/getrawdata/blob/main/src/components/DeliveryForm.astro): `src/components/DeliveryForm.astro`

### Studies and methodology

- [Illustrated studies](https://github.com/mr-swapnil25/getrawdata/blob/main/src/components/Study.astro): `src/components/Study.astro`
- [Assembly model](https://github.com/mr-swapnil25/getrawdata/blob/main/src/lib/assembly-model.mjs): `src/lib/assembly-model.mjs`
- [Shaft SVG route](https://github.com/mr-swapnil25/getrawdata/blob/main/src/pages/art/shaft-study.svg.ts): `src/pages/art/shaft-study.svg.ts`
- [Study motion](https://github.com/mr-swapnil25/getrawdata/blob/main/src/lib/study-motion.ts): `src/lib/study-motion.ts`
- [Pressing pose](https://github.com/mr-swapnil25/getrawdata/blob/main/src/lib/pressing-pose.mjs): `src/lib/pressing-pose.mjs`
- [West Bengal map](https://github.com/mr-swapnil25/getrawdata/blob/main/src/components/WestBengalCoverageMap.astro): `src/components/WestBengalCoverageMap.astro`

### Enquiry handling

- [Enquiry API routes](https://github.com/mr-swapnil25/getrawdata/blob/main/functions/api/enquiry.js): `functions/api/enquiry.js`
- [Enquiry status route](https://github.com/mr-swapnil25/getrawdata/blob/main/functions/api/enquiry/status.js): `functions/api/enquiry/status.js`
- [Enquiry handler](https://github.com/mr-swapnil25/getrawdata/blob/main/src/lib/enquiry.mjs): `src/lib/enquiry.mjs`

### Privacy requests

- [Rights form](https://github.com/mr-swapnil25/getrawdata/blob/main/src/components/RightsForm.astro): `src/components/RightsForm.astro`
- [Rights API route](https://github.com/mr-swapnil25/getrawdata/blob/main/functions/api/rights.js): `functions/api/rights.js`
- [Rights handler](https://github.com/mr-swapnil25/getrawdata/blob/main/src/lib/rights.mjs): `src/lib/rights.mjs`
- **D1 request store**
- [Development middleware](https://github.com/mr-swapnil25/getrawdata/blob/main/src/middleware.ts): `src/middleware.ts`

### Other components

- **Site visitors**
- **Formspree**

## Connections

- Site visitors → Site pages: browses (evidence: `README.md`)
- Site pages → Site records: uses records (evidence: `src/content/site.ts`)
- Site visitors → Enquiry forms: submits enquiry (evidence: `README.md`)
- Enquiry forms → Enquiry API routes: posts enquiry (evidence: `README.md`)
- Enquiry API routes → Enquiry handler: delegates (evidence: `functions/api/enquiry.js`)
- Enquiry status route → Enquiry handler: checks status (evidence: `functions/api/enquiry/status.js`)
- Enquiry handler → Formspree: forwards submission (evidence: `src/lib/enquiry.mjs`)
- Site visitors → Rights form: requests rights (evidence: `README.md`)
- Rights form → Rights API route: posts request (evidence: `README.md`)
- Rights API route → Rights handler: delegates (evidence: `functions/api/rights.js`)
- Rights handler → D1 request store: records request (evidence: `src/lib/rights.mjs`)
- Rights handler → Formspree: forwards fallback (evidence: `src/lib/rights.mjs`)
- Development middleware → Rights handler: handles dev requests (evidence: `src/middleware.ts`)
- Development middleware → Enquiry handler: handles dev requests (evidence: `src/middleware.ts`)
- Site pages → Illustrated studies: presents studies (evidence: `README.md`)
- Shaft SVG route → Assembly model: renders model (evidence: `src/pages/art/shaft-study.svg.ts`)
- Study motion → Pressing pose: computes pose (evidence: `src/lib/study-motion.ts`)
- Site pages → West Bengal map: presents coverage (evidence: `README.md`)
