– Built with React 19.2.7 + TypeScript
– Vite 8 build tooling
– React Router v7 with lazy-loaded routes
– Redux Toolkit state management
– Tailwind CSS v4 (CSS-first config)
– Ant Design v6 component library
– 6 layout variants (default, mini, hoverview, hidden, full-width, RTL)
– Light & dark mode
– Fully Responsive Design
– 200+ prebuilt pages across CRM, HRM, Finance, Inventory, Projects, Sales, Purchase, POS
– ApexCharts, Chart.js & ECharts
– Self-hosted icon webfonts
– React Compiler enabled
– Compatible Browsers: Firefox, Safari, Opera, Edge, Chrome
– Easy to Customize with css Variables
Project Overview
The project follows a modular structure with clear separation of concerns.
react/
├── public/
│ ├── assets/img/ # avatar, card, icons, product, logo.svg, logo-small.svg, logo-white.svg
│ ├── apple-icon.png
│ └── favicon.png
├── src/
│ ├── components/ # 16 shared components
│ ├── core/data/ # interface.ts - shared TS types
│ ├── hooks/ # useDebouncedValue, useTagInput
│ ├── layout/ # authLayout, publicLayout, posLayout, layoutVariantWrapper
│ ├── providers/ # LayoutSync.tsx - single DOM writer for theme/layout
│ ├── redux/ # store.ts, hooks.ts, slices/layoutSlice.ts
│ ├── routes/ # all_routes, router, router.link, lazyRoute, dynamicTitle
│ ├── style/
│ │ ├── css/style.css # theme tokens + Tailwind entry
│ │ └── icons/ # self-hosted icon webfonts
│ ├── utils/json/ # commonSelectOption, sidebarMenu
│ ├── views/ # page modules
│ ├── environment.tsx
│ ├── index.css
│ └── main.tsx
├── eslint.config.js
├── index.html
├── package.json
├── tailwind.config.js
├── tsconfig.json
└── vite.config.ts
Shared Components (src/components/)
breadcrumb, common-date-picker, common-date-range-picker, common-footer, common-header, common-lightbox, common-select, common-sidebar, common-tag-input, data-table, image-with-base-path, multiple-Select, password-input, preview-code-toggle, skeleton, text-editor
Page Modules (src/views/)
assets, auth-pages, blank-page, crm, documents, finance, hrm, inventory, main-pages, membership, pos, projects, purchase, sales, support, system, ui-interface
Structure Overview
Dreams ERP React uses React Router v7, lazy-loaded pages, and shared layouts to keep the app scalable and maintainable.
The app entry in src/main.tsx wraps the routes with the Redux Provider and BrowserRouter, then mounts the layout sync helper.
Below is the React app entry:
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import { Provider } from "react-redux";
import ALLRoutes from "./routes/router";
import DynamicTitle from "./routes/dynamicTitle";
import LayoutSync from "./providers/LayoutSync";
import { store } from "./redux/store";
import { BrowserRouter } from "react-router-dom";
import { base_path } from "./environment";
import "./style/icons/@phosphor-icons/web/duotone/style.css";
import "./style/icons/@phosphor-icons/web/regular/style.css";
import "./style/icons/@phosphor-icons/web/fill/style.css";
import "./style/icons/lucide-static/font/lucide.css";
import "./style/icons/@fortawesome/fontawesome-free/css/fontawesome.min.css";
import "./style/icons/@fortawesome/fontawesome-free/css/all.min.css";
import "./style/css/style.css";
import "./index.css";
import "preline";
createRoot(document.getElementById("root")!).render(
<StrictMode>
<Provider store={store}>
<BrowserRouter basename={base_path}>
<LayoutSync />
<ALLRoutes />
<DynamicTitle />
</BrowserRouter>
</Provider>
</StrictMode>,
);
Routing
Routing is handled by react-router-dom v7. The basename comes from base_path in src/environment.tsx.
src/routes/all_routes.tsx– central map of path constants used across the app.src/routes/router.link.tsx– exportspublicRoutes,authRoutes,posPageandlayoutDemoRoutes. Around 222 entries, each shaped{ id, path, element, route, meta_title }.src/routes/router.tsx– nestspublicRoutesunderPublicLayout,authRoutesunderAuthLayoutandposPageunderPosLayout.layoutDemoRoutesrender bare, because they bring their own shell.src/routes/lazyRoute.tsx–React.lazy+Suspensewith aPageSkeletonfallback. It re-runsHSStaticMethods.autoInit()after each lazy page mounts, because Preline needs re-initialising on route change.src/routes/dynamicTitle.tsx– setsdocument.titlefrom each route'smeta_title.
The import() literal must stay inline at each call site in router.link.tsx. Extracting it into a variable breaks Vite's static analysis and therefore code-splitting.
Prerequisites
Node.js and NPM :
Ensure that Node.js is installed and running on your system.
https://nodejs.org/en/download/
Package Manager
Use npm (recommended with this project lockfile) or Yarn if preferred.
npm -v
Vite
Vite is used as the build tool. It is installed automatically as a project dependency – no global installation required.
https://vite.dev/
Installation Steps
Extract & Navigate
After downloading, extract the Dreams ERP package and navigate to the react directory.
Install Dependencies
npm install
Before proceeding you'll need to install npm packages. You can do this by running npm install from the root of your project to install all the necessary dependencies.
Start Development Server
npm run dev
For running a project, run the command
Open in Browser
Open your browser at http://localhost:5173/react. Vite serves on its default port 5173, and the /react path comes from base: "/react" in vite.config.ts.
Build for Production
npm run build
This runs tsc -b && vite build and outputs the production bundle to the dist/ directory. Use npm run preview to serve that build locally before deploying.
Because base is set to /react, the built app expects to be served under a /react path. Change base in vite.config.ts if you deploy at the domain root.
CSS-first configuration
This project uses Tailwind CSS v4.3.2, which is configured in CSS rather than JavaScript. There is no content array – the @source directive replaces it. Tailwind is wired in through the @tailwindcss/vite plugin in vite.config.ts.
All configuration lives at the top of src/style/css/style.css:
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@100..900&display=swap');
/* 1. ALL @imports must be at the very top */
@import "tailwindcss";
@import "../../../node_modules/preline/variants.css";
/* 2. Then @plugin and @source */
@plugin "@tailwindcss/forms";
@source "../../../node_modules/preline/dist/*.js";
/* 3. Then @layer and @custom-variant */
@layer theme, base, components, pages, utilities;
@custom-variant dark (&:where([data-theme="dark"], [data-theme="dark"] *));
What each directive does
@source– tells Tailwind which extra files to scan for class names. It replaces thecontentarray from v3.@plugin "@tailwindcss/forms"– better default styling for form elements.@import "preline/variants.css"– Preline v4 supplies the headless JavaScript behaviour for dropdowns, overlays and tabs.@custom-variant dark– makes everydark:utility key off thedata-themeattribute.
A tailwind.config.js file still exists at the react/ root, but it is vestigial legacy under the v4 CSS-first setup. Edit src/style/css/style.css instead.
You can easily update the logo in two ways:
Option 1: Overwrite Logo Image Files (Recommended)
Directly replace the default SVG logo files in the public/assets/img/ directory with your own logos using the same file names:
logo.svg: Main logo (shown in light mode).logo-small.svg: Small square logo (shown when sidebar is collapsed/minimized).logo-white.svg: White text logo (shown in dark mode).
Option 2: Update the React Components
If you want to use different names or paths, open src/components/common-header/ and src/components/common-sidebar/, then search for the logo tags and modify their src attribute.
About image paths
Images are rendered through the shared src/components/image-with-base-path/ component. It prefixes image_path from src/environment.tsx onto every image URL, which is why asset paths resolve correctly under /react/.
The default typography font for the template is Geist. If you want to change it to another Google font (like Inter or Roboto):
Open the style file src/style/css/style.css and update the @import statement at the top of the file as well as the primary font variable in the @theme configuration block:
/* 1. Import the new Google Font at the very top of style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');
/* 2. Update the variable inside the @theme block */
@theme {
--font-family-primary: "Inter", sans-serif;
}
All theme colors are defined as design tokens under the @theme directive in your src/style/css/style.css file. These variables control the look and feel of components:
@theme {
--font-family-primary: "Geist", sans-serif;
--color-primary: #0F766E; /* primary color */
--color-secondary: #2563EB; /* secondary color */
--color-dark: #1E293B; /* dark surfaces */
/* System Colors */
--color-success: #059669; /* success states */
--color-warning: #D97706; /* warnings */
--color-danger: #B91C1C; /* error states */
--color-info: #0EA5E9; /* informational */
}
The same block also defines the primary shades --color-primary-100 through --color-primary-900, plus --color-primary-hover, so you can tune hover and accent states without touching component code.
Changing Element Colors
You can customize the color of any element by editing its class or variable assignment in the CSS file. For example, changing the header topbar background color:
.navbar-header {
@apply bg-(--topbar-bg);
}
How it Works
Dark mode state is managed in Redux and persisted to localStorage under the key dt-theme. A sync component writes the current theme to a data-theme attribute on the <html> element, which a Tailwind custom variant reads to apply dark: utility classes.
src/redux/slices/layoutSlice.ts holds the theme, initialised from localStorage and flipped via toggleTheme():
export const THEME_KEY = "dt-theme";
export type Theme = "light" | "dark";
const initialState: LayoutState = {
theme: (localStorage.getItem(THEME_KEY) as Theme | null) === "dark" ? "dark" : "light",
// ...
};
// toggleTheme() flips state.theme and writes it back to localStorage
src/providers/LayoutSync.tsx is the single bridge that writes the attribute to the DOM whenever the Redux state changes:
document.documentElement.setAttribute("data-theme", layout.theme);
In src/style/css/style.css, a custom Tailwind variant reacts to that attribute so any dark: utility applies automatically:
@custom-variant dark (&:where([data-theme="dark"], [data-theme="dark"] *));
/* usage example */
body { @apply dark:bg-none dark:bg-[#1A1A1A]; }
The project's index.html ships with <html lang="en" data-theme="light"> as the default, and Redux takes over from there.
Right-to-Left layout is driven through Redux rather than by hand-editing markup. Dispatching setVariant("rtl") makes LayoutSync add dir="rtl" to the <html> tag and toggle the layout-rtl class on the body:
<html lang="en" dir="rtl">
Tailwind CSS automatically transforms positioning utilities (like margins, padding, and flex alignments) using standard logical properties when the dir="rtl" attribute is active.
RTL Demo
A preconfigured RTL demo is available at the /layout-rtl route. See src/views/main-pages/layout-demo/layoutRtl.tsx for a live demonstration.
Dreams ERP includes multiple popular icon packages ready for use. All of them are self-hosted webfonts under src/style/icons/ and imported in src/main.tsx – no CDN request is made. You can use any of the following icon libraries:
1. Lucide Icons
Use Lucide icons with the icon-[name] class prefix:
<i class="icon-house"></i>
<i class="icon-users"></i>
<i class="icon-settings"></i>
2. Phosphor Icons
Use Phosphor icons with the ph-[style] ph-[name] prefix classes. The duotone, regular and fill styles are imported:
<i class="ph-duotone ph-plus-circle"></i>
<i class="ph-fill ph-calendar"></i>
<i class="ph ph-user"></i>
3. Font Awesome Icons
Use Font Awesome Free icons with standard classes:
<i class="fa-solid fa-hashtag"></i>
<i class="fa-brands fa-react"></i>
Dreams ERP ships six layout variants, all driven from Redux. The variant type is declared in src/redux/slices/layoutSlice.ts:
export type LayoutVariant = "default" | "mini" | "hoverview" | "hidden" | "full-width" | "rtl";
src/providers/LayoutSync.tsx applies the active variant by writing a data-layout attribute on <html> and toggling body classes (mini-sidebar, expand-menu, hidden-layout, full-width, layout-rtl). All variants support light and dark modes.
Demo routes
Each variant has a live demo page in src/views/main-pages/layout-demo/:
/layout-mini(layoutMini.tsx) – icon-only collapsed sidebar./layout-hoverview(layoutHoverview.tsx) – mini sidebar that expands on hover viaexpand-menu./layout-hidden(layoutHidden.tsx) – sidebar fully hidden, toggled in on demand./layout-fullwidth(layoutFullWidth.tsx) – full-width content with the sidebar as an overlay./layout-rtl(layoutRtl.tsx) – right-to-left layout.
How the demos work
Each demo page is a thin wrapper around the dashboard:
import LayoutVariantWrapper from "../../../layout/layoutVariantWrapper";
import Dashboard from "../dashboard/dashboard";
const LayoutMini = () => (
<LayoutVariantWrapper variant="mini">
<Dashboard/>
</LayoutVariantWrapper>
);
export default LayoutMini;
src/layout/layoutVariantWrapper.tsx dispatches setVariant(variant) on mount and resets to setVariant("default") on unmount. It renders its own Header, Sidebar, page-wrapper and Footer, which is why these routes sit in layoutDemoRoutes and render bare – outside PublicLayout.
The default vertical layout with a left sidebar, topbar, and center content area.
- Sidebar: Navigation menu, logo, profile details, and collapsible dropdowns.
- Topbar: Search input, user alerts, settings, and profile toggle actions.
- Responsive: Collapses into an overlay sidebar on tablets and mobile screens automatically.
A screen-saving option that collapses the sidebar to show icons only. LayoutSync adds the mini-sidebar class to the <body> when the variant is active. See the /layout-mini demo route.
- Icon View: Collapses the sidebar to maximize the main work area.
- Hover Expand: Hovering expands the sidebar to reveal module text labels (the
hoverviewvariant). - Toggle: Switch between default and mini sidebar using the toggle button in the topbar.
Dreams ERP comes with 24+ pre-styled UI components. You can find these files in your src/views/ui-interface/ directory (e.g. uiAccordion.tsx) or click below to view their live layouts:
Dreams ERP is developed by Dreams Technologies and is available under both Envato Extended & Regular License options.
Regular License
Usage by either yourself or a single client is permitted for a single end product, provided that end users are not subject to any charges.
Extended License
For use by you or one client in a single end product for which end users may be charged.
What are the main differences between the Regular License and the Extended License?
If you operate as a freelancer or agency, you have the option to acquire the Extended License, which permits you to utilize the item across multiple projects on behalf of your clients.
| NAME | URL |
|---|---|
| React | https://react.dev/ |
| Vite | https://vite.dev/ |
| Ant Design | https://ant.design/ |
| Tailwind CSS | https://tailwindcss.com/ |
| Preline | https://preline.co/ |
| React Router | https://reactrouter.com/ |
| Redux Toolkit | https://redux-toolkit.js.org/ |
| React ApexCharts | https://www.npmjs.com/package/react-apexcharts |
| Chart.js | https://www.chartjs.org/ |
| ECharts | https://echarts.apache.org/ |
| FullCalendar | https://fullcalendar.io/ |
| Hello Pangea DnD | https://www.npmjs.com/package/@hello-pangea/dnd |
| React Quill New | https://www.npmjs.com/package/react-quill-new |
| noUiSlider | https://refreshless.com/nouislider/ |
| React Select | https://react-select.com/ |
| React Window | https://www.npmjs.com/package/react-window |
| Yet Another React Lightbox | https://yet-another-react-lightbox.com/ |
| Fontawesome | https://fontawesome.com/ |
| Phosphor Icons | https://phosphoricons.com/ |
| Lucide | https://lucide.dev/ |
If you have any questions or run into issues with the template, feel free to contact us via email at support@dreamstechnologies.com.
Response Time: Typically 12–24 hours on weekdays (GMT+5:30). Support covers template bugs, errors, and standard features. It does not cover custom installations or custom coding changes.
Contact SupportDo you need custom development for your application?
If you need customization, new page integration, feature setups, or database connections, our engineering team can help tailor this template to your precise specifications.
- Tailoring features to your exact branding and workflow.
- Deploying the template to your production servers.
- Integrating backend endpoints and databases.
Thank You
Thank you for choosing Dreams ERP! We hope this template facilitates building your application. We kindly ask you to share your feedback by leaving a rating on ThemeForest.
Leave a Review