Folder structure
Finding what you need is made simpler by a clear and simple folder structure. The folder structure can be found in the directory
onion-dashboard/
-
pulic/
: Get all static files, such as JPGs, PNGs SVGs, and PDFs, inside of this folder. -
src/__fakeData__/
: Get all of the project's data, including the users, products, and invoice table data, that are stored in this folder. -
src/components/
: On the entire project, we wrote a lot of reusable components. From this folder, all reusable components were taken. -
src/contexts/
: All global contexts exist in this folder such as settingsContext (for site settings), jwtContext (for authentication). -
src/hooks/
: From this folder, all global hooks are located. such as useSettings (for site settings) and useAuth (for authentication). -
src/icons/
: Many icon components were used throughout the entire project. This folder contains all of the icon components. -
src/layouts/
: On the entire project, two layouts were used: one was the main layout (all public pages), and the other was the dashboard layout (pages related to the dashboard). -
src/page-sections/
: There were more than 50 pages total in the project, and inside each page's section (components, styled components, and hooks) were pre-existing and based on the page name. As example, for profile pagepage-sections/profile/
-
src/pages/
: The project included more than 50 pages in total; all of the pages' files were collected in this folder. -
src/routes/
: Only React projects that need a routing system have a routes folder. Get from here for all route configurations. -
src/theme/
: The project theme setup, theme options, and mui override components are located from here. -
src/utils/
: A few unique, reusable Utlis methods that were all obtained from this folder were used throughout the entire project.
_187onion-dashboard/_187├── public/_187| ├── static/_187| | ├── avatar_187| | ├── browser_187| | ├── files-icon_187| | ├── illustration_187| | ├── payment_187| | ├── products_187| | ├── some more folders_187| └── and some files_187| |_187├── src/_187| ├── __fakeData__/_187| | ├── admin/_187| | ├ └── worldMap.json_187| | ├── chats.js_187| | ├── data-tables.js_187| | ├── invoices.js_187| | ├── products.js_187| | ├── users.js_187| |_187| ├── components/_187| | ├── auth_187| | ├ ├── index.js_187| | ├ ├── AuthGuard.jsx_187| | ├ ├── GuestGuard.jsx_187| | ├ └── RoleBasedGuard.jsx_187| | ├── avatar-badge_187| | ├ ├── index.js_187| | ├ └── AvatarBadge.jsx_187| | ├── avatar-loading_187| | ├ ├── index.js_187| | ├ └── AvatarLoading.jsx_187| | ├── block_187| | ├ ├── index.js_187| | ├ └── Block.jsx_187| | ├── carousel_187| | ├ ├── index.js_187| | ├ └── Carousel.jsx_187| | └── few more folders_187| |_187| ├── contexts/_187| | ├── amplifyContext.js_187| | ├── auth0Context.js_187| | ├── firebaseContext.js_187| | ├── jwtContext.js_187| | ├── settingsContext.js_187| |_187| ├── hooks/_187| | ├── useAuth.js_187| | ├── useLocalStorage.js_187| | ├── useMuiTable.js_187| | ├── useSettings.js_187| |_187| ├── icons/_187| | ├── Add.jsx_187| | ├── Apps.jsx_187| | ├── Birthday.jsx_187| | ├── Call.jsx_187| | ├── some more jsx files_187| |_187| ├── layouts/_187| | ├── layouts-parts/_187| | | ├── popovers/_187| | | └── styles/_187| | |_187| | | ├── LayoutBodyWrapper.jsx_187| | | ├── LayoutDrawer.jsx_187| | | ├── navigation.jsx_187| | | ├── SearchBar.js_187| | | └── UserAccount.js_187| | |_187| | ├── dashboard/_187| | | └── context/_187| | | | ├── useLayout.jsx_187| | | | ├── layoutContext.jsx_187| | | |_187| | | ├── DashboardHeader.jsx_187| | | ├── DashboardLayout.jsx_187| | | ├── DashboardSidebar.jsx_187| | | ├── MobileSidebar.jsx_187| | | ├── MultiLevelMenu.jsx_187| | | └── SidebarAccordion.jsx_187| | |_187| | ├── main/_187| | | └── menu/_187| | | | ├── MegaMenu.jsx_187| | | | ├── MegaMenuList.jsx_187| | | |_187| | | ├── Footer.jsx_187| | | ├── Header.jsx_187| | | ├── MainLayout.jsx_187| |_187| ├── page-sections/_187| | ├── about-us/_187| | ├── accounts/_187| | ├── career/_187| | ├── chat/_187| | ├── checkout/_187| | ├── coming-soon/_187| | ├── contact-us/_187| | ├── dashboards/_187| | ├── data-tables/_187| | ├── ecommerce/_187| | ├── email/_187| | ├── error/_187| | ├── products/_187| | ├── sessions/_187| | ├── more folders based on the names of the pages_187| |_187| ├── pages/_187| | ├── about-us/_187| | | ├── about-us-1.jsx_187| | | ├── about-us-2.jsx_187| | |_187| | ├── career/_187| | | ├── apply.jsx_187| | | ├── career-1.jsx_187| | | ├── career-2.jsx_187| | |_187| | ├── dashboard/_187| | | ├── users/_187| | | | ├── add-new-user.jsx_187| | | | ├── user-list-1.jsx_187| | | | ├── user-list-2.jsx_187| | | | ├── user-grid-1.jsx_187| | | | ├── user-grid-2.jsx_187| | | |_187| | | ├── products/_187| | | | ├── create.jsx_187| | | | ├── details.jsx_187| | | | ├── grid.jsx_187| | | | ├── list.jsx_187| | | |_187| | | ├── more folders based on the names of the dashboard pages_187| | | |_187| | | ├── analytics.jsx_187| | | ├── analytics-v2.jsx_187| | | ├── crm.jsx_187| | | ├── ecommerce.jsx_187| | | ├── finance.jsx_187| | | ├── finance-v2.jsx_187| | | ├── logistics.jsx_187| | | ├── marketing.jsx_187| | |_187| | ├── 404.jsx_187| | ├── checkout.jsx_187| | ├── coming-soon.jsx_187| | ├── contact-us.jsx_187| | ├── faq.jsx_187| | ├── maintennance.jsx_187| | ├── permission.jsx_187| | ├── pricing.jsx_187| |_187| ├── routes/_187| | ├── auth.jsx_187| | ├── components.jsx_187| | ├── dashboard.jsx_187| | ├── public.jsx_187| | ├── index.jsx_187| |_187| ├── theme/_187| | ├── components/_187| | | ├── accordion.js_187| | | ├── alert.js_187| | | ├── avatar.js_187| | | ├── button.js_187| | | ├── some more files_187| | |_187| | ├── colors.js_187| | ├── index.js_187| | ├── shadows.js_187| | └── themeOptions.js_187| |_187| ├── utils/_187| | ├── baseChartOptions.js_187| | ├── constant.js_187| | ├── currency.js_187| | ├── numberFormat.js_187| |_187| ├── App.jsx_187| ├── i18n.js_187| ├── index.js_187| ├── routes.js_187| |_187└── README.md