Documentation built by Developers
Each element is well presented in very complex documentation.
You can read more about the documentation here.
The documentation for the Laravel JSON:API is hoster here.
Example Pages
If you want to get inspiration or just show something directly to your clients, you can jump-start your development with our pre-built example pages. You will be able to quickly set up the basic structure for your web project.
View example pages here.
HELPFUL LINKS
- View Github Repository
- Check FAQ Page
During the development of this dashboard, we have used many existing resources from awesome developers. We want to thank them for providing their tools open source:
- MUI - The React UI library for faster and easier web development.
- React ChartJS 2 - Simple yet flexible React charting for designers & developers.
- ChromaJS - A small-ish zero-dependency JavaScript library for all kinds of color conversions and color scales.
Let us know your thoughts below. And good luck with development!
If you want to get more features, go PRO with Material Dashboard 2 PRO React Laravel JSON:API.
- Versions
- Demo
- Quick Start
- Documentation
- Login
- Register
- Forgot Password
- Reset Password
- User Profile
- File Structure
- Browser Support
- Resources
- Reporting Issues
- Technical Support or Questions
- Licensing
- Useful Links
React + Laravel JSON:API | React + NodeJS |
---|---|
React |
---|
Register | Login | Dashboard |
---|---|---|
Forgot Password Page | Reset Password Page | Profile Page |
---|---|---|
The Laravel JSON:API backend project requires a working Apache/Nginx local environment with PHP, Composer and MySQL.
If you don't already have a local development environment, use one of the following links:
- Windows: How to install WAMP on Windows
- Linux & Mac: How to install LAMP on Linux & Mac
Install Composer: https://getcomposer.org/doc/00-intro.md
- Navigate in your Laravel API project folder:
cd your-laravel-json-api-project
- Install project dependencies:
composer install
- Create a new .env file:
cp .env.example .env
- Add your own database credentials in the .env file in DB_DATABASE, DB_USERNAME, DB_PASSWORD
- Create users table:
php artisan migrate --seed
- Generate application key:
php artisan key:generate
- Install Laravel Passport:
php artisan passport:install
and set in the .env file the CLIENT_ID and CLIENT_SECRET that you receive - Add your own mailtrap.io credentials in MAIL_USERNAME and MAIL_PASSWORD in the .env file
- Set up your api for the project
- Download and Install NodeJs LTS version from NodeJs Official Page.
- Navigate to the root ./ directory of the product and run
yarn install
ornpm install
to install our local dependencies. - Add in your projeact an .env file with the variables
REACT_APP_URL=your-react-project
REACT_APP_API_URL=the-path-of-the-api
REACT_APP_IS_DEMO=false
if you don't want any restrications and true in case you want to add restrictions
The documentation for the Material Dashboard is hosted at our website.
The documentation for the Laravel JSON:API is hoster here.
If a user is not logged in can access only the authentication pages: Login, Register and Forgot Password. By default, there [email protected] with password secret as credentials. For authentication context and protected routes were used to keep track of the state of the users. Axios together with an http service and helped by an auth service and crud service handled the requests. The /src/service keeps the logic of the services while /src/context has the logic for the different contexts used, including the authentication context.
In the /src/auth/login/index.js is the logic for logging in an existing user:
try {
const response = await AuthService.login(myData);
authContext.login(response.access_token, response.refresh_token);
} catch (res) {
if (res.hasOwnProperty("message")) {
setCredentialsError(res.message);
} else {
setCredentialsError(res.errors[0].detail);
}
}
It can be added a new user by registration. The user has a name, email, password and role that needs to be added. All the inputs are verified and validated. You can simply access the page with the Sign up button or adding /register in the url.
In the /src/auth/register/index.js is the logic for signing up a new user:
const response = await AuthService.register(myData);
authContext.login(response.access_token, response.refresh_token);
In case of forgetting its password, the user can go to a page where he adds the email of the account and an email will be send to that address to help with resetting the password. It can be accessed from the Login page by clicking the here button or by adding /forgot-password.
In the /src/auth/forgot-password/index.js is the logic for requesting a password reset:
try {
const response = await authService.forgotPassword(myData);
if (error === false) {
setNotification(true);
}
} catch (err) {
console.error(err);
return null;
}
For resetting the password, the user must acceess the url sent int the email. By adding the new password and the confirmation and then pressing the channge button the data of the account is updated. You can go back to login from the button in notification.
In the /src/auth/reset-password/index.js is the logic for resetting the password:
useEffect(() => {
// get the token and email sent in the url
const queryParams = new URLSearchParams(window.location.search);
setToken(queryParams.get("token"));
setEmail(queryParams.get("email"));
}, []);
From the sidenav, in the CRUDs section, or by adding /cruds/user-profile in the url, the User Profile is a dynamic page where the user can add details about him: profile image, name, email or change password. Validation is added for every input.
In the /src/services/auth-serivce you can find the routes sets for the request and in the /src/cruds/user-profile is the component for the editing the profile details.
getProfile = async() => {
const getProfile = 'me';
return await HttpService.get(getProfile);
}
updateProfile = async (newInfo) => {
const updateProfile = "me";
return await HttpService.patch(updateProfile, newInfo);
}
Within the download you'll find the following directories and files:
./src
âââ App.js
âââ assets
â âââ images
â â âââ apple-icon.png
â â âââ bg-profile.jpeg
â â âââ bg-reset-cover.jpeg
â â âââ bg-sign-in-basic.jpeg
â â âââ bg-sign-up-cover.jpeg
â â âââ bruce-mars.jpg
â â âââ favicon.png
â â âââ home-decor-1.jpg
â â âââ home-decor-2.jpg
â â âââ home-decor-3.jpg
â â âââ home-decor-4.jpeg
â â âââ icons
â â â âââ flags
â â â âââ AU.png
â â â âââ BR.png
â â â âââ DE.png
â â â âââ GB.png
â â â âââ US.png
â â âââ illustrations
â â â âââ pattern-tree.svg
â â âââ ivana-square.jpg
â â âââ kal-visuals-square.jpg
â â âââ logo-ct-dark.png
â â âââ logo-ct.png
â â âââ logos
â â â âââ gray-logos
â â â â âââ logo-coinbase.svg
â â â â âââ logo-nasa.svg
â â â â âââ logo-netflix.svg
â â â â âââ logo-pinterest.svg
â â â â âââ logo-spotify.svg
â â â â âââ logo-vodafone.svg
â â â âââ mastercard.png
â â â âââ visa.png
â â âââ marie.jpg
â â âââ small-logos
â â â âââ bootstrap.svg
â â â âââ creative-tim.svg
â â â âââ devto.svg
â â â âââ github.svg
â â â âââ google-webdev.svg
â â â âââ icon-bulb.svg
â â â âââ logo-asana.svg
â â â âââ logo-atlassian.svg
â â â âââ logo-invision.svg
â â â âââ logo-jira.svg
â â â âââ logo-slack.svg
â â â âââ logo-spotify.svg
â â â âââ logo-xd.svg
â â âââ team-1.jpg
â â âââ team-2.jpg
â â âââ team-3.jpg
â â âââ team-4.jpg
â â âââ team-5.jpg
â âââ theme
â â âââ base
â â â âââ borders.js
â â â âââ boxShadows.js
â â â âââ breakpoints.js
â â â âââ colors.js
â â â âââ globals.js
â â â âââ typography.js
â â âââ components
â â â âââ appBar.js
â â â âââ avatar.js
â â â âââ breadcrumbs.js
â â â âââ button
â â â â âââ contained.js
â â â â âââ index.js
â â â â âââ outlined.js
â â â â âââ root.js
â â â â âââ text.js
â â â âââ buttonBase.js
â â â âââ card
â â â â âââ cardContent.js
â â â â âââ cardMedia.js
â â â â âââ index.js
â â â âââ container.js
â â â âââ dialog
â â â â âââ dialogActions.js
â â â â âââ dialogContent.js
â â â â âââ dialogContentText.js
â â â â âââ dialogTitle.js
â â â â âââ index.js
â â â âââ divider.js
â â â âââ flatpickr.js
â â â âââ form
â â â â âââ autocomplete.js
â â â â âââ checkbox.js
â â â â âââ formControlLabel.js
â â â â âââ formLabel.js
â â â â âââ input.js
â â â â âââ inputLabel.js
â â â â âââ inputOutlined.js
â â â â âââ radio.js
â â â â âââ select.js
â â â â âââ switchButton.js
â â â â âââ textField.js
â â â âââ iconButton.js
â â â âââ icon.js
â â â âââ linearProgress.js
â â â âââ link.js
â â â âââ list
â â â â âââ index.js
â â â â âââ listItem.js
â â â â âââ listItemText.js
â â â âââ menu
â â â â âââ index.js
â â â â âââ menuItem.js
â â â âââ popover.js
â â â âââ sidenav.js
â â â âââ slider.js
â â â âââ stepper
â â â â âââ index.js
â â â â âââ stepConnector.js
â â â â âââ stepIcon.js
â â â â âââ step.js
â â â â âââ stepLabel.js
â â â âââ svgIcon.js
â â â âââ table
â â â â âââ tableCell.js
â â â â âââ tableContainer.js
â â â â âââ tableHead.js
â â â âââ tabs
â â â â âââ index.js
â â â â âââ tab.js
â â â âââ tooltip.js
â â âââ functions
â â â âââ boxShadow.js
â â â âââ gradientChartLine.js
â â â âââ hexToRgb.js
â â â âââ linearGradient.js
â â â âââ pxToRem.js
â â â âââ rgba.js
â â âââ index.js
â â âââ theme-rtl.js
â âââ theme-dark
â âââ base
â â âââ borders.js
â â âââ boxShadows.js
â â âââ breakpoints.js
â â âââ colors.js
â â âââ globals.js
â â âââ typography.js
â âââ components
â â âââ appBar.js
â â âââ avatar.js
â â âââ breadcrumbs.js
â â âââ button
â â â âââ contained.js
â â â âââ index.js
â â â âââ outlined.js
â â â âââ root.js
â â â âââ text.js
â â âââ buttonBase.js
â â âââ card
â â â âââ cardContent.js
â â â âââ cardMedia.js
â â â âââ index.js
â â âââ container.js
â â âââ dialog
â â â âââ dialogActions.js
â â â âââ dialogContent.js
â â â âââ dialogContentText.js
â â â âââ dialogTitle.js
â â â âââ index.js
â â âââ divider.js
â â âââ form
â â â âââ autocomplete.js
â â â âââ checkbox.js
â â â âââ formControlLabel.js
â â â âââ formLabel.js
â â â âââ input.js
â â â âââ inputLabel.js
â â â âââ inputOutlined.js
â â â âââ radio.js
â â â âââ select.js
â â â âââ switchButton.js
â â â âââ textField.js
â â âââ iconButton.js
â â âââ icon.js
â â âââ linearProgress.js
â â âââ link.js
â â âââ list
â â â âââ index.js
â â â âââ listItem.js
â â â âââ listItemText.js
â â âââ menu
â â â âââ index.js
â â â âââ menuItem.js
â â âââ popover.js
â â âââ sidenav.js
â â âââ slider.js
â â âââ stepper
â â â âââ index.js
â â â âââ stepConnector.js
â â â âââ stepIcon.js
â â â âââ step.js
â â â âââ stepLabel.js
â â âââ svgIcon.js
â â âââ table
â â â âââ tableCell.js
â â â âââ tableContainer.js
â â â âââ tableHead.js
â â âââ tabs
â â â âââ index.js
â â â âââ tab.js
â â âââ tooltip.js
â âââ functions
â â âââ boxShadow.js
â â âââ gradientChartLine.js
â â âââ hexToRgb.js
â â âââ linearGradient.js
â â âââ pxToRem.js
â â âââ rgba.js
â âââ index.js
â âââ theme-rtl.js
âââ auth
â âââ forgot-password
â â âââ index.js
â âââ login
â â âââ index.js
â âââ register
â â âââ index.js
â âââ reset-password
â âââ index.js
âââ components
â âââ MDAlert
â â âââ index.js
â â âââ MDAlertCloseIcon.js
â â âââ MDAlertRoot.js
â âââ MDAvatar
â â âââ index.js
â â âââ MDAvatarRoot.js
â âââ MDBadge
â â âââ index.js
â â âââ MDBadgeRoot.js
â âââ MDBox
â â âââ index.js
â â âââ MDBoxRoot.js
â âââ MDButton
â â âââ index.js
â â âââ MDButtonRoot.js
â âââ MDInput
â â âââ index.js
â â âââ MDInputRoot.js
â âââ MDPagination
â â âââ index.js
â â âââ MDPaginationItemRoot.js
â âââ MDProgress
â â âââ index.js
â â âââ MDProgressRoot.js
â âââ MDSnackbar
â â âââ index.js
â â âââ MDSnackbarIconRoot.js
â âââ MDTypography
â âââ index.js
â âââ MDTypographyRoot.js
âââ context
â âââ index.js
âââ examples
â âââ Breadcrumbs
â â âââ index.js
â âââ Cards
â â âââ BlogCards
â â â âââ SimpleBlogCard
â â â âââ index.js
â â âââ InfoCards
â â â âââ DefaultInfoCard
â â â â âââ index.js
â â â âââ ProfileInfoCard
â â â âââ index.js
â â âââ MasterCard
â â â âââ index.js
â â âââ ProjectCards
â â â âââ DefaultProjectCard
â â â âââ index.js
â â âââ StatisticsCards
â â âââ ComplexStatisticsCard
â â âââ index.js
â âââ Charts
â â âââ BarCharts
â â â âââ HorizontalBarChart
â â â â âââ configs
â â â â â âââ index.js
â â â â âââ index.js
â â â âââ ReportsBarChart
â â â â âââ configs
â â â â â âââ index.js
â â â â âââ index.js
â â â âââ VerticalBarChart
â â â âââ configs
â â â â âââ index.js
â â â âââ index.js
â â âââ BubbleChart
â â â âââ configs
â â â â âââ index.js
â â â âââ index.js
â â âââ DoughnutCharts
â â â âââ DefaultDoughnutChart
â â â âââ configs
â â â â âââ index.js
â â â âââ index.js
â â âââ LineCharts
â â â âââ DefaultLineChart
â â â â âââ configs
â â â â â âââ index.js
â â â â âââ index.js
â â â âââ GradientLineChart
â â â â âââ configs
â â â â â âââ index.js
â â â â âââ index.js
â â â âââ ProgressLineChart
â â â â âââ config
â â â â â âââ index.js
â â â â âââ index.js
â â â âââ ReportsLineChart
â â â âââ configs
â â â â âââ index.js
â â â âââ index.js
â â âââ MixedChart
â â â âââ configs
â â â â âââ index.js
â â â âââ index.js
â â âââ PieChart
â â â âââ configs
â â â â âââ index.js
â â â âââ index.js
â â âââ PolarChart
â â â âââ configs
â â â â âââ index.js
â â â âââ index.js
â â âââ RadarChart
â â âââ configs
â â â âââ index.js
â â âââ index.js
â âââ Configurator
â â âââ ConfiguratorRoot.js
â â âââ index.js
â âââ Footer
â â âââ index.js
â âââ Items
â â âââ NotificationItem
â â âââ index.js
â â âââ styles.js
â âââ LayoutContainers
â â âââ DashboardLayout
â â â âââ index.js
â â âââ PageLayout
â â âââ index.js
â âââ Lists
â â âââ ProfilesList
â â âââ index.js
â âââ Navbars
â â âââ DashboardNavbar
â â â âââ index.js
â â â âââ styles.js
â â âââ DefaultNavbar
â â âââ DefaultNavbarLink.js
â â âââ DefaultNavbarMobile.js
â â âââ index.js
â âââ ProtectedRoute
â â âââ index.js
â âââ Sidenav
â â âââ index.js
â â âââ SidenavCollapse.js
â â âââ SidenavRoot.js
â â âââ styles
â â âââ sidenavCollapse.js
â â âââ sidenav.js
â âââ Tables
â â âââ DataTable
â â âââ DataTableBodyCell.js
â â âââ DataTableHeadCell.js
â â âââ index.js
â âââ Timeline
â âââ context
â â âââ index.js
â âââ TimelineItem
â â âââ index.js
â â âââ styles.js
â âââ TimelineList
â âââ index.js
âââ index.js
âââ layouts
â âââ authentication
â â âââ components
â â â âââ BasicLayout
â â â â âââ index.js
â â â âââ CoverLayout
â â â â âââ index.js
â â â âââ Footer
â â â âââ index.js
â â âââ reset-password
â â â âââ cover
â â â âââ index.js
â â âââ sign-in
â â â âââ index.js
â â âââ sign-up
â â âââ index.js
â âââ billing
â â âââ components
â â â âââ Bill
â â â â âââ index.js
â â â âââ BillingInformation
â â â â âââ index.js
â â â âââ Invoice
â â â â âââ index.js
â â â âââ Invoices
â â â â âââ index.js
â â â âââ PaymentMethod
â â â â âââ index.js
â â â âââ Transaction
â â â â âââ index.js
â â â âââ Transactions
â â â âââ index.js
â â âââ index.js
â âââ dashboard
â â âââ components
â â â âââ OrdersOverview
â â â â âââ index.js
â â â âââ Projects
â â â âââ data
â â â â âââ index.js
â â â âââ index.js
â â âââ data
â â â âââ reportsBarChartData.js
â â â âââ reportsLineChartData.js
â â âââ index.js
â âââ notifications
â â âââ index.js
â âââ profile
â â âââ components
â â â âââ Header
â â â â âââ index.js
â â â âââ PlatformSettings
â â â âââ index.js
â â âââ data
â â â âââ profilesListData.js
â â âââ index.js
â âââ rtl
â â âââ components
â â â âââ OrdersOverview
â â â â âââ index.js
â â â âââ Projects
â â â âââ data
â â â â âââ index.js
â â â âââ index.js
â â âââ data
â â â âââ reportsBarChartData.js
â â â âââ reportsLineChartData.js
â â âââ index.js
â âââ tables
â â âââ data
â â â âââ authorsTableData.js
â â â âââ projectsTableData.js
â â âââ index.js
â âââ user-management
â â âââ data.js
â â âââ index.js
â âââ user-profile
â âââ Header
â â âââ index.js
â âââ index.js
â âââ PlatformSettings
â âââ index.js
âââ routes.js
âââ services
âââ auth-service.js
âââ htttp.service.js
âââ interceptor.js
At present, we officially aim to support the last two versions of the following browsers:
- Live Preview
- Download Page
- Documentation is here
- License Agreement
- Support
- Issues: Github Issues Page
We use GitHub Issues as the official bug tracker for the Material Dashboard React. Here are some advices for our users that want to report an issue:
- Make sure that you are using the latest version of the Material Dashboard React. Check the CHANGELOG from your dashboard on our website.
- Providing us reproducible steps for the issue will shorten the time it takes for it to be fixed.
- Some issues may be browser specific, so specifying in what browser you encountered the issue might help.
If you have questions or need help integrating the product please contact us instead of opening an issue.
- Copyright 2021 Creative Tim
- Creative Tim license
-
More products from Creative Tim
-
Freebies from Creative Tim
-
Affiliate Program (earn money)
Twitter: https://twitter.com/CreativeTim?ref=mdl-readme
Facebook: https://www.facebook.com/CreativeTim?ref=mdl-readme
Dribbble: https://dribbble.com/creativetim?ref=mdl-readme
Instagram: https://www.instagram.com/CreativeTimOfficial?ref=mdl-readme
Twitter: https://twitter.com/updivision?ref=mdl-readme
Facebook: https://www.facebook.com/updivision?ref=mdl-readme
Linkedin: https://www.linkedin.com/company/updivision?ref=mdl-readme
Updivision Blog: https://updivision.com/blog/?ref=mdl-readme