An open API service indexing awesome lists of open source software.

https://github.com/amanssur-tech/d3-visualizations

Modern React + D3 data visualization dashboard built with Vite, Tailwind & Framer Motion.
https://github.com/amanssur-tech/d3-visualizations

d3 dashboard data-visualization framer-motion react tailwindcss typescript vite

Last synced: 3 months ago
JSON representation

Modern React + D3 data visualization dashboard built with Vite, Tailwind & Framer Motion.

Awesome Lists containing this project

README

          

# 🧭 D3 Visualizations β€” React + D3 + Tailwind

A sleek, modern data visualization dashboard built with **React**, **Vite**, **D3.js**, and **Tailwind CSS**.
Originally inspired by an academic project, it has evolved into a professional-grade template for interactive data dashboards with smooth animations, dark mode, and export capabilities.

---

## πŸš€ Live Demo

**[https://viz.amanssur.com](https://viz.amanssur.com)**

---

## πŸ“Έ Preview

Dashboard Screenshot

---

## ✨ Highlights

- βš›οΈ **Modern React architecture** β€” modular components, reusable charts, and clean routing (dashboard, case-study index, and deep links for each visualization).
- πŸ“Š **D3.js inside React** β€” a custom `useD3` hook bridges the gap between React’s virtual DOM and D3’s SVG rendering.
- 🎨 **Tailwind CSS styling** β€” consistent design tokens, light/dark mode, and responsive layouts.
- πŸŒ€ **Framer Motion** β€” subtle page and chart transitions for a smooth, app-like experience.
- πŸ’Ύ **Export-ready charts** β€” one click to download all visualizations in SVG/PNG.
- 🧩 **TypeScript migration** β€” strongly typed components for scalability and long-term maintainability.

---

## πŸ—‚οΈ Project Overview

```
d3-visualizations/
β”œβ”€β”€ public/
β”‚ β”œβ”€β”€ favicons/ # Brand icons and PWA assets
β”‚ β”œβ”€β”€ manifest.webmanifest # PWA metadata
β”‚ β”œβ”€β”€ robots.txt # Crawling rules + IndexNow key
β”‚ └── sitemap.xml # Sitemap for all routes
β”œβ”€β”€ src/
β”‚ β”œβ”€β”€ charts/ # D3 renderers (bar, line, donut, time-of-day, etc.)
β”‚ β”œβ”€β”€ components/ # React components (UI + dashboard views)
β”‚ β”œβ”€β”€ content/ # Case study metadata
β”‚ β”œβ”€β”€ context/ # ThemeContext for dark/light mode
β”‚ β”œβ”€β”€ data/ # JSON datasets bundled with the app
β”‚ β”œβ”€β”€ hooks/ # useD3 and other UI/data hooks
β”‚ β”œβ”€β”€ i18n/ # Bilingual EN/DE translations and helpers
β”‚ β”œβ”€β”€ pages/ # Dashboard + case-study pages
β”‚ β”œβ”€β”€ styles/ # Tailwind global styles
β”‚ β”œβ”€β”€ ui/ # Reusable UI primitives (buttons, surfaces, pills)
β”‚ β”œβ”€β”€ utils/ # Config, export, tooltip helpers
β”‚ β”œβ”€β”€ App.tsx
β”‚ β”œβ”€β”€ main.tsx
β”‚ └── router.tsx
β”œβ”€β”€ index.html
β”œβ”€β”€ vercel.json # SPA deep-link rewrites for React Router
β”œβ”€β”€ package.json
β”œβ”€β”€ tsconfig.json
└── vite.config.js
```

---

## ⚑️ Quick Start

> **Requirements:** Node.js β‰₯ 18

```bash
# install dependencies
pnpm install

# start the local dev server
pnpm run dev

# build production files
pnpm run build

# preview the production build
pnpm run preview
```

---

## 🌐 Deployment

Deployed live at **[viz.amanssur.com](https://viz.amanssur.com)** via **Vercel**.
For local or alternative hosting:

1. Run `pnpm run build` to generate optimized assets in `/dist`.
2. Deploy to your preferred platform (Vercel, Netlify, or GitHub Pages).
3. Ensure SPA fallback is enabled so routes (`/`, `/case-studies`, and each `/case-studies/...` deep link) work properly.

---

## 🧠 Tech Stack

| Category | Tools |
| ---------- | ----------------------------------- |
| Framework | React + Vite |
| Charts | D3.js |
| Styling | Tailwind CSS |
| Animations | Framer Motion |
| Language | TypeScript |
| Hosting | Vercel () |

---

## πŸ’‘ How It Works

Each chart (Bar, Line, etc.) is a standalone React component that:

- Loads JSON data from the bundled `src/data` directory
- Uses D3.js for rendering and scaling
- Animates into view with Framer Motion
- Supports export through shared utility functions

This setup allows adding new visualizations easily β€” drop a new D3 renderer in `src/charts`, a page in `src/pages/case-studies`, and wire it up in `router.tsx`.

---

## 🌟 Author

Built with ❀️ by **[Amanullah Manssur](https://amanssur.com)**

---

## πŸͺͺ License and Branding Notice

All source code in this repository is released under the [MIT License](./LICENSE).
Logos, monograms, and brand assets belonging to Amanullah Manssur or Manssur Media are **not covered** by this license and may not be reused or redistributed without explicit written permission.