Folder Structure

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 page page-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.


_187
onion-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