A modern, fully-featured, and customizable admin dashboard built with React, Material-UI, Nivo charts, and more. This project is designed for learning, rapid prototyping, and real-world admin panel use cases.
- Project Overview
- Features
- Tech Stack
- Project Structure
- Getting Started
- Available Scripts
- Component Walkthrough
- Pages & Routes
- Customization & Theming
- Reusing Components
- Example Usage
- Keywords
- Conclusion
- Happy Coding! π
A modern, fully featured, customizable admin panel/dashboard provides a robust foundation for building data-driven applications built with React, Material-UI, Nivo, Pie, Line, geography charts. It features a responsive sidebar, topbar, multiple data visualization charts, data grids, forms, file export, calendar, user/employee management, and more. The project demonstrates best practices in React, state management, theming, and component reuse.
- Responsive sidebar navigation with collapse/expand
- Dashboard with summary stats and charts
- Team management with data grid
- Contacts and invoices tables
- Profile form and calendar
- FAQ accordion
- Multiple chart types (Bar, Line, Pie, Geography) using Nivo
- Light/dark theme toggle
- Context-based sidebar state
- Fully customizable and extendable
- React (v18+)
- Material-UI (MUI v5)
- Nivo (charts)
- react-pro-sidebar (sidebar navigation)
- react-router-dom (routing)
- Formik & Yup (forms and validation)
- FullCalendar (calendar)
- @mui/x-data-grid (data tables)
- Custom theming (context, tokens)
- Mock data for demonstration
admin-dashboard/
βββ public/
β βββ index.html
β βββ favicon.ico
β βββ assets/
β βββ user.png
βββ src/
β βββ App.js
β βββ index.js
β βββ index.css
β βββ theme.js
β βββ components/
β β βββ Header.jsx
β β βββ StatBox.jsx
β β βββ ProgressCircle.jsx
β β βββ LineChart.jsx
β β βββ BarChart.jsx
β β βββ PieChart.jsx
β β βββ GeographyChart.jsx
β βββ data/
β β βββ mockData.js
β β βββ mockGeoFeatures.js
β βββ scenes/
β βββ global/
β β βββ Sidebar.jsx
β β βββ SidebarContext.js
β β βββ Topbar.jsx
β βββ dashboard/
β β βββ index.jsx
β βββ team/
β β βββ index.jsx
β βββ contacts/
β β βββ index.jsx
β βββ invoices/
β β βββ index.jsx
β βββ form/
β β βββ index.jsx
β βββ calendar/
β β βββ calendar.jsx
β βββ faq/
β β βββ index.jsx
β βββ bar/
β β βββ index.jsx
β βββ pie/
β β βββ index.jsx
β βββ line/
β β βββ index.jsx
β βββ geography/
β βββ index.jsx
βββ package.json
βββ README.md
- Node.js (v16+ recommended)
- npm or yarn
git clone https://github.com/your-username/admin-dashboard.git
cd admin-dashboard
npm install
# or
yarn install
npm start
# or
yarn start
The app will run at http://localhost:3000.
npm start
β Runs the app in development mode.npm run build
β Builds the app for production.npm test
β Runs tests (if any are defined).
- Sidebar.jsx: Responsive navigation with collapse/expand, user profile, and menu items. Uses
react-pro-sidebar
and Material-UI for styling. The sidebar state is managed via React context (SidebarContext.js
). - Topbar.jsx: Contains theme toggle and user actions. Uses Material-UI icons and context for theme switching.
- Dashboard/index.jsx: Main landing page with summary stats, charts, and recent transactions. Uses
StatBox
,ProgressCircle
, and chart components for a rich overview.
- Team, Contacts, Invoices: Use MUI DataGrid for tabular data, sorting, and filtering. Data is provided via mock data files for demonstration.
- BarChart, LineChart, PieChart, GeographyChart: Nivo-powered, theme-aware, and reusable. Each chart component receives props for dashboard or standalone use, and is styled to match the current theme.
- Form: Profile form with Formik/Yup validation, demonstrating controlled forms and validation.
- Calendar: Interactive calendar with event management, using FullCalendar and plugins for day, week, and list views.
- FAQ: Accordion-based FAQ section using Material-UI's Accordion components.
Route | Component | Description |
---|---|---|
/ |
Dashboard | Main dashboard overview |
/team |
Team | Team management grid |
/contacts |
Contacts | Contacts data grid |
/invoices |
Invoices | Invoices data grid |
/form |
Form | Profile form |
/calendar |
Calendar | Full-featured calendar |
/faq |
FAQ | FAQ accordion |
/bar |
Bar | Bar chart visualization |
/pie |
Pie | Pie chart visualization |
/line |
Line | Line chart visualization |
/geography |
Geography | Geography/choropleth chart |
- Theme is managed via
theme.js
and Material-UI's ThemeProvider. Thetokens
function provides color palettes for light and dark modes. - Light/dark mode toggle is available in the topbar and is managed via React context (
ColorModeContext
). - All components use theme tokens for consistent styling and easy customization.
All components are modular and can be reused in other projects:
- Charts: Import any chart component and pass your own data/props. Example:
import BarChart from './components/BarChart';
<BarChart isDashboard={false} />
- StatBox, ProgressCircle, Header: Use for summary stats, progress indicators, and section headers. Example:
import StatBox from './components/StatBox';
<StatBox
title="1,000"
subtitle="New Users"
progress="0.8"
increase="+20%"
icon={<YourIcon />}
/>
- Sidebar/Topbar: Adapt for your own navigation needs. The sidebar is context-aware and can be collapsed/expanded from anywhere in the app.
To add a new page:
- Create a new folder and
index.jsx
insrc/scenes/yourpage/
. - Add a route in
App.js
:
<Route path="/yourpage" element={<YourPage />} />
- Add a menu item in
Sidebar.jsx
:
<Item title="Your Page" to="/yourpage" icon={<YourIcon />} ... />
- App.js: The root component. Sets up theme, context, sidebar state, and routes. Example:
<ColorModeContext.Provider value={colorMode}>
<ThemeProvider theme={theme}>
<CssBaseline />
<SidebarContext.Provider value={{ isCollapsed, setIsCollapsed }}>
<div className="app">
<Sidebar />
<main className="content">
<Topbar />
<Routes>
{/* ...routes... */}
</Routes>
</main>
</div>
</SidebarContext.Provider>
</ThemeProvider>
</ColorModeContext.Provider>
-
Sidebar.jsx: Uses
react-pro-sidebar
for navigation. TheItem
component is used for each menu entry. The sidebar can be collapsed/expanded, and the selected menu is highlighted. -
theme.js: Exports color tokens and theme configuration. The
tokens
function provides a palette for both light and dark modes, and the theme is created using Material-UI'screateTheme
. -
Charts: All chart components use Nivo's responsive chart components and are styled with the current theme. Example for
LineChart.jsx
:
<ResponsiveLine
data={data}
theme={{
axis: { /* ... */ },
legends: { /* ... */ },
tooltip: { /* ... */ },
}}
colors={isDashboard ? { datum: "color" } : { scheme: "nivo" }}
/* ...other props... */
/>
-
Context: Sidebar and theme state are managed via React context, making it easy to access and update from any component.
-
Data: All data is mocked for demonstration and can be replaced with real API calls as needed.
React, Admin Dashboard, Material-UI, Nivo, DataGrid, Sidebar, Theming, Charts, Responsive, Context, Formik, FullCalendar, Data Visualization, SPA, Modern UI, Reusable Components, Learning, Boilerplate
This project is a complete, modern admin dashboard template and learning resource. It demonstrates best practices in React, theming, component design, and dashboard UX. Use it as a starting point for your own admin panels or as a reference for learning advanced React patterns.
Feel free to use this project repository and extend this project further!
If you have any questions or want to share your work, reach out via GitHub or my portfolio at https://arnob-mahmud.vercel.app/.
Enjoy building and learning! π
Thank you! π