From da10c10f3bae3e0344b696911f4ece044ce3743f Mon Sep 17 00:00:00 2001 From: Md Abdulla Date: Tue, 23 Jun 2026 20:31:29 +0530 Subject: [PATCH 01/10] setup research section and listing page --- .astro/content.d.ts | 10 ++- src/content.config.ts | 20 +++++- src/content/research/future-trends-report.md | 23 ++++++ .../hidden-cost-of-manual-processes.md | 23 ++++++ .../research/why-we-built-this-product.md | 27 +++++++ src/pages/research/index.astro | 70 +++++++++++++++++++ 6 files changed, 171 insertions(+), 2 deletions(-) create mode 100644 src/content/research/future-trends-report.md create mode 100644 src/content/research/hidden-cost-of-manual-processes.md create mode 100644 src/content/research/why-we-built-this-product.md create mode 100644 src/pages/research/index.astro diff --git a/.astro/content.d.ts b/.astro/content.d.ts index 6f3dfe3..8379d03 100644 --- a/.astro/content.d.ts +++ b/.astro/content.d.ts @@ -147,6 +147,14 @@ declare module 'astro:content' { rendered?: RenderedContent; filePath?: string; }>; +"research": Record; + rendered?: RenderedContent; + filePath?: string; +}>; }; @@ -177,6 +185,6 @@ declare module 'astro:content' { LiveContentConfig['collections'][C]['loader'] >; - export type ContentConfig = typeof import("../src/content.config.js"); + export type ContentConfig = typeof import("./../src/content.config.js"); export type LiveContentConfig = never; } diff --git a/src/content.config.ts b/src/content.config.ts index 4ee4ed7..1cbd2ef 100644 --- a/src/content.config.ts +++ b/src/content.config.ts @@ -32,7 +32,25 @@ const blog = defineCollection({ }) }); +const research = defineCollection({ + loader: glob({ + pattern: "**/*.{md,mdx}", + base: "./src/content/research" + }), + schema: z.object({ + title: z.string(), + description: z.string(), + author: z.string(), + date: z.date(), + tags: z.array(z.string()).default([]), + category: z.string(), + featured: z.boolean().default(false), + image: z.string().optional() + }) +}); + export const collections = { articles, - blog + blog, + research }; diff --git a/src/content/research/future-trends-report.md b/src/content/research/future-trends-report.md new file mode 100644 index 0000000..ac0c3c4 --- /dev/null +++ b/src/content/research/future-trends-report.md @@ -0,0 +1,23 @@ +--- +title: "Future Trends Report" +description: "Market growth and AI adoption trends." +author: "Recursive Zero" +date: 2025-08-17 +tags: + - ai + - future +category: "AI & Technology" +featured: false +--- + +## Introduction + +Placeholder content. + +## Market Growth + +Placeholder content. + +## AI Adoption + +Placeholder content. \ No newline at end of file diff --git a/src/content/research/hidden-cost-of-manual-processes.md b/src/content/research/hidden-cost-of-manual-processes.md new file mode 100644 index 0000000..9d7ebae --- /dev/null +++ b/src/content/research/hidden-cost-of-manual-processes.md @@ -0,0 +1,23 @@ +--- +title: "Hidden Cost of Manual Processes" +description: "Understanding inefficiencies caused by manual workflows." +author: "Recursive Zero" +date: 2025-08-16 +tags: + - research + - operations +category: "Case Studies" +featured: false +--- + +## Introduction + +Placeholder content. + +## Time Loss + +Placeholder content. + +## Industry Statistics + +Placeholder content. \ No newline at end of file diff --git a/src/content/research/why-we-built-this-product.md b/src/content/research/why-we-built-this-product.md new file mode 100644 index 0000000..7cef956 --- /dev/null +++ b/src/content/research/why-we-built-this-product.md @@ -0,0 +1,27 @@ +--- +title: "Why We Built This Product" +description: "Research behind our product vision." +author: "Recursive Zero" +date: 2025-08-15 +tags: + - research + - product +category: "Product Vision" +featured: true +--- + +## Introduction + +Placeholder content. + +## Industry Problem + +Placeholder content. + +## Research Findings + +Placeholder content. + +## Our Vision + +Placeholder content. \ No newline at end of file diff --git a/src/pages/research/index.astro b/src/pages/research/index.astro new file mode 100644 index 0000000..e0a844a --- /dev/null +++ b/src/pages/research/index.astro @@ -0,0 +1,70 @@ +--- +import BlogCard from "@/components/BlogCard.astro"; +import BaseLayout from "@/layouts/BaseLayout"; + +import { getCollection } from "astro:content"; + +const posts = await getCollection("research"); + +/* ALL UNIQUE TAGS */ +const allTags = [...new Set(posts.flatMap((post) => post.data.tags || []))]; +--- + + +
+ +
+
+ +

Research Library

+ + +

Research & White Papers

+ + +

+ Explore industry research, market analysis, case studies, AI trends, sustainability insights and product vision papers. +

+ + +
+ { + allTags.slice(0, 3).map((tag) => ( + + #{tag} + + )) + } + + + + More Tags → + +
+
+ + +
+ { + posts.map((post) => ( + + )) + } +
+
+
+
From 4bc46a50ad5dde522d9522437e2ed1d9e06bb159 Mon Sep 17 00:00:00 2001 From: Md Abdulla Date: Wed, 24 Jun 2026 21:43:15 +0530 Subject: [PATCH 02/10] add reasearch detail page and related articles --- src/content/research/future-trends-report.md | 2 +- .../research/why-we-built-this-product.md | 2 +- src/data/navLinks.json | 5 +- src/pages/research/[slug].astro | 136 +++++++++++++++++ src/pages/research/index.astro | 138 ++++++++++++------ 5 files changed, 237 insertions(+), 46 deletions(-) create mode 100644 src/pages/research/[slug].astro diff --git a/src/content/research/future-trends-report.md b/src/content/research/future-trends-report.md index ac0c3c4..ea40d6e 100644 --- a/src/content/research/future-trends-report.md +++ b/src/content/research/future-trends-report.md @@ -7,7 +7,7 @@ tags: - ai - future category: "AI & Technology" -featured: false +featured: true --- ## Introduction diff --git a/src/content/research/why-we-built-this-product.md b/src/content/research/why-we-built-this-product.md index 7cef956..8997745 100644 --- a/src/content/research/why-we-built-this-product.md +++ b/src/content/research/why-we-built-this-product.md @@ -7,7 +7,7 @@ tags: - research - product category: "Product Vision" -featured: true +featured: false --- ## Introduction diff --git a/src/data/navLinks.json b/src/data/navLinks.json index b80b865..55467f7 100644 --- a/src/data/navLinks.json +++ b/src/data/navLinks.json @@ -23,5 +23,6 @@ "name": "Work", "href": "/work", "isActive": true - } -] \ No newline at end of file + }, + { "name": "Research", "href": "/research", "isActive": true } +] diff --git a/src/pages/research/[slug].astro b/src/pages/research/[slug].astro new file mode 100644 index 0000000..aa0e9fc --- /dev/null +++ b/src/pages/research/[slug].astro @@ -0,0 +1,136 @@ +--- +import CalendarIcon from "@/assets/icons/calendar.svg"; +import ProfileIcon from "@/assets/icons/profile.svg"; +import ClockIcon from "@/assets/icons/clock.svg"; +import MarkdownContent from "@/components/MarkdownContent.astro"; +import BaseLayout from "@/layouts/BaseLayout"; +import BlogCard from "@/components/BlogCard.astro"; +import { type CollectionEntry, getCollection, render } from "astro:content"; + +export const prerender = true; + +export async function getStaticPaths() { + const posts = await getCollection("research"); + + return posts.map((blog) => ({ + params: { slug: blog.id }, + props: blog + })); +} + +type Props = CollectionEntry<"research">; + +const blog = Astro.props; + +// BLOG NOT FOUND REDIRECT +if (!Astro.props?.id) { + return Astro.redirect("/research"); +} + +const { Content } = await render(blog); + +const { title, description, date, author, image, tags } = blog.data; +const allResearch = await getCollection("research"); + +const relatedPosts = allResearch + .filter((post) => post.id !== blog.id) + .slice(0, 3); +const readingTime = Math.ceil((blog.body?.split(/\s+/).length || 0) / 200); + +if (!Content) { + throw new Error(`Content could not be rendered for blog: ${blog.id}`); +} +--- + + +
+

{title}

+ {description &&

{description}

} +
+ +
+ { + author && ( + + + + + + {author} + + ) + } + + { + date && ( + + + + + + + + ) + } + {readingTime && ⏱️ {readingTime} min read} +
+ + + { + tags?.length > 0 && ( +
+ {tags.map((tag: string) => ( + + #{tag} + + ))} +
+ ) + } +
+ + +
+
+ +
+ +
+
+
+
+ { + relatedPosts.length > 0 && ( +
+

+ Related Research Articles +

+ +
+ { + relatedPosts.map((post) => ( + + )) + } +
+
+ ) +} + +
+
diff --git a/src/pages/research/index.astro b/src/pages/research/index.astro index e0a844a..05f40ee 100644 --- a/src/pages/research/index.astro +++ b/src/pages/research/index.astro @@ -6,65 +6,119 @@ import { getCollection } from "astro:content"; const posts = await getCollection("research"); -/* ALL UNIQUE TAGS */ -const allTags = [...new Set(posts.flatMap((post) => post.data.tags || []))]; +const categories = [ + ...new Set(posts.map((post) => post.data.category).filter(Boolean)) +]; + +const selectedCategory = Astro.url.searchParams.get("category"); + +const filteredPosts = selectedCategory + ? posts.filter((post) => post.data.category === selectedCategory) + : posts; + +const featuredPost = !selectedCategory + ? posts.find((post) => post.data.featured) + : null; + +const gridPosts = selectedCategory + ? filteredPosts + : filteredPosts.filter((post) => !post.data.featured); ---
-
+
- -

Research Library

+

+ Research Library +

- -

Research & White Papers

+

+ Research & White Papers +

-

- Explore industry research, market analysis, case studies, AI trends, sustainability insights and product vision papers. + Explore industry research, market analysis, case studies, AI trends, + sustainability insights and product vision papers.

+
+ + + - -
+ + { + featuredPost && ( +
+

Featured Research

+ + +
+ ) + } + + +
+
{ - allTags.slice(0, 3).map((tag) => ( - - #{tag} - + gridPosts.map((post) => ( + )) } - - - - More Tags → -
-
- -
{ - posts.map((post) => ( - - )) + gridPosts.length === 0 && ( +

+ No research articles found in this category. +

+ ) } -
+
-
+ \ No newline at end of file From bd5d93ba4caa55729078fe3b087d22a253205f3d Mon Sep 17 00:00:00 2001 From: Md Abdulla Date: Wed, 24 Jun 2026 22:09:38 +0530 Subject: [PATCH 03/10] solve warnings --- src/pages/research/[slug].astro | 1 - src/pages/research/index.astro | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/pages/research/[slug].astro b/src/pages/research/[slug].astro index aa0e9fc..486009e 100644 --- a/src/pages/research/[slug].astro +++ b/src/pages/research/[slug].astro @@ -1,7 +1,6 @@ --- import CalendarIcon from "@/assets/icons/calendar.svg"; import ProfileIcon from "@/assets/icons/profile.svg"; -import ClockIcon from "@/assets/icons/clock.svg"; import MarkdownContent from "@/components/MarkdownContent.astro"; import BaseLayout from "@/layouts/BaseLayout"; import BlogCard from "@/components/BlogCard.astro"; diff --git a/src/pages/research/index.astro b/src/pages/research/index.astro index 05f40ee..3ce08e0 100644 --- a/src/pages/research/index.astro +++ b/src/pages/research/index.astro @@ -6,9 +6,9 @@ import { getCollection } from "astro:content"; const posts = await getCollection("research"); -const categories = [ - ...new Set(posts.map((post) => post.data.category).filter(Boolean)) -]; +// const categories = [ +// ...new Set(posts.map((post) => post.data.category).filter(Boolean)) +// ]; const selectedCategory = Astro.url.searchParams.get("category"); From 61047eeb54214443aa5a02ae81dc9c6e82929ce4 Mon Sep 17 00:00:00 2001 From: Md Abdulla Date: Thu, 25 Jun 2026 21:48:59 +0530 Subject: [PATCH 04/10] add reusable research components and enchance research content --- src/components/research/CalloutBox.astro | 16 ++ src/components/research/DataCard.astro | 27 +++ .../research/GraphPlaceholder.astro | 25 +++ src/components/research/ResearchQuote.astro | 22 +++ src/components/research/StatisticBlock.astro | 18 ++ src/components/research/Timeline.astro | 42 +++++ src/content/research/future-trends-report.md | 23 --- src/content/research/future-trends-report.mdx | 169 ++++++++++++++++++ 8 files changed, 319 insertions(+), 23 deletions(-) create mode 100644 src/components/research/CalloutBox.astro create mode 100644 src/components/research/DataCard.astro create mode 100644 src/components/research/GraphPlaceholder.astro create mode 100644 src/components/research/ResearchQuote.astro create mode 100644 src/components/research/StatisticBlock.astro create mode 100644 src/components/research/Timeline.astro delete mode 100644 src/content/research/future-trends-report.md create mode 100644 src/content/research/future-trends-report.mdx diff --git a/src/components/research/CalloutBox.astro b/src/components/research/CalloutBox.astro new file mode 100644 index 0000000..18007c5 --- /dev/null +++ b/src/components/research/CalloutBox.astro @@ -0,0 +1,16 @@ +--- +interface Props { + title: string; +} + +const { title } = Astro.props; +--- +
+

+ {title} +

+ +
+ +
+
\ No newline at end of file diff --git a/src/components/research/DataCard.astro b/src/components/research/DataCard.astro new file mode 100644 index 0000000..4c2476d --- /dev/null +++ b/src/components/research/DataCard.astro @@ -0,0 +1,27 @@ +--- +interface Props { + title: string; + value: string; + description?: string; +} + +const { title, value, description } = Astro.props; +--- + +
+

+ {title} +

+ +

+ {value} +

+ + { + description && ( +

+ {description} +

+ ) + } +
\ No newline at end of file diff --git a/src/components/research/GraphPlaceholder.astro b/src/components/research/GraphPlaceholder.astro new file mode 100644 index 0000000..3896f31 --- /dev/null +++ b/src/components/research/GraphPlaceholder.astro @@ -0,0 +1,25 @@ +--- +interface Props { + title: string; +} + +const { title } = Astro.props; +--- + +
+

+ {title} +

+ + + +
+
+
+
+
+
+
+
\ No newline at end of file diff --git a/src/components/research/ResearchQuote.astro b/src/components/research/ResearchQuote.astro new file mode 100644 index 0000000..5501202 --- /dev/null +++ b/src/components/research/ResearchQuote.astro @@ -0,0 +1,22 @@ +--- +interface Props { + quote: string; + author?: string; +} + +const { quote, author } = Astro.props; +--- + +
+

+ “{quote}” +

+ + { + author && ( +
+ — {author} +
+ ) + } +
\ No newline at end of file diff --git a/src/components/research/StatisticBlock.astro b/src/components/research/StatisticBlock.astro new file mode 100644 index 0000000..6b9bb89 --- /dev/null +++ b/src/components/research/StatisticBlock.astro @@ -0,0 +1,18 @@ +--- +interface Props { + value: string; + label: string; +} + +const { value, label } = Astro.props; +--- + +
+

+ {value} +

+ +

+ {label} +

+
\ No newline at end of file diff --git a/src/components/research/Timeline.astro b/src/components/research/Timeline.astro new file mode 100644 index 0000000..95f4cf2 --- /dev/null +++ b/src/components/research/Timeline.astro @@ -0,0 +1,42 @@ +--- +interface Item { + year: string; + title: string; +} + +interface Props { + items: Item[]; +} + +const { items } = Astro.props; +--- + +
+ { + items.map((item, index) => ( +
+ +
+
+ + { + index !== items.length - 1 && ( +
+ ) + } +
+ + +
+

+ {item.year} +

+ +

+ {item.title} +

+
+
+ )) + } +
\ No newline at end of file diff --git a/src/content/research/future-trends-report.md b/src/content/research/future-trends-report.md deleted file mode 100644 index ea40d6e..0000000 --- a/src/content/research/future-trends-report.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: "Future Trends Report" -description: "Market growth and AI adoption trends." -author: "Recursive Zero" -date: 2025-08-17 -tags: - - ai - - future -category: "AI & Technology" -featured: true ---- - -## Introduction - -Placeholder content. - -## Market Growth - -Placeholder content. - -## AI Adoption - -Placeholder content. \ No newline at end of file diff --git a/src/content/research/future-trends-report.mdx b/src/content/research/future-trends-report.mdx new file mode 100644 index 0000000..a6524f1 --- /dev/null +++ b/src/content/research/future-trends-report.mdx @@ -0,0 +1,169 @@ +--- +title: "Future Trends Report" +description: "Market growth and AI adoption trends." +author: "Recursive Zero" +date: 2025-08-17 +# tags: +# - ai +# - future +category: "AI & Technology" +featured: true +--- +import StatisticBlock from "@/components/research/StatisticBlock.astro"; +import ResearchQuote from "@/components/research/ResearchQuote.astro"; +import DataCard from "@/components/research/DataCard.astro"; +import CalloutBox from "@/components/research/CalloutBox.astro"; +import Timeline from "@/components/research/Timeline.astro"; +import GraphPlaceholder from "@/components/research/GraphPlaceholder.astro"; + +## Introduction + +Artificial Intelligence is rapidly transforming industries across the globe. Businesses are increasingly investing in automation, data-driven decision making, and intelligent software to improve productivity and reduce operational costs. From manufacturing and healthcare to retail and logistics, AI is becoming a key competitive advantage. + +The manufacturing sector, particularly textiles and supply chain management, is experiencing significant digital transformation. Organizations are adopting machine learning, computer vision, and predictive analytics to streamline operations and improve product quality. + +This report explores the current state of AI adoption, market growth, emerging trends, and the opportunities that businesses can leverage over the next decade. + +--- + +## Current Industry Landscape + +Manufacturing industries are under constant pressure to reduce costs while improving efficiency and sustainability. Traditional manual processes often create delays, increase operational expenses, and introduce unnecessary errors into production workflows. + +Digital transformation initiatives have accelerated over the past few years. Organizations are replacing paper-based systems with cloud platforms, integrating IoT devices for real-time monitoring, and using AI models to automate repetitive tasks. + +Despite these improvements, many businesses still rely on outdated systems that limit visibility into production, inventory, and customer demand. This creates opportunities for intelligent software solutions capable of improving operational efficiency. + +--- + +## Market Growth + + +The global AI market continues to grow at an impressive rate. Organizations across multiple industries are increasing investments in automation technologies, predictive analytics, and intelligent decision-support systems. + +Several factors are driving this growth: + +* Increasing availability of cloud computing +* Lower infrastructure costs +* Growth in enterprise data +* Improvements in machine learning algorithms +* Rising demand for operational efficiency + +Small and medium-sized businesses are also adopting AI solutions because modern cloud platforms make advanced technologies more accessible than ever before. + +--- + +## AI Adoption in Manufacturing + + + +Manufacturing companies are using AI across multiple stages of production. + +Common applications include: + +* Predictive maintenance +* Quality inspection using computer vision +* Inventory forecasting +* Production scheduling +* Demand prediction +* Supply chain optimization + +Computer vision systems can identify product defects faster than manual inspection, while predictive maintenance algorithms reduce unexpected equipment failures. + +As AI models continue improving, businesses are expected to automate larger portions of their production workflows. + +--- + +## Challenges + + +Even though AI adoption is increasing rapidly, organizations must invest in employee training, data quality, and change management to achieve sustainable long-term success. + + +Despite rapid adoption, organizations still face several challenges when implementing AI. + +Some of the most common challenges include: + +* Poor quality data +* Legacy software systems +* High implementation costs +* Lack of skilled professionals +* Data privacy concerns +* Integration complexity + +Successful AI adoption requires not only technology but also organizational readiness, employee training, and continuous improvement. + +--- + +## Opportunities + +AI presents numerous opportunities for organizations willing to modernize their operations. + +Potential benefits include: + +* Faster decision making +* Reduced operational costs +* Improved customer experiences +* Higher productivity +* Better inventory management +* Enhanced product quality + +Businesses that successfully combine AI with domain expertise are likely to gain a significant competitive advantage in their respective industries. + +--- + +## Future Outlook + +Over the next decade, AI will become an essential part of business operations rather than an optional technology investment. + +Organizations will increasingly adopt intelligent assistants, autonomous systems, and predictive analytics platforms capable of supporting complex business decisions. + +Advancements in generative AI, multimodal models, and computer vision will further accelerate digital transformation across industries. + +Companies investing in AI today will be better positioned to respond to future market changes and customer expectations. + +--- + +## Conclusion + +Artificial Intelligence is no longer an emerging technology—it has become a strategic necessity for businesses seeking long-term growth. + +Organizations that invest in digital transformation, modern data infrastructure, and intelligent automation will be better prepared to compete in an increasingly data-driven economy. + +While challenges remain, the opportunities offered by AI significantly outweigh the risks, making it one of the most impactful technologies shaping the future of industry. + +--- + +## Sources & References + +* World Economic Forum +* McKinsey Global Institute +* Deloitte Insights +* Gartner Research +* PwC AI Reports +* OECD Digital Economy Reports From db932326c6662886b32a9130e8524ee434b51a1f Mon Sep 17 00:00:00 2001 From: Md Abdulla Date: Thu, 25 Jun 2026 21:56:45 +0530 Subject: [PATCH 05/10] add reusable research components and enchance research content --- domain.code-workspace | 18 ++--- src/assets/styles/footer.css | 2 +- src/components/research/CalloutBox.astro | 7 +- src/components/research/DataCard.astro | 14 +--- .../research/GraphPlaceholder.astro | 20 ++--- src/components/research/ResearchQuote.astro | 12 +-- src/components/research/StatisticBlock.astro | 4 +- src/components/research/Timeline.astro | 20 ++--- src/content/research/future-trends-report.mdx | 76 ++++++++++--------- .../hidden-cost-of-manual-processes.md | 2 +- .../research/why-we-built-this-product.md | 2 +- src/pages/research/[slug].astro | 49 +++++------- src/pages/research/index.astro | 28 +++---- 13 files changed, 104 insertions(+), 150 deletions(-) diff --git a/domain.code-workspace b/domain.code-workspace index 299da89..660dfb7 100644 --- a/domain.code-workspace +++ b/domain.code-workspace @@ -72,9 +72,9 @@ "javascript": "javascriptreact" }, "eslint.options": { - "extensions": [ ".js", ".jsx", ".md", ".mdx", ".ts", ".tsx", ".astro" ] + "extensions": [".js", ".jsx", ".md", ".mdx", ".ts", ".tsx", ".astro"] }, - "eslint.validate": [ "mdx", "markdown", "javascript", "javascriptreact", "typescript", "typescriptreact", "astro" ], + "eslint.validate": ["mdx", "markdown", "javascript", "javascriptreact", "typescript", "typescriptreact", "astro"], "explorer.compactFolders": false, "explorer.confirmDelete": false, "explorer.confirmDragAndDrop": false, @@ -111,7 +111,7 @@ }, "git.autofetch": true, "git.branchPrefix": "feature/", - "git.branchProtection": [ "develop", "main" ], + "git.branchProtection": ["develop", "main"], "git.branchRandomName.enable": true, "git.confirmSync": false, "git.enableCommitSigning": false, @@ -122,7 +122,7 @@ "js/ts.implicitProjectConfig.checkJs": true, "peacock.affectSideBarBorder": true, "peacock.color": "#010010", - "prettier.documentSelectors": [ "**/*.astro" ], + "prettier.documentSelectors": ["**/*.astro"], "prettier.printWidth": 120, "prettier.quoteProps": "consistent", "prettier.singleQuote": false, @@ -148,13 +148,7 @@ "*.log": "default" }, "zenMode.centerLayout": false, - "cSpell.words": [ - "Boisu", - "brandvault", - "Poorna", - "Socie", - "withastro" - ], + "cSpell.words": ["Boisu", "brandvault", "Poorna", "Socie", "withastro"], "workbench.editor.limit.excludeDirty": true, "workbench.colorCustomizations": { "activityBar.activeBackground": "#040043", @@ -177,6 +171,6 @@ "titleBar.inactiveForeground": "#e7e7e799", "tab.activeBorder": "#040043" }, - "folder-color.pathColors": [ ] + "folder-color.pathColors": [] } } diff --git a/src/assets/styles/footer.css b/src/assets/styles/footer.css index 21fa09e..f103a52 100644 --- a/src/assets/styles/footer.css +++ b/src/assets/styles/footer.css @@ -9,4 +9,4 @@ .footer__nav--item { @apply underline underline-offset-2 hover:text-blue-600 dark:text-sky-500 dark:hover:text-blue-600; -} \ No newline at end of file +} diff --git a/src/components/research/CalloutBox.astro b/src/components/research/CalloutBox.astro index 18007c5..996099b 100644 --- a/src/components/research/CalloutBox.astro +++ b/src/components/research/CalloutBox.astro @@ -5,12 +5,13 @@ interface Props { const { title } = Astro.props; --- -
+ +

{title}

-
+
-
\ No newline at end of file +
diff --git a/src/components/research/DataCard.astro b/src/components/research/DataCard.astro index 4c2476d..2f804dd 100644 --- a/src/components/research/DataCard.astro +++ b/src/components/research/DataCard.astro @@ -8,8 +8,8 @@ interface Props { const { title, value, description } = Astro.props; --- -
-

+
+

{title}

@@ -17,11 +17,5 @@ const { title, value, description } = Astro.props; {value}

- { - description && ( -

- {description} -

- ) - } -
\ No newline at end of file + {description &&

{description}

} +

diff --git a/src/components/research/GraphPlaceholder.astro b/src/components/research/GraphPlaceholder.astro index 3896f31..d42dd21 100644 --- a/src/components/research/GraphPlaceholder.astro +++ b/src/components/research/GraphPlaceholder.astro @@ -6,20 +6,16 @@ interface Props { const { title } = Astro.props; --- -
+

{title}

- - -
-
-
-
-
-
+
+
+
+
+
+
+
-
\ No newline at end of file diff --git a/src/components/research/ResearchQuote.astro b/src/components/research/ResearchQuote.astro index 5501202..dddbbae 100644 --- a/src/components/research/ResearchQuote.astro +++ b/src/components/research/ResearchQuote.astro @@ -8,15 +8,9 @@ const { quote, author } = Astro.props; ---
-

+

“{quote}”

- { - author && ( -
- — {author} -
- ) - } -
\ No newline at end of file + {author &&
— {author}
} + diff --git a/src/components/research/StatisticBlock.astro b/src/components/research/StatisticBlock.astro index 6b9bb89..93b0d58 100644 --- a/src/components/research/StatisticBlock.astro +++ b/src/components/research/StatisticBlock.astro @@ -8,11 +8,11 @@ const { value, label } = Astro.props; ---
-

+

{value}

{label}

-
\ No newline at end of file +
diff --git a/src/components/research/Timeline.astro b/src/components/research/Timeline.astro index 95f4cf2..6913b65 100644 --- a/src/components/research/Timeline.astro +++ b/src/components/research/Timeline.astro @@ -15,28 +15,18 @@ const { items } = Astro.props; { items.map((item, index) => (
-
-
+
- { - index !== items.length - 1 && ( -
- ) - } + {index !== items.length - 1 &&
}
-
-

- {item.year} -

+

{item.year}

-

- {item.title} -

+

{item.title}

)) } -
\ No newline at end of file +
diff --git a/src/content/research/future-trends-report.mdx b/src/content/research/future-trends-report.mdx index a6524f1..6dd4b3a 100644 --- a/src/content/research/future-trends-report.mdx +++ b/src/content/research/future-trends-report.mdx @@ -9,6 +9,7 @@ date: 2025-08-17 category: "AI & Technology" featured: true --- + import StatisticBlock from "@/components/research/StatisticBlock.astro"; import ResearchQuote from "@/components/research/ResearchQuote.astro"; import DataCard from "@/components/research/DataCard.astro"; @@ -37,24 +38,22 @@ Despite these improvements, many businesses still rely on outdated systems that --- ## Market Growth - + + The global AI market continues to grow at an impressive rate. Organizations across multiple industries are increasing investments in automation technologies, predictive analytics, and intelligent decision-support systems. Several factors are driving this growth: -* Increasing availability of cloud computing -* Lower infrastructure costs -* Growth in enterprise data -* Improvements in machine learning algorithms -* Rising demand for operational efficiency +- Increasing availability of cloud computing +- Lower infrastructure costs +- Growth in enterprise data +- Improvements in machine learning algorithms +- Rising demand for operational efficiency Small and medium-sized businesses are also adopting AI solutions because modern cloud platforms make advanced technologies more accessible than ever before. - ---- + +## ## AI Adoption in Manufacturing @@ -68,12 +67,12 @@ Manufacturing companies are using AI across multiple stages of production. Common applications include: -* Predictive maintenance -* Quality inspection using computer vision -* Inventory forecasting -* Production scheduling -* Demand prediction -* Supply chain optimization +- Predictive maintenance +- Quality inspection using computer vision +- Inventory forecasting +- Production scheduling +- Demand prediction +- Supply chain optimization Computer vision systems can identify product defects faster than manual inspection, while predictive maintenance algorithms reduce unexpected equipment failures. @@ -83,20 +82,21 @@ As AI models continue improving, businesses are expected to automate larger port ## Challenges - -Even though AI adoption is increasing rapidly, organizations must invest in employee training, data quality, and change management to achieve sustainable long-term success. + + Even though AI adoption is increasing rapidly, organizations must invest in employee training, data quality, and + change management to achieve sustainable long-term success. Despite rapid adoption, organizations still face several challenges when implementing AI. Some of the most common challenges include: -* Poor quality data -* Legacy software systems -* High implementation costs -* Lack of skilled professionals -* Data privacy concerns -* Integration complexity +- Poor quality data +- Legacy software systems +- High implementation costs +- Lack of skilled professionals +- Data privacy concerns +- Integration complexity Successful AI adoption requires not only technology but also organizational readiness, employee training, and continuous improvement. @@ -108,14 +108,15 @@ AI presents numerous opportunities for organizations willing to modernize their Potential benefits include: -* Faster decision making -* Reduced operational costs -* Improved customer experiences -* Higher productivity -* Better inventory management -* Enhanced product quality +- Faster decision making +- Reduced operational costs +- Improved customer experiences +- Higher productivity +- Better inventory management +- Enhanced product quality Businesses that successfully combine AI with domain expertise are likely to gain a significant competitive advantage in their respective industries. + post.id !== blog.id) - .slice(0, 3); +const relatedPosts = allResearch.filter((post) => post.id !== blog.id).slice(0, 3); const readingTime = Math.ceil((blog.body?.split(/\s+/).length || 0) / 200); if (!Content) { @@ -106,30 +104,25 @@ if (!Content) {
{ - relatedPosts.length > 0 && ( -
-

- Related Research Articles -

- -
- { - relatedPosts.map((post) => ( - - )) - } -
-
- ) -} - + relatedPosts.length > 0 && ( +
+

Related Research Articles

+ +
+ {relatedPosts.map((post) => ( + + ))} +
+
+ ) + } diff --git a/src/pages/research/index.astro b/src/pages/research/index.astro index 3ce08e0..51a922b 100644 --- a/src/pages/research/index.astro +++ b/src/pages/research/index.astro @@ -12,17 +12,11 @@ const posts = await getCollection("research"); const selectedCategory = Astro.url.searchParams.get("category"); -const filteredPosts = selectedCategory - ? posts.filter((post) => post.data.category === selectedCategory) - : posts; +const filteredPosts = selectedCategory ? posts.filter((post) => post.data.category === selectedCategory) : posts; -const featuredPost = !selectedCategory - ? posts.find((post) => post.data.featured) - : null; +const featuredPost = !selectedCategory ? posts.find((post) => post.data.featured) : null; -const gridPosts = selectedCategory - ? filteredPosts - : filteredPosts.filter((post) => !post.data.featured); +const gridPosts = selectedCategory ? filteredPosts : filteredPosts.filter((post) => !post.data.featured); --- @@ -30,20 +24,18 @@ const gridPosts = selectedCategory
-

- Research Library -

+

Research Library

Research & White Papers

- Explore industry research, market analysis, case studies, AI trends, - sustainability insights and product vision papers. + Explore industry research, market analysis, case studies, AI trends, sustainability insights and product + vision papers.

- +
{ author && ( @@ -96,7 +98,7 @@ if (!Content) {
From a954cd67275cb155497b370ba79cfa556eeec808 Mon Sep 17 00:00:00 2001 From: Md Abdulla Date: Sat, 27 Jun 2026 21:14:43 +0530 Subject: [PATCH 07/10] add pie chart and improve UI of research page --- src/components/ResearchCard.astro | 70 +++++++ src/components/research/D3Graph.astro | 124 ++--------- src/components/research/D3Graph.tsx | 193 ++++++++++++++++++ src/content/research/future-trends-report.mdx | 12 ++ src/pages/research/[slug].astro | 18 +- src/pages/research/index.astro | 84 +++----- 6 files changed, 330 insertions(+), 171 deletions(-) create mode 100644 src/components/ResearchCard.astro create mode 100644 src/components/research/D3Graph.tsx diff --git a/src/components/ResearchCard.astro b/src/components/ResearchCard.astro new file mode 100644 index 0000000..9cf0124 --- /dev/null +++ b/src/components/ResearchCard.astro @@ -0,0 +1,70 @@ +--- +interface Props { + url: string; + title: string; + description: string; + author: string; + date: string; + image?: string; + tags?: string[]; + featured?: boolean; +} + +const { + url, + title, + description, + author, + date, + tags = [], + featured = false +} = Astro.props; +--- + + +
+ +
+ { + featured && ( + + Featured + + ) + } + + { + tags.map((tag) => ( + + #{tag} + + )) + } +
+ + +

+ {title} +

+ + +

+ {description} +

+ + +
+
+ {author} + {date} +
+ + + Read article → + +
+
+
\ No newline at end of file diff --git a/src/components/research/D3Graph.astro b/src/components/research/D3Graph.astro index 075be75..53faabe 100644 --- a/src/components/research/D3Graph.astro +++ b/src/components/research/D3Graph.astro @@ -1,123 +1,27 @@ --- -// import * as d3 from "d3"; - -interface DataPoint { - label: string; - value: number; -} +import D3GraphReact, { type DataPoint } from "./D3Graph"; interface Props { title: string; data: DataPoint[]; + chartType?: "bar" | "pie"; } -const { title, data } = Astro.props; +const { + title, + data, + chartType = "bar" +} = Astro.props; --- -
+ +

{title}

- - +
\ No newline at end of file diff --git a/src/components/research/D3Graph.tsx b/src/components/research/D3Graph.tsx new file mode 100644 index 0000000..b19ec3d --- /dev/null +++ b/src/components/research/D3Graph.tsx @@ -0,0 +1,193 @@ +import { useEffect, useRef } from "react"; +import * as d3 from "d3"; + +export interface DataPoint { + label: string; + value: number; +} + +interface Props { + data: DataPoint[]; + chartType?: "bar" | "pie"; +} + +export default function D3Graph({ + data, + chartType = "bar", +}: Props) { + const svgRef = useRef(null); + + useEffect(() => { + if (!svgRef.current) return; + + const svg = d3.select(svgRef.current); + svg.selectAll("*").remove(); + + const width = 700; + const height = 400; + const margin = 50; + + svg.attr("viewBox", `0 0 ${width} ${height}`); + + if (chartType === "bar") { + const x = d3 + .scaleBand() + .domain(data.map((d) => d.label)) + .range([margin, width - margin]) + .padding(0.3); + + const y = d3 + .scaleLinear() + .domain([0, d3.max(data, (d) => d.value) ?? 0]) + .nice() + .range([height - margin, margin]); + + svg + .selectAll("rect") + .data(data) + .enter() + .append("rect") + .attr("x", (d) => x(d.label)!) + .attr("width", x.bandwidth()) + .attr("y", height - margin) + .attr("height", 0) + .attr("fill", "#2563eb") + .attr("rx", 6) + .transition() + .duration(800) + .delay((_, i) => i * 150) + .attr("y", (d) => y(d.value)) + .attr("height", (d) => height - margin - y(d.value)); + + svg + .append("g") + .attr("transform", `translate(0,${height - margin})`) + .call(d3.axisBottom(x)); + + svg + .append("g") + .attr("transform", `translate(${margin},0)`) + .call(d3.axisLeft(y)); + + svg + .selectAll(".label") + .data(data) + .enter() + .append("text") + .attr("class", "label") + .attr("x", (d) => x(d.label)! + x.bandwidth() / 2) + .attr("y", (d) => y(d.value) - 8) + .attr("text-anchor", "middle") + .attr("font-size", 12) + .attr("font-weight", 600) + .text((d) => d.value); + } + if (chartType === "pie") { + const radius = Math.min(width, height) / 2 - 40; + + const total = d3.sum(data, (d) => d.value); + + const color = d3 + .scaleOrdinal() + .domain(data.map((d) => d.label)) + .range([ + "#2563eb", + "#f97316", + "#16a34a", + "#dc2626", + "#9333ea", + "#0891b2", + ]); + + const pie = d3 + .pie() + .value((d) => d.value) + .sort(null); + + const arc = d3 + .arc>() + .innerRadius(0) + .outerRadius(radius); + + const g = svg + .append("g") + .attr("transform", `translate(${width / 2},${height / 2})`); + + // Pie slices + g.selectAll("path") + .data(pie(data)) + .enter() + .append("path") + .attr("d", arc as any) + .attr("fill", (_, i) => color(data[i].label)) + .attr("stroke", "#fff") + .attr("stroke-width", 2) + .style("opacity", 0) + .transition() + .duration(800) + .style("opacity", 1); + + // Labels (Name + Value + Percentage) + g.selectAll(".slice-label") + .data(pie(data)) + .enter() + .append("text") + .attr("class", "slice-label") + .attr("transform", (d) => `translate(${arc.centroid(d)})`) + .attr("text-anchor", "middle") + .attr("fill", "#fff") + .attr("font-size", "13px") + .attr("font-weight", "600") + .each(function (d) { + const percent = ((d.data.value / total) * 100).toFixed(1); + + const text = d3.select(this); + + text + .append("tspan") + .attr("x", 0) + .attr("dy", "-0.6em") + .text(d.data.label); + + text + .append("tspan") + .attr("x", 0) + .attr("dy", "1.3em") + .text(d.data.value); + + text + .append("tspan") + .attr("x", 0) + .attr("dy", "1.3em") + .text(`(${percent}%)`); + }); + + // Legend + const legend = svg + .append("g") + .attr("transform", `translate(40, ${height - 20})`); + + const legendItems = legend + .selectAll(".legend") + .data(data) + .enter() + .append("g") + .attr("transform", (_, i) => `translate(${i * 160},0)`); + + legendItems + .append("rect") + .attr("width", 16) + .attr("height", 16) + .attr("fill", (_, i) => color(data[i].label)); + + legendItems + .append("text") + .attr("x", 24) + .attr("y", 13) + .attr("font-size", "13px") + .text((d) => `${d.label} (${d.value})`); +} + }, [data, chartType]); + + return ; +} \ No newline at end of file diff --git a/src/content/research/future-trends-report.mdx b/src/content/research/future-trends-report.mdx index 205d4b1..638cbb7 100644 --- a/src/content/research/future-trends-report.mdx +++ b/src/content/research/future-trends-report.mdx @@ -56,6 +56,7 @@ Small and medium-sized businesses are also adopting AI solutions because modern + + ## AI Adoption in Manufacturing -
-

- {title} -

- {description &&

{description}

} +
+

+ {title} +

+ {description &&

{description}

}
{ author && ( @@ -98,7 +98,7 @@ if (!Content) {
@@ -112,7 +112,7 @@ if (!Content) {
{relatedPosts.map((post) => ( - post.data.category).filter(Boolean)) -// ]; - const selectedCategory = Astro.url.searchParams.get("category"); -const filteredPosts = selectedCategory ? posts.filter((post) => post.data.category === selectedCategory) : posts; +const filteredPosts = selectedCategory + ? posts.filter((post) => post.data.category === selectedCategory) + : posts; -const featuredPost = !selectedCategory ? posts.find((post) => post.data.featured) : null; +const featuredPost = !selectedCategory + ? posts.find((post) => post.data.featured) + : null; -const gridPosts = selectedCategory ? filteredPosts : filteredPosts.filter((post) => !post.data.featured); +const gridPosts = selectedCategory + ? filteredPosts + : filteredPosts.filter((post) => !post.data.featured); ---
- + +
-

Research Library

+

+ Research Library +

-

+

Research & White Papers

-

- Explore industry research, market analysis, case studies, AI trends, sustainability insights and product - vision papers. +

+ Explore industry research, market analysis, case studies, + AI trends, sustainability insights and product vision papers.

- - - - + { featuredPost && (
-

Featured Research

+

+ Featured Research +

-
) } - +
{ gridPosts.map((post) => ( - No research articles found in this category.

+

+ No research articles found in this category. +

) }
+
-
+ \ No newline at end of file From 9f3685a00579f14ad2b45928f787d5fb3c18d36f Mon Sep 17 00:00:00 2001 From: Md Abdulla Date: Sat, 27 Jun 2026 22:22:30 +0530 Subject: [PATCH 08/10] add research on home page --- src/components/BlogsSection.astro | 2 +- src/components/ResearchCard.astro | 12 +++-- src/components/ResearchSection.astro | 53 +++++++++++++++++++ src/content/research/future-trends-report.mdx | 8 +-- src/pages/index.astro | 2 + src/pages/research/[slug].astro | 10 ++-- 6 files changed, 72 insertions(+), 15 deletions(-) create mode 100644 src/components/ResearchSection.astro diff --git a/src/components/BlogsSection.astro b/src/components/BlogsSection.astro index dc48a0c..40991b4 100644 --- a/src/components/BlogsSection.astro +++ b/src/components/BlogsSection.astro @@ -15,7 +15,7 @@ const slicedPosts = posts.slice(0, 3);

Recent Blogs

- Insights, Updates + Insights, Updates & Stories

diff --git a/src/components/ResearchCard.astro b/src/components/ResearchCard.astro index 9cf0124..1300b9c 100644 --- a/src/components/ResearchCard.astro +++ b/src/components/ResearchCard.astro @@ -23,9 +23,9 @@ const { -
+
{ @@ -46,17 +46,19 @@ const {
-

+

{title}

-

+

{description}

-
+
{author} {date} diff --git a/src/components/ResearchSection.astro b/src/components/ResearchSection.astro new file mode 100644 index 0000000..30157d6 --- /dev/null +++ b/src/components/ResearchSection.astro @@ -0,0 +1,53 @@ +--- +import { getCollection } from "astro:content"; +import ResearchCard from "./ResearchCard.astro"; + +const posts = await getCollection("research"); + +const slicedPosts = posts.slice(0, 3); +--- + +
+ +
\ No newline at end of file diff --git a/src/content/research/future-trends-report.mdx b/src/content/research/future-trends-report.mdx index 638cbb7..079714f 100644 --- a/src/content/research/future-trends-report.mdx +++ b/src/content/research/future-trends-report.mdx @@ -1,11 +1,11 @@ --- title: "Future Trends Report" -description: "Market growth and AI adoption trends." +description: "Market growth, AI adoption trends, and future industry outlook." author: "Recursive Zero" date: 2025-08-17 -# tags: -# - ai -# - future +tags: + - research + - ai category: "AI & Technology" featured: true --- diff --git a/src/pages/index.astro b/src/pages/index.astro index 58cdf2b..8f0d409 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -4,11 +4,13 @@ import AppsSimplifySection from "@/components/AppsSimplifySection.astro"; import BlogsSection from "@/components/BlogsSection.astro"; import ContactSection from "@/components/ContactSection.astro"; import BaseLayout from "@/layouts/BaseLayout"; +import ResearchSection from "@/components/ResearchSection.astro"; --- + diff --git a/src/pages/research/[slug].astro b/src/pages/research/[slug].astro index 1943835..2046862 100644 --- a/src/pages/research/[slug].astro +++ b/src/pages/research/[slug].astro @@ -28,7 +28,7 @@ if (!Astro.props?.id) { const { Content } = await render(blog); -const { title, description, date, author, image, tags } = blog.data; +const { title, description, date, author, image } = blog.data; const allResearch = await getCollection("research"); const relatedPosts = allResearch.filter((post) => post.id !== blog.id).slice(0, 3); @@ -77,7 +77,7 @@ if (!Content) {
- { +
-
+
From f7cce1cc71eedfa4ed18896c4e6f3a8236fa5138 Mon Sep 17 00:00:00 2001 From: recursivezero <152776938+recursivezero@users.noreply.github.com> Date: Sun, 28 Jun 2026 13:04:23 +0530 Subject: [PATCH 09/10] remove react dependency completely --- .astro/content.d.ts | 2 +- CHANGELOG.md | 4 + astro.config.mjs | 4 - package-lock.json | 402 +----------------- package.json | 5 +- src/components/Chart.astro | 13 + src/components/D3Config.astro | 16 + src/components/D3Graph.astro | 20 + src/components/research/D3Graph.astro | 27 -- src/components/research/D3Graph.tsx | 193 --------- src/components/research/ResearchQuote.astro | 2 +- src/content/research/future-trends-report.mdx | 2 +- src/scripts/d3-chart.ts | 13 + src/utils/chart.ts | 172 ++++++++ 14 files changed, 245 insertions(+), 630 deletions(-) create mode 100644 src/components/Chart.astro create mode 100644 src/components/D3Config.astro create mode 100644 src/components/D3Graph.astro delete mode 100644 src/components/research/D3Graph.astro delete mode 100644 src/components/research/D3Graph.tsx create mode 100644 src/scripts/d3-chart.ts create mode 100644 src/utils/chart.ts diff --git a/.astro/content.d.ts b/.astro/content.d.ts index 8379d03..99939c4 100644 --- a/.astro/content.d.ts +++ b/.astro/content.d.ts @@ -185,6 +185,6 @@ declare module 'astro:content' { LiveContentConfig['collections'][C]['loader'] >; - export type ContentConfig = typeof import("./../src/content.config.js"); + export type ContentConfig = typeof import("../src/content.config.js"); export type LiveContentConfig = never; } diff --git a/CHANGELOG.md b/CHANGELOG.md index f227df2..f51d3a5 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -71,6 +71,10 @@ astro boilerplate - Removed unnecessary classes - improve page performance in light and dark mode +## [1.4.1] - 2026-06-28 + +- Added research page + ### [Unreleased] Here we write upgrading notes for brands. It's a team effort to make them as straightforward as possible. diff --git a/astro.config.mjs b/astro.config.mjs index 252b8fe..679d10f 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -1,5 +1,4 @@ import mdx from "@astrojs/mdx"; -import react from "@astrojs/react"; import tailwind from "@astrojs/tailwind"; import { defineConfig, passthroughImageService } from "astro/config"; @@ -15,9 +14,6 @@ export default defineConfig({ }, integrations: [ mdx(), - react({ - experimentalReactChildren: true - }), tailwind({ applyBaseStyles: false, nesting: true diff --git a/package-lock.json b/package-lock.json index 3c3ebc9..5544b12 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,18 +1,17 @@ { "name": "@recursivezero/domain", - "version": "1.4.0", + "version": "1.4.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@recursivezero/domain", - "version": "1.4.0", + "version": "1.4.1", "license": "MIT", "dependencies": { "@astrojs/check": "0.9.2", "@astrojs/mdx": "5.0.6", "@astrojs/node": "^10.1.1", - "@astrojs/react": "5.0.5", "@astrojs/rss": "4.0.18", "@astrojs/tailwind": "6.0.2", "@fontsource/roboto": "5.1.0", @@ -244,28 +243,6 @@ "node": ">=22.12.0" } }, - "node_modules/@astrojs/react": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@astrojs/react/-/react-5.0.5.tgz", - "integrity": "sha512-5jSFDqWqLdEyp7CEVD66A7AQEEuwLkCGR25NJ4FR5EjziZQqZTGc7hJOFZ97qb98BiU6vElrS70R8iI+HhufGQ==", - "license": "MIT", - "dependencies": { - "@astrojs/internal-helpers": "0.9.1", - "@vitejs/plugin-react": "^5.2.0", - "devalue": "^5.6.4", - "ultrahtml": "^1.6.0", - "vite": "^7.3.2" - }, - "engines": { - "node": ">=22.12.0" - }, - "peerDependencies": { - "@types/react": "^17.0.50 || ^18.0.21 || ^19.0.0", - "@types/react-dom": "^17.0.17 || ^18.0.6 || ^19.0.0", - "react": "^17.0.2 || ^18.0.0 || ^19.0.0", - "react-dom": "^17.0.2 || ^18.0.0 || ^19.0.0" - } - }, "node_modules/@astrojs/rss": { "version": "4.0.18", "resolved": "https://registry.npmjs.org/@astrojs/rss/-/rss-4.0.18.tgz", @@ -375,157 +352,6 @@ "yaml": "^2.8.3" } }, - "node_modules/@babel/code-frame": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz", - "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==", - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.29.7", - "js-tokens": "^4.0.0", - "picocolors": "^1.1.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.7.tgz", - "integrity": "sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.7.tgz", - "integrity": "sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==", - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.29.7", - "@babel/generator": "^7.29.7", - "@babel/helper-compilation-targets": "^7.29.7", - "@babel/helper-module-transforms": "^7.29.7", - "@babel/helpers": "^7.29.7", - "@babel/parser": "^7.29.7", - "@babel/template": "^7.29.7", - "@babel/traverse": "^7.29.7", - "@babel/types": "^7.29.7", - "@jridgewell/remapping": "^2.3.5", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/core/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/generator": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.7.tgz", - "integrity": "sha512-DkXD5OJQaAQIdZ1bt3UZdEnHAn9Imd3IVBdX03UFe+ony9Ojw5pzr9YVKGDY1jt+Gcn/FnGkNf8r+Vj5NOJWtQ==", - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.29.7", - "@babel/types": "^7.29.7", - "@jridgewell/gen-mapping": "^0.3.12", - "@jridgewell/trace-mapping": "^0.3.28", - "jsesc": "^3.0.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.29.7.tgz", - "integrity": "sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==", - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.29.7", - "@babel/helper-validator-option": "^7.29.7", - "browserslist": "^4.24.0", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/helper-globals": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.29.7.tgz", - "integrity": "sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.29.7.tgz", - "integrity": "sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==", - "license": "MIT", - "dependencies": { - "@babel/traverse": "^7.29.7", - "@babel/types": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.29.7.tgz", - "integrity": "sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==", - "license": "MIT", - "dependencies": { - "@babel/helper-module-imports": "^7.29.7", - "@babel/helper-validator-identifier": "^7.29.7", - "@babel/traverse": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.29.7.tgz", - "integrity": "sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-string-parser": { "version": "7.29.7", "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz", @@ -544,28 +370,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-validator-option": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.29.7.tgz", - "integrity": "sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.7.tgz", - "integrity": "sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==", - "license": "MIT", - "dependencies": { - "@babel/template": "^7.29.7", - "@babel/types": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/parser": { "version": "7.29.7", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.7.tgz", @@ -581,36 +385,6 @@ "node": ">=6.0.0" } }, - "node_modules/@babel/plugin-transform-react-jsx-self": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.29.7.tgz", - "integrity": "sha512-TL0hMc9xzy86VD31nUiwzd5otRAcyEPcsegCxolO0PvcXuH1v0kECe/UIznYFihpkvU5wg/jk4v0TTEFfm53fw==", - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-react-jsx-source": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.29.7.tgz", - "integrity": "sha512-06IyK09H3wi4cGbhDBwp5gUGo0IKtnYa8tyTiephirPCK6fbobVGiXMMI5zLQ4aKEYP3wZ3ArU44o+8KMrSG/Q==", - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/runtime": { "version": "7.29.7", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.7.tgz", @@ -620,38 +394,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/template": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.29.7.tgz", - "integrity": "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==", - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.29.7", - "@babel/parser": "^7.29.7", - "@babel/types": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.7.tgz", - "integrity": "sha512-EhlfNQtZ+NK22w5BM61ciuiq1m58ed33Wr1Xan//ZRTy6hgjnwyCffRYwzsGXdASJSUJ1guZILsErh1eQcl+zw==", - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.29.7", - "@babel/generator": "^7.29.7", - "@babel/helper-globals": "^7.29.7", - "@babel/parser": "^7.29.7", - "@babel/template": "^7.29.7", - "@babel/types": "^7.29.7", - "debug": "^4.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/types": { "version": "7.29.7", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.7.tgz", @@ -1769,16 +1511,6 @@ "@jridgewell/trace-mapping": "^0.3.24" } }, - "node_modules/@jridgewell/remapping": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", - "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", - "license": "MIT", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - } - }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", @@ -1927,12 +1659,6 @@ } } }, - "node_modules/@rolldown/pluginutils": { - "version": "1.0.0-rc.3", - "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-rc.3.tgz", - "integrity": "sha512-eybk3TjzzzV97Dlj5c+XrBFW57eTNhzod66y9HrBlzJ6NsCrWCp/2kaPS3K9wJmurBC0Tdw4yPjXKZqlznim3Q==", - "license": "MIT" - }, "node_modules/@rollup/pluginutils": { "version": "5.4.0", "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.4.0.tgz", @@ -2412,47 +2138,6 @@ "tailwindcss": ">=3.0.0 || insiders" } }, - "node_modules/@types/babel__core": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", - "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "node_modules/@types/babel__generator": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", - "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", - "license": "MIT", - "dependencies": { - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__template": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", - "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__traverse": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", - "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", - "license": "MIT", - "dependencies": { - "@babel/types": "^7.28.2" - } - }, "node_modules/@types/d3": { "version": "7.4.3", "resolved": "https://registry.npmjs.org/@types/d3/-/d3-7.4.3.tgz", @@ -3075,26 +2760,6 @@ "integrity": "sha512-5jsZFwgR5rTdKwidH9Qmat75RKwqfpKlWWB1frDkljN127mwqBu8K0PYo7/hFpF03IEJpfVPpCQDY/eDx3iHvA==", "license": "ISC" }, - "node_modules/@vitejs/plugin-react": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-5.2.0.tgz", - "integrity": "sha512-YmKkfhOAi3wsB1PhJq5Scj3GXMn3WvtQ/JC0xoopuHoXSdmtdStOpFrYaT1kie2YgFBcIe64ROzMYRjCrYOdYw==", - "license": "MIT", - "dependencies": { - "@babel/core": "^7.29.0", - "@babel/plugin-transform-react-jsx-self": "^7.27.1", - "@babel/plugin-transform-react-jsx-source": "^7.27.1", - "@rolldown/pluginutils": "1.0.0-rc.3", - "@types/babel__core": "^7.20.5", - "react-refresh": "^0.18.0" - }, - "engines": { - "node": "^20.19.0 || >=22.12.0" - }, - "peerDependencies": { - "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, "node_modules/@volar/kit": { "version": "2.4.28", "resolved": "https://registry.npmjs.org/@volar/kit/-/kit-2.4.28.tgz", @@ -4445,12 +4110,6 @@ "node": ">= 0.6" } }, - "node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "license": "MIT" - }, "node_modules/cookie": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.1.1.tgz", @@ -7111,15 +6770,6 @@ "node": ">= 0.4" } }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -8540,18 +8190,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/jsesc": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", - "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/json-buffer": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", @@ -8582,18 +8220,6 @@ "dev": true, "license": "MIT" }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/jsonc-parser": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz", @@ -8878,15 +8504,6 @@ "loose-envify": "cli.js" } }, - "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "license": "ISC", - "dependencies": { - "yallist": "^3.0.2" - } - }, "node_modules/lucide-react": { "version": "0.469.0", "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.469.0.tgz", @@ -11451,15 +11068,6 @@ "react": "^18.2.0" } }, - "node_modules/react-refresh": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.18.0.tgz", - "integrity": "sha512-QgT5//D3jfjJb6Gsjxv0Slpj23ip+HtOpnNgnb2S5zU3CB26G/IDPGoy4RJB42wzFE46DRsstbW6tKHoKbhAxw==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", @@ -14673,12 +14281,6 @@ "node": ">=10" } }, - "node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "license": "ISC" - }, "node_modules/yaml": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.0.tgz", diff --git a/package.json b/package.json index f599c23..61cda59 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@recursivezero/domain", - "version": "1.4.0", + "version": "1.4.1", "main": "src/index.js", "author": { "name": "Founder", @@ -25,7 +25,7 @@ "github", "template" ], - "contributors": [ ], + "contributors": [], "timestamp": { "createdOn": "Sun, 07 Jan 2024 00:00:00 +05:30", "updatedOn": "Sun,15 June 2025 02:10:39 +05:30" @@ -62,7 +62,6 @@ "@astrojs/check": "0.9.2", "@astrojs/mdx": "5.0.6", "@astrojs/node": "^10.1.1", - "@astrojs/react": "5.0.5", "@astrojs/rss": "4.0.18", "@astrojs/tailwind": "6.0.2", "@fontsource/roboto": "5.1.0", diff --git a/src/components/Chart.astro b/src/components/Chart.astro new file mode 100644 index 0000000..f71b1d7 --- /dev/null +++ b/src/components/Chart.astro @@ -0,0 +1,13 @@ +--- +const { data, chartType } = Astro.props; +--- + + + + diff --git a/src/components/D3Config.astro b/src/components/D3Config.astro new file mode 100644 index 0000000..681d11a --- /dev/null +++ b/src/components/D3Config.astro @@ -0,0 +1,16 @@ +--- +import { type ChartType, type DataPoint } from "@/utils/chart"; + +interface Props { + data: DataPoint[]; + chartType?: ChartType; +} + +const { data, chartType = "bar" } = Astro.props; +--- + +
+ +
+ + diff --git a/src/components/D3Graph.astro b/src/components/D3Graph.astro new file mode 100644 index 0000000..d9481be --- /dev/null +++ b/src/components/D3Graph.astro @@ -0,0 +1,20 @@ +--- +import D3Config from "@/components/D3Config.astro"; +import type { ChartType, DataPoint } from "@/utils/chart"; + +interface Props { + title: string; + data: DataPoint[]; + chartType?: ChartType; +} + +const { title, data, chartType = "bar" } = Astro.props; +--- + +
+

+ {title} +

+ + +
diff --git a/src/components/research/D3Graph.astro b/src/components/research/D3Graph.astro deleted file mode 100644 index 53faabe..0000000 --- a/src/components/research/D3Graph.astro +++ /dev/null @@ -1,27 +0,0 @@ ---- -import D3GraphReact, { type DataPoint } from "./D3Graph"; - -interface Props { - title: string; - data: DataPoint[]; - chartType?: "bar" | "pie"; -} - -const { - title, - data, - chartType = "bar" -} = Astro.props; ---- - -
-

- {title} -

- - -
\ No newline at end of file diff --git a/src/components/research/D3Graph.tsx b/src/components/research/D3Graph.tsx deleted file mode 100644 index b19ec3d..0000000 --- a/src/components/research/D3Graph.tsx +++ /dev/null @@ -1,193 +0,0 @@ -import { useEffect, useRef } from "react"; -import * as d3 from "d3"; - -export interface DataPoint { - label: string; - value: number; -} - -interface Props { - data: DataPoint[]; - chartType?: "bar" | "pie"; -} - -export default function D3Graph({ - data, - chartType = "bar", -}: Props) { - const svgRef = useRef(null); - - useEffect(() => { - if (!svgRef.current) return; - - const svg = d3.select(svgRef.current); - svg.selectAll("*").remove(); - - const width = 700; - const height = 400; - const margin = 50; - - svg.attr("viewBox", `0 0 ${width} ${height}`); - - if (chartType === "bar") { - const x = d3 - .scaleBand() - .domain(data.map((d) => d.label)) - .range([margin, width - margin]) - .padding(0.3); - - const y = d3 - .scaleLinear() - .domain([0, d3.max(data, (d) => d.value) ?? 0]) - .nice() - .range([height - margin, margin]); - - svg - .selectAll("rect") - .data(data) - .enter() - .append("rect") - .attr("x", (d) => x(d.label)!) - .attr("width", x.bandwidth()) - .attr("y", height - margin) - .attr("height", 0) - .attr("fill", "#2563eb") - .attr("rx", 6) - .transition() - .duration(800) - .delay((_, i) => i * 150) - .attr("y", (d) => y(d.value)) - .attr("height", (d) => height - margin - y(d.value)); - - svg - .append("g") - .attr("transform", `translate(0,${height - margin})`) - .call(d3.axisBottom(x)); - - svg - .append("g") - .attr("transform", `translate(${margin},0)`) - .call(d3.axisLeft(y)); - - svg - .selectAll(".label") - .data(data) - .enter() - .append("text") - .attr("class", "label") - .attr("x", (d) => x(d.label)! + x.bandwidth() / 2) - .attr("y", (d) => y(d.value) - 8) - .attr("text-anchor", "middle") - .attr("font-size", 12) - .attr("font-weight", 600) - .text((d) => d.value); - } - if (chartType === "pie") { - const radius = Math.min(width, height) / 2 - 40; - - const total = d3.sum(data, (d) => d.value); - - const color = d3 - .scaleOrdinal() - .domain(data.map((d) => d.label)) - .range([ - "#2563eb", - "#f97316", - "#16a34a", - "#dc2626", - "#9333ea", - "#0891b2", - ]); - - const pie = d3 - .pie() - .value((d) => d.value) - .sort(null); - - const arc = d3 - .arc>() - .innerRadius(0) - .outerRadius(radius); - - const g = svg - .append("g") - .attr("transform", `translate(${width / 2},${height / 2})`); - - // Pie slices - g.selectAll("path") - .data(pie(data)) - .enter() - .append("path") - .attr("d", arc as any) - .attr("fill", (_, i) => color(data[i].label)) - .attr("stroke", "#fff") - .attr("stroke-width", 2) - .style("opacity", 0) - .transition() - .duration(800) - .style("opacity", 1); - - // Labels (Name + Value + Percentage) - g.selectAll(".slice-label") - .data(pie(data)) - .enter() - .append("text") - .attr("class", "slice-label") - .attr("transform", (d) => `translate(${arc.centroid(d)})`) - .attr("text-anchor", "middle") - .attr("fill", "#fff") - .attr("font-size", "13px") - .attr("font-weight", "600") - .each(function (d) { - const percent = ((d.data.value / total) * 100).toFixed(1); - - const text = d3.select(this); - - text - .append("tspan") - .attr("x", 0) - .attr("dy", "-0.6em") - .text(d.data.label); - - text - .append("tspan") - .attr("x", 0) - .attr("dy", "1.3em") - .text(d.data.value); - - text - .append("tspan") - .attr("x", 0) - .attr("dy", "1.3em") - .text(`(${percent}%)`); - }); - - // Legend - const legend = svg - .append("g") - .attr("transform", `translate(40, ${height - 20})`); - - const legendItems = legend - .selectAll(".legend") - .data(data) - .enter() - .append("g") - .attr("transform", (_, i) => `translate(${i * 160},0)`); - - legendItems - .append("rect") - .attr("width", 16) - .attr("height", 16) - .attr("fill", (_, i) => color(data[i].label)); - - legendItems - .append("text") - .attr("x", 24) - .attr("y", 13) - .attr("font-size", "13px") - .text((d) => `${d.label} (${d.value})`); -} - }, [data, chartType]); - - return ; -} \ No newline at end of file diff --git a/src/components/research/ResearchQuote.astro b/src/components/research/ResearchQuote.astro index dddbbae..57d40c4 100644 --- a/src/components/research/ResearchQuote.astro +++ b/src/components/research/ResearchQuote.astro @@ -9,7 +9,7 @@ const { quote, author } = Astro.props;

- “{quote}” + "{quote}"

{author &&
— {author}
} diff --git a/src/content/research/future-trends-report.mdx b/src/content/research/future-trends-report.mdx index 079714f..842272e 100644 --- a/src/content/research/future-trends-report.mdx +++ b/src/content/research/future-trends-report.mdx @@ -16,7 +16,7 @@ import DataCard from "@/components/research/DataCard.astro"; import CalloutBox from "@/components/research/CalloutBox.astro"; import Timeline from "@/components/research/Timeline.astro"; import GraphPlaceholder from "@/components/research/GraphPlaceholder.astro"; -import D3Graph from "@/components/research/D3Graph.astro"; +import D3Graph from "@/components//D3Graph.astro"; ## Introduction diff --git a/src/scripts/d3-chart.ts b/src/scripts/d3-chart.ts new file mode 100644 index 0000000..2a6370b --- /dev/null +++ b/src/scripts/d3-chart.ts @@ -0,0 +1,13 @@ +import { drawChart, type ChartType, type DataPoint } from "@/utils/chart"; + +document.querySelectorAll("[data-d3-chart]").forEach((container) => { + const svg = container.querySelector("svg"); + + if (!svg) return; + + const data = JSON.parse(container.dataset.data ?? "[]") as DataPoint[]; + + const chartType = (container.dataset.chartType ?? "bar") as ChartType; + + drawChart(svg, data, chartType); +}); diff --git a/src/utils/chart.ts b/src/utils/chart.ts new file mode 100644 index 0000000..f5245e3 --- /dev/null +++ b/src/utils/chart.ts @@ -0,0 +1,172 @@ +import * as d3 from "d3"; + +export interface DataPoint { + label: string; + value: number; +} + +export type ChartType = "bar" | "pie"; + +export function drawChart(svgElement: SVGSVGElement, data: DataPoint[], chartType: ChartType = "bar") { + const svg = d3.select(svgElement); + + svg.selectAll("*").remove(); + + const width = 700; + const height = 400; + const margin = 50; + + svg.attr("width", width).attr("height", height).attr("viewBox", `0 0 ${width} ${height}`); + + if (chartType === "bar") { + drawBarChart(svg, data, width, height, margin); + } + + if (chartType === "pie") { + drawPieChart(svg, data, width, height); + } +} + +function drawBarChart( + svg: d3.Selection, + data: DataPoint[], + width: number, + height: number, + margin: number +) { + const x = d3 + .scaleBand() + .domain(data.map((d) => d.label)) + .range([margin, width - margin]) + .padding(0.3); + + const y = d3 + .scaleLinear() + .domain([0, d3.max(data, (d) => d.value) ?? 0]) + .nice() + .range([height - margin, margin]); + + svg + .selectAll("rect") + .data(data) + .enter() + .append("rect") + .attr("x", (d) => x(d.label)!) + .attr("width", x.bandwidth()) + .attr("y", height - margin) + .attr("height", 0) + .attr("fill", "#2563eb") + .attr("rx", 6) + .transition() + .duration(800) + .delay((_, i) => i * 150) + .attr("y", (d) => y(d.value)) + .attr("height", (d) => height - margin - y(d.value)); + + svg + .append("g") + .attr("transform", `translate(0,${height - margin})`) + .call(d3.axisBottom(x)); + + svg.append("g").attr("transform", `translate(${margin},0)`).call(d3.axisLeft(y)); + + // Value labels + svg + .selectAll(".label") + .data(data) + .enter() + .append("text") + .attr("class", "label") + .attr("x", (d) => x(d.label)! + x.bandwidth() / 2) + .attr("y", (d) => y(d.value) - 8) + .attr("text-anchor", "middle") + .attr("font-size", 12) + .attr("font-weight", 600) + .text((d) => d.value); +} + +function drawPieChart( + svg: d3.Selection, + data: DataPoint[], + width: number, + height: number +) { + const radius = Math.min(width, height) / 2 - 40; + + const total = d3.sum(data, (d) => d.value); + + const color = d3 + .scaleOrdinal() + .domain(data.map((d) => d.label)) + .range(["#2563eb", "#f97316", "#16a34a", "#dc2626", "#9333ea", "#0891b2"]); + + const pie = d3 + .pie() + .value((d) => d.value) + .sort(null); + + const arc = d3.arc>().innerRadius(0).outerRadius(radius); + + const g = svg.append("g").attr("transform", `translate(${width / 2},${height / 2})`); + + // Pie slices + g.selectAll("path") + .data(pie(data)) + .enter() + .append("path") + .attr("d", arc) + .attr("fill", (d) => color(d.data.label)!) + .attr("stroke", "#fff") + .attr("stroke-width", 2) + .style("opacity", 0) + .transition() + .duration(800) + .style("opacity", 1); + + // Labels + g.selectAll(".slice-label") + .data(pie(data)) + .enter() + .append("text") + .attr("class", "slice-label") + .attr("transform", (d) => `translate(${arc.centroid(d)})`) + .attr("text-anchor", "middle") + .attr("fill", "#fff") + .attr("font-size", "13px") + .attr("font-weight", "600") + .each(function (d) { + const percent = ((d.data.value / total) * 100).toFixed(1); + + const text = d3.select(this); + + text.append("tspan").attr("x", 0).attr("dy", "-0.6em").text(d.data.label); + + text.append("tspan").attr("x", 0).attr("dy", "1.3em").text(d.data.value); + + text.append("tspan").attr("x", 0).attr("dy", "1.3em").text(`(${percent}%)`); + }); + + // Legend + const legend = svg.append("g").attr("transform", `translate(40, ${height - 20})`); + + const legendItems = legend + .selectAll(".legend") + .data(data) + .enter() + .append("g") + .attr("transform", (_, i) => `translate(${i * 160},0)`); + + legendItems + .append("rect") + .attr("width", 16) + .attr("height", 16) + .attr("fill", (d) => color(d.label)!); + + legendItems + .append("text") + .attr("x", 24) + .attr("y", 13) + .attr("font-size", "13px") + .attr("fill", "currentColor") + .text((d) => `${d.label} (${d.value})`); +} From 06a8988aedae5abd270f005e76d6e0155daad89d Mon Sep 17 00:00:00 2001 From: recursivezero <152776938+recursivezero@users.noreply.github.com> Date: Sun, 28 Jun 2026 13:15:30 +0530 Subject: [PATCH 10/10] disable enable research paper --- CHANGELOG.md | 2 +- src/components/ResearchSection.astro | 39 ++++++++----------- src/content.config.ts | 3 +- src/content/research/future-trends-report.mdx | 4 +- .../hidden-cost-of-manual-processes.md | 1 + .../research/why-we-built-this-product.md | 1 + src/pages/index.astro | 4 +- src/pages/research/index.astro | 28 +++++-------- 8 files changed, 37 insertions(+), 45 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f51d3a5..159f782 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -73,7 +73,7 @@ astro boilerplate ## [1.4.1] - 2026-06-28 -- Added research page +- Added Research page ### [Unreleased] diff --git a/src/components/ResearchSection.astro b/src/components/ResearchSection.astro index 30157d6..2c99e45 100644 --- a/src/components/ResearchSection.astro +++ b/src/components/ResearchSection.astro @@ -9,18 +9,12 @@ const slicedPosts = posts.slice(0, 3);
\ No newline at end of file +
diff --git a/src/content.config.ts b/src/content.config.ts index 1cbd2ef..efa2a75 100644 --- a/src/content.config.ts +++ b/src/content.config.ts @@ -45,7 +45,8 @@ const research = defineCollection({ tags: z.array(z.string()).default([]), category: z.string(), featured: z.boolean().default(false), - image: z.string().optional() + image: z.string().optional(), + isActive: z.boolean().default(true) }) }); diff --git a/src/content/research/future-trends-report.mdx b/src/content/research/future-trends-report.mdx index 842272e..9e1bc18 100644 --- a/src/content/research/future-trends-report.mdx +++ b/src/content/research/future-trends-report.mdx @@ -8,6 +8,7 @@ tags: - ai category: "AI & Technology" featured: true +isActive: true --- import StatisticBlock from "@/components/research/StatisticBlock.astro"; @@ -20,7 +21,8 @@ import D3Graph from "@/components//D3Graph.astro"; ## Introduction -Artificial Intelligence is rapidly transforming industries across the globe. Businesses are increasingly investing in automation, data-driven decision making, and intelligent software to improve productivity and reduce operational costs. From manufacturing and healthcare to retail and logistics, AI is becoming a key competitive advantage. +Artificial Intelligence is rapidly transforming industries across the globe. Businesses are increasingly investing in automation, data-driven decision making, and intelligent software to improve productivity and reduce operational costs. +From manufacturing and healthcare to retail and logistics, AI is becoming a key competitive advantage. The manufacturing sector, particularly textiles and supply chain management, is experiencing significant digital transformation. Organizations are adopting machine learning, computer vision, and predictive analytics to streamline operations and improve product quality. diff --git a/src/content/research/hidden-cost-of-manual-processes.md b/src/content/research/hidden-cost-of-manual-processes.md index 18b4f9a..34bbc51 100644 --- a/src/content/research/hidden-cost-of-manual-processes.md +++ b/src/content/research/hidden-cost-of-manual-processes.md @@ -8,6 +8,7 @@ tags: - operations category: "Case Studies" featured: false +isActive: false --- ## Introduction diff --git a/src/content/research/why-we-built-this-product.md b/src/content/research/why-we-built-this-product.md index 04071a5..256ce58 100644 --- a/src/content/research/why-we-built-this-product.md +++ b/src/content/research/why-we-built-this-product.md @@ -8,6 +8,7 @@ tags: - product category: "Product Vision" featured: false +isActive: false --- ## Introduction diff --git a/src/pages/index.astro b/src/pages/index.astro index 8f0d409..2a3248b 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -3,14 +3,14 @@ import AboutSection from "@/components/AboutSection.astro"; import AppsSimplifySection from "@/components/AppsSimplifySection.astro"; import BlogsSection from "@/components/BlogsSection.astro"; import ContactSection from "@/components/ContactSection.astro"; -import BaseLayout from "@/layouts/BaseLayout"; import ResearchSection from "@/components/ResearchSection.astro"; +import BaseLayout from "@/layouts/BaseLayout"; --- - + diff --git a/src/pages/research/index.astro b/src/pages/research/index.astro index bc6905c..2317b16 100644 --- a/src/pages/research/index.astro +++ b/src/pages/research/index.astro @@ -9,34 +9,31 @@ const selectedCategory = Astro.url.searchParams.get("category"); const filteredPosts = selectedCategory ? posts.filter((post) => post.data.category === selectedCategory) - : posts; + : posts.filter((post) => post.data.isActive); -const featuredPost = !selectedCategory - ? posts.find((post) => post.data.featured) - : null; +const featuredPost = !selectedCategory ? posts.find((post) => post.data.featured) : null; const gridPosts = selectedCategory ? filteredPosts - : filteredPosts.filter((post) => !post.data.featured); + : filteredPosts.filter((post) => !post.data.isActive || !post.data.featured); ---
-

Research Library

-

+

Research & White Papers

-

- Explore industry research, market analysis, case studies, - AI trends, sustainability insights and product vision papers. +

+ Explore industry research, market analysis, case studies, AI trends, sustainability insights and product + vision papers.

@@ -44,9 +41,7 @@ const gridPosts = selectedCategory { featuredPost && (
-

- Featured Research -

+

Featured Research

- No research articles found in this category. -

+

No research articles found in this category.

) }
-
-
\ No newline at end of file +