Tutorial on designing a School Management Dashboard UI using Next.js and React: Responsive Admin Dashboard

Posted by


In this tutorial, we will be creating a School Management Dashboard UI using Next.js, a popular React framework, to build a modern and responsive admin dashboard for managing school-related data.

Step 1: Setting up the project

To start, make sure you have Node.js installed on your system. If you haven’t already, you can download it from the official website https://nodejs.org/. Once Node.js is installed, open up your command line or terminal and create a new Next.js project by running the following commands:

npx create-next-app school-management-dashboard
cd school-management-dashboard
npm run dev

This will create a new Next.js project and start a development server. You can navigate to http://localhost:3000 in your browser to see the default Next.js homepage.

Step 2: Installing dependencies and setting up the project structure

Next, we’ll install some necessary dependencies for our project. Run the following command in your project directory:

npm install @chakra-ui/react @emotion/react @emotion/styled framer-motion @fortawesome/react-fontawesome @fortawesome/free-solid-svg-icons

These dependencies include Chakra UI for building UI components, Emotion for styling, Framer Motion for animations, and Font Awesome for icons.

Next, create a new components folder in your project directory and add the following files: Sidebar.js, Navbar.js, Layout.js, Overview.js, Students.js, Teachers.js, Courses.js, Settings.js, Login.js, and Signup.js.

Step 3: Building the Sidebar and Navbar components

In the Sidebar.js file, add the following code to create the sidebar navigation:

import { Box, Text, VStack } from '@chakra-ui/react';
import { FaUserGraduate, FaChalkboardTeacher } from '@fortawesome/free-solid-svg-icons';

const Sidebar = () => {
  return (
    <Box w="250px" h="100vh" bg="gray.900">
      <VStack spacing={4} p={4}>
        <Text fontSize="lg" fontWeight="bold" color="white">Menu</Text>
        <Text color="white" cursor="pointer"><FaUserGraduate /> Students</Text>
        <Text color="white" cursor="pointer"><FaChalkboardTeacher /> Teachers</Text>
      </VStack>
    </Box>
  );
}

export default Sidebar;

In the Navbar.js file, add the following code to create the navigation bar:

import { Box, Flex, Heading } from '@chakra-ui/react';

const Navbar = () => {
  return (
    <Flex justify="space-between" align="center" bg="gray.800" p={4} mb={4}>
      <Heading color="white">School Management Dashboard</Heading>
    </Flex>
  );
}

export default Navbar;

Step 4: Creating the layout and main content components

In the Layout.js file, add the following code to create the layout component that includes the sidebar and navbar:

import { Box, Flex } from '@chakra-ui/react';
import Navbar from './Navbar';
import Sidebar from './Sidebar';

const Layout = ({ children }) => {
  return (
    <Flex>
      <Sidebar />
      <Box>
        <Navbar />
        <Box p={4}>
          {children}
        </Box>
      </Box>
    </Flex>
  );
}

export default Layout;

Step 5: Creating the dashboard pages

In the Overview.js, Students.js, Teachers.js, Courses.js, Settings.js, Login.js, and Signup.js files, add the following code to create the content for each page:

import { Box, Heading } from '@chakra-ui/react';

const Overview = () => {
  return (
    <Box>
      <Heading>Overview</Heading>
      // Add your content here
    </Box>
  );
}

export default Overview;

Step 6: Routing and displaying the dashboard pages

In the index.js file in your project directory, update the code to include the routing and display the dashboard pages:

import Layout from '../components/Layout';
import Overview from '../components/Overview';
import Students from '../components/Students';
import Teachers from '../components/Teachers';
import Courses from '../components/Courses';
import Settings from '../components/Settings';

const Home = () => {
  return (
    <Layout>
      <Overview />
      <Students />
      <Teachers />
      <Courses />
      <Settings />
    </Layout>
  );
}

export default Home;

Step 7: Styling and adding functionality

Finally, you can style your components using Chakra UI’s built-in components and styles. You can also add functionality such as fetching data from an API or adding forms for user interaction.

And that’s it! You’ve successfully created a School Management Dashboard UI using Next.js. Customize and enhance your dashboard further by adding more functionality and features to suit your needs. Happy coding!

0 0 votes
Article Rating
32 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
@LearnWithMianG
2 months ago

Second Part

@bikashbhandari5608
2 months ago

can u create same in nuxt 3?

@RakibulIslam-kw8xz
2 months ago

Please use Typescript, Express, Prisma and Postgresql on backend

@saidurrahman4139
2 months ago

Please complete backed with express mongobd and node

@trezentosfull
2 months ago

1:13:09 if your calendar shows a translation error insert the tag locale="en" <Calendar onChange={onChange} value={value} locale="en" />

@FrancoBarrera-nv4rt
2 months ago

wow , like and sub , thanks

@PrincewillOgechi-jj7uc
2 months ago

We still waiting for the backend

@Louis.Coetzee
2 months ago

Looks good! Backend: Nextjs, Drizzle, Neon, Authjs.

@anthonyfink633
2 months ago

When be next tutorial ?

@yaqubadesola1839
2 months ago

Nice Job Boss, please how much of a coffee do I need to buy before this could be completed?😀

@Cognixor
2 months ago

First 52 minutes done. Very nice! A clear step by step guidance. Great job!

@zeshanabduljabbar3671
2 months ago

backend mongo db

@zeshanabduljabbar3671
2 months ago

very nice greate project plz uplode its backend part

@rakeshroy1633
2 months ago

Happy teachers day sir❤❤❤❤❤

@vvs9679
2 months ago

Yess waiting for the backend……please can you consider using microservice architecture if it is possible

@mranderson3441
2 months ago

Thank you, brother. You are amazing to show it all of us for free. God bless you.

@FahadIslam-te8tk
2 months ago

egarly waiting for the backend videooooooooooooooooooooo

@iamgarriTech
2 months ago

Backend would be nice with Django

@francescorusso8149
2 months ago

Great video, easy to follow and very complete! 👍
For the backend, I'd like to see a NestJS + Drizzle + PostgreSQL (maybe from Neon?) combo, with Lucia-Auth or Next-Auth as the authentication solution.
I'd rather not see Appwrite or Convex because other channels already do that and those solutions are kind of a black box. I'd like to see the internals when it comes to authentication and data storage in DBs.

@user-th5gq3ez8b
2 months ago

Definitely, yes!! I need backend part