This the complete code for the tutorial on how to build a responsive timeline-based portfolio with React, TypeScript, and D3.js.
Each subfolder in the src/lib/ directory represents a different section of the tutorial, the deployed demo is available here.
Feel free to clone/fork/refer to this repository, and build an awesome portfolio that represents you best!
This project is based on npm and vite and was built with Node.js v24.
To install the dependencies, from the root folder run:
npm install
To run the local dev server:
npm run dev
To build a production version:
npm run build
You can also run linting and formatting with npm run lint and npm run format, respectively.
The project was scaffolded with the standard Vite project initializer and TypeScript template npm create . --template react-ts, uses Eslint and Prettier for code linting and formatting.
.scss modules; full counterpart of the sass package, but compatible with the recent versions ofscss modules on the flyMost of the code of interest is located in the src/lib/timeline folder. There is also a time-formatting function in the src/lib/utils
TimelineMap and NodeCard.
paths to the nodesTimelineEngine class, responsible for the calculationssrc/App.tsx is the application's entry point, it imports the sample data, implements a placeholder handleOnNodeExpand method, and passes them as props to the TimelineMap component. (In a real-life project, the data would likely come from an AJAX call, or fetched in a server-side handler, e.g. in case of Next.js).
The demo project uses free logos and pictures from Unsplash and UntitledUI in the sample data.
68 commits
TypeScript
91.0%
SCSS
7.3%
CSS
1.0%
This the complete code for the tutorial on how to build a responsive timeline-based portfolio with React, TypeScript, and D3.js.
Each subfolder in the src/lib/ directory represents a different section of the tutorial, the deployed demo is available here.
Feel free to clone/fork/refer to this repository, and build an awesome portfolio that represents you best!
This project is based on npm and vite and was built with Node.js v24.
To install the dependencies, from the root folder run:
npm install
To run the local dev server:
npm run dev
To build a production version:
npm run build
You can also run linting and formatting with npm run lint and npm run format, respectively.
The project was scaffolded with the standard Vite project initializer and TypeScript template npm create . --template react-ts, uses Eslint and Prettier for code linting and formatting.
.scss modules; full counterpart of the sass package, but compatible with the recent versions ofscss modules on the flyMost of the code of interest is located in the src/lib/timeline folder. There is also a time-formatting function in the src/lib/utils
TimelineMap and NodeCard.
paths to the nodesTimelineEngine class, responsible for the calculationssrc/App.tsx is the application's entry point, it imports the sample data, implements a placeholder handleOnNodeExpand method, and passes them as props to the TimelineMap component. (In a real-life project, the data would likely come from an AJAX call, or fetched in a server-side handler, e.g. in case of Next.js).
The demo project uses free logos and pictures from Unsplash and UntitledUI in the sample data.
68 commits
TypeScript
91.0%
SCSS
7.3%
CSS
1.0%