,

Creating a React Data Dashboard Application with NextJS, Typescript, MUI, and ChartsJS – Step 1: Setting Up the Project

Posted by

Build a React Data Dashboard App | NextJS, Typescript, MUI, ChartsJS – 1.Project Setup

Build a React Data Dashboard App

NextJS, Typescript, MUI, ChartsJS

Project Setup

When building a data dashboard app with React, it’s important to start off with a solid project setup. In this article, we’ll walk through the initial steps of setting up a React data dashboard app using NextJS, Typescript, Material-UI (MUI), and ChartsJS.

1. Install Node.js

First, make sure you have Node.js installed on your machine. You can download and install it from the official Node.js website.

2. Create a New NextJS Project

Next, we’ll create a new NextJS project by running the following command in your terminal:

  npx create-next-app my-data-dashboard-app

This will create a new NextJS project with all the necessary files and dependencies to get started.

3. Add Typescript Support

To add Typescript support to our project, we’ll need to run the following command in the terminal:

  npm install --save-dev typescript @types/react @types/node

Next, rename your pages with the .tsx extension. This will allow us to write our components with Typescript instead of plain JavaScript.

4. Integrate Material-UI (MUI)

Material-UI is a popular React UI framework that provides a set of customizable components for building user interfaces. To integrate MUI into our project, we’ll need to run the following command in the terminal:

  npm install @mui/material @emotion/react @emotion/styled

We’ll also need to set up the MUI theme for our app by creating a new file called theme.ts and adding our custom theme configuration.

5. Incorporate ChartsJS

Finally, we’ll want to add data visualization to our data dashboard app using ChartsJS. We can install ChartsJS by running the following command in the terminal:

  npm install chart.js

After installing ChartsJS, we can create and customize our data visualization components to display the data on our dashboard.

Conclusion

With these initial project setup steps, we now have a solid foundation for building our React data dashboard app. We’ve set up a NextJS project with Typescript support, integrated Material-UI for UI components, and incorporated ChartsJS for data visualization. In the next article, we’ll dive into creating the layout and components for our data dashboard.

0 0 votes
Article Rating
19 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
@CuriousByte
11 months ago

Hope you guys are enjoying the start of the series. Apologies for the quiet audio in the 'project installation' section at 8:12. Lost the footage for that bit due the whole video project being corrupted and that recording got deleted as well. Absolute nightmare! So I re-recorded in the dead of night with my little toddler sleeping not too far from where I was recording.

Hope you enjoyed it despite that but very much looking forward to releasing the rest of the series!

Follow me on https://twitter.com/thehashton to find out when the next one will be coming out 👋

@jnayehsirine6222
11 months ago

thank you for this valuable Contribution !!

@PRIME-yl9nb
11 months ago

is this frontend+backend?

@sopheakchhin4061
11 months ago

Can you pls share git repository

@manu7623
11 months ago

great video, thanks a lot!

@CoIdestMoments
11 months ago

starting the project, i like the tech stack used

@jaylee5252
11 months ago

First time watching your videos and subscribed, as great content. Thanks 🙂

@brancore765
11 months ago

Hey bud. Nice video. Can I use this Admin dashboard for any website?

@ahmedmusawir
11 months ago

why the fonts are so incredibly small? Have you done this for yourself or us? Truly idiotic!!

@user-kt4kc8ns5p
11 months ago

I was expecting you to mention how to setup MUI in the __app and __document

@tonybenci2796
11 months ago

For what it's worth (re: analytics and deleting things like page.module.css, error.ts etc.) I have found that you can battle with this for hours and finally just bite the bullet; stop the server, delete the .next folder and npx run dev again. This rebuilds the .next folder from scratch and all the headscratching and cursing disappears with a fresh build from the ground up.

@appliveinc
11 months ago

Excellent videos.
I watched a tons of React videos and so far, that's the one I liked the most. Espacially since you are using TS 🙂
I'm going to watched the second one now 🙂

@harisudarsan211
11 months ago

Hey man what os are you using

@thevictorwhyte
11 months ago

Analytics subroute worked for me. Great content!

@AirdropsWhitelistHub
11 months ago

Thanks!

@RiteshKC-tn4cq
11 months ago

hey, mine gave no problem with analytics. thanks for this series

@marcegger7411
11 months ago

instant subbed. You're such a cool guy!

@MTFights
11 months ago

great work

@LeonardoMorales08
11 months ago

Excellent project setup! Thanks
Hoping it will be a great project for those of us who are starting in web development.