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!
Second Part
can u create same in nuxt 3?
Please use Typescript, Express, Prisma and Postgresql on backend
Please complete backed with express mongobd and node
1:13:09 if your calendar shows a translation error insert the tag locale="en" <Calendar onChange={onChange} value={value} locale="en" />
wow , like and sub , thanks
We still waiting for the backend
Looks good! Backend: Nextjs, Drizzle, Neon, Authjs.
When be next tutorial ?
Nice Job Boss, please how much of a coffee do I need to buy before this could be completed?😀
First 52 minutes done. Very nice! A clear step by step guidance. Great job!
backend mongo db
very nice greate project plz uplode its backend part
Happy teachers day sir❤❤❤❤❤
Yess waiting for the backend……please can you consider using microservice architecture if it is possible
Thank you, brother. You are amazing to show it all of us for free. God bless you.
egarly waiting for the backend videooooooooooooooooooooo
Backend would be nice with Django
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.
Definitely, yes!! I need backend part