CoreUI Free Bootstrap Admin Template
A free open‑source Bootstrap admin dashboard template with many UI components, suitable for building web applications.
By coreui coreui/coreui-free-bootstrap-admin-template 12,275 stars
Introduction
CoreUI Free Bootstrap Admin Template is an open‑source admin dashboard built on Bootstrap 5. It provides a collection of ready‑made pages, UI components, and utilities that help developers create responsive, dark‑mode‑compatible admin interfaces quickly.
What this project offers
- A set of 48 ready HTML pages (authentication, error pages, charts, components, forms, icons, widgets, etc.).
- SCSS source files and a build pipeline that compiles them to CSS.
- JavaScript modules for charts, tooltips, popovers, toasts, widgets and more.
- Integration with CoreUI’s component library, Chart.js, and SimpleBar.
- Dark‑mode support and responsive layout out of the box.
Main features
- Authentication pages (login, register, password reset, etc.).
- Over 30 UI components such as accordions, alerts, badges, carousels, modals, tables, toasts, tooltips, and pagination.
- Form styles including floating labels, validation, input groups and range controls.
- Chart page powered by Chart.js.
- Error pages (404, 500) and a widgets page.
- Dark‑mode toggle.
- Responsive design for desktop, tablet and mobile devices.
- Icon set from CoreUI Icons.
Technology stack
- Bootstrap 5 – core CSS framework.
- Sass – used to write SCSS source files (
src/scss/). - PostCSS – processes compiled CSS (autoprefixing, selector optimisation).
- Pug – template engine for HTML views (
src/pug/). - Chart.js – renders charts on the charts page.
- CoreUI – UI component library (
@coreui/coreui). - Node.js and npm – build tooling.
Requirements
- Node.js (any recent version).
- npm (comes with Node.js).
- A web browser to view the generated pages.
Installation
- Download and extract the ZIP file.
# Assuming the ZIP is at /download/coreui-bootstrap-admin.zip
unzip /download/coreui-bootstrap-admin.zip -d coreui-admin
cd coreui-admin
- Install project dependencies.
npm install
- Build the project. This runs the full build pipeline (
npm run build) which:- Cleans the
distfolder. - Compiles SCSS to CSS, adds vendor prefixes and creates minified files.
- Copies JavaScript files.
- Copies assets and HTML views.
- Cleans the
npm run build
- Serve the built files locally (optional, for testing).
npm run serve
The command starts a static server that serves the dist directory. Open http://localhost:5000 (default port) in a browser.
- Deploy – after the build finishes, the ready‑to‑publish files are in the
distfolder. Upload the entiredistdirectory to any static‑file host (GitHub Pages, Netlify, Vercel, shared hosting, etc.) or copy it to your web server’s document root.
Configuration
The template uses the following configuration files:
package.json– defines npm scripts, dependencies and devDependencies.build/postcss.config.mjs– PostCSS plugins (autoprefixer, selector optimisation).src/scss/style.scss– main SCSS entry point; you can edit variables or import additional styles here.src/js/*.js– JavaScript modules; you can modify or extend functionality.src/pug/– Pug templates that generate the HTML pages. Changing a Pug file requires rebuilding (npm run build-pug).
Environment variables are not required for the default build.
Customizing the project
- Styling: Edit SCSS files in
src/scss/. After changes runnpm run buildto regenerate CSS indist/css/. - Templates: Modify Pug files under
src/pug/or edit the generated HTML insrc/views/. Re‑run the appropriate build script (npm run buildornpm run build-pug). - JavaScript: Add or change code in
src/js/. Thejs-syncscript copies the files todist/js/during the build. - Assets: Place images, fonts, or other static files in
src/assets/. They are copied todist/assets/by thesync-assetsscript.
Project structure
.
├─ build/ # Build scripts and PostCSS config
├─ src/
│ ├─ assets/ # Images, icons, favicons
│ ├─ js/ # JavaScript source files
│ ├─ pug/ # Pug templates
│ ├─ scss/ # SCSS source files
│ └─ views/ # Plain HTML pages (generated output)
├─ dist/ # Output of the build (ready for deployment)
├─ package.json
└─ README.md
Tips
- Use
npm run localhostto start BrowserSync, which reloads the browser automatically when files indist/change. - For faster iteration on SCSS, run only the CSS part:
npm run css. - Linting is available via
npm run css-lintandnpm run js-lint; fix issues before committing. - The
build-pugscript builds HTML directly from Pug templates, useful if you prefer to work with Pug rather than the pre‑generated HTML files.
License and attribution
The project is licensed under the MIT License. See the full license file at LICENSE.
Original repository: https://github.com/coreui/coreui-free-bootstrap-admin-template
When redistributing, keep the LICENSE file and retain the copyright notice.
Use this prompt with an AI coding assistant (Claude Code, Cursor, ChatGPT and similar) to add CoreUI Free Bootstrap Admin Template to a website or app you already have.
- Download the ZIP and put the project next to your own code.
- Fill in the bracketed parts, such as
[describe your stack]. - Paste the prompt into your assistant and review each change it proposes.
# Integrate CoreUI Free Bootstrap Admin Template **Role** You are a senior frontend developer assisting me in adding the CoreUI Free Bootstrap Admin Template to my existing web application. **Project description** CoreUI Free Bootstrap Admin Template is an open‑source admin dashboard built on Bootstrap 5. It provides a collection of ready‑made pages (authentication, error, charts, components, forms, icons, widgets) and UI components such as accordions, alerts, badges, modals, tables, toasts, and dark‑mode support. The source uses Sass, PostCSS, Pug templates, and JavaScript utilities like Chart.js. **Source project** - Repository: https://github.com/coreui/coreui-free-bootstrap-admin-template - License: MIT - Framework: Bootstrap (version not specified) - Build tooling (from `package.json`): - Sass (`sass`), PostCSS (`postcss`, `postcss-cli`), Pug (`pug`), ESLint, Stylelint, BrowserSync, npm‑run‑all, rimraf, clean‑css‑cli, sync‑directory, etc. - Runtime dependencies: `@coreui/coreui`, `@coreui/chartjs`, `@coreui/icons`, `@coreui/utils`, `chart.js`, `simplebar` - Development dependencies: listed in `devDependencies` above. **Target project context** - [describe your stack, e.g. Laravel 11 + Blade] - [where the UI should go, e.g. replace the admin area under `/admin`] - [existing CSS framework, e.g. Tailwind, Bootstrap 4, none] **Integration objectives** - Bring the overall layout (header, sidebar, footer) into the target admin area. - Import the sidebar navigation and top‑bar components. - Add selected UI components (tables, forms, charts, toasts) that the target will use. - Include the authentication pages only if they replace or extend existing login flows. - Preserve dark‑mode and responsive behavior. **Required components** - Layout files: `src/views/index.html` (main dashboard) and its associated Pug layout in `src/pug/_layout/`. - Navigation: sidebar and header markup from the main layout. - Pages to copy (as needed): - Authentication: `login.html`, `register.html`, `reset-password.html`, etc. - Error pages: `error-pages/404.html`, `error-pages/500.html`. - UI component demos: all files under `src/views/components/` (e.g., `accordion.html`, `alerts.html`, `tables.html`). - Forms: all files under `src/views/forms/`. - Charts: `charts.html`. - Widgets: `widgets.html`. - Icons: files under `src/views/icons/` and the icon font in `src/assets/icons/`. **Layout and styling requirements** - Ensure Bootstrap CSS from CoreUI does not conflict with any existing framework. If the target already uses Bootstrap, load CoreUI CSS after the existing Bootstrap CSS. - If the target uses a different framework, scope CoreUI styles by adding a wrapper class (e.g., `<div class="coreui-wrapper">…</div>`) and prefixing the compiled CSS with that class using PostCSS or a custom build step. - Keep design tokens (colors, spacing) consistent by reusing the target’s CSS variables where possible, or map CoreUI SCSS variables to the target’s values in `src/scss/style.scss` before building. **Asset management** - CSS: compiled files are generated in `dist/css/` (`style.css` and `style.min.css`). Copy the needed CSS files into the target’s public CSS directory or reference them via a CDN if preferred. Do not duplicate Bootstrap itself if the target already includes it. - JS: compiled files are in `dist/js/` (`main.js`, `charts.js`, etc.). Copy these to the target’s public JS folder and include them after any existing scripts. - Fonts & icons: located in `src/assets/icons/` and `src/assets/brand/`. Copy the whole `assets/` folder to the target’s assets directory, preserving the relative paths used in the HTML. - Images: copy the `src/assets/img/` folder as needed. - Use the `npm run build` script to generate the `dist/` folder before copying, or use the `sync-assets`, `sync-views`, and `sync` scripts to copy only changed files. **Routing and navigation** - Map each HTML page to an existing route in the target application (e.g., `/admin/login` → `src/views/authentication/login.html`). - Keep the original URLs if the target already defines them; otherwise, add new route definitions that render the copied HTML or Pug templates. - Preserve the existing authentication, routing, and state logic; only replace the view layer. **Responsive requirements** - The template is fully responsive. Verify that the responsive breakpoints do not clash with any custom breakpoints in the target. Test on mobile, tablet, and desktop sizes after integration. **Accessibility requirements** - CoreUI includes ARIA attributes and keyboard navigation for components. Ensure these are retained after any HTML modifications. Run an accessibility audit (e.g., axe) on the integrated pages. **Compatibility requirements** - Uses Bootstrap 5 (version not explicitly listed). Ensure the target’s Bootstrap version is 5.x or upgrade accordingly. - Requires Node.js and npm for the build step. Run `npm install` in the CoreUI source, then `npm run build` to produce the compiled assets. - No server‑side code is needed; integration is purely front‑end. **Preserve the existing application** - First, inspect the current codebase before changing any file. - Do not replace authentication, routing, state management, or data‑layer code. - Make small, isolated changes (e.g., add a new view folder, import CSS/JS in the layout). - Commit each change separately and request a review before deleting any existing files. **Testing and verification checklist** - [ ] Run the target application and confirm it builds without errors after adding CoreUI assets. - [ ] Verify that the main dashboard layout renders correctly with header, sidebar, and footer. - [ ] Check that navigation links point to the correct routes. - [ ] Test all copied pages (login, register, error pages, component demos) for visual correctness. - [ ] Confirm dark‑mode toggle works and respects the target’s theme settings. - [ ] Validate responsive behavior on at least three viewport sizes. - [ ] Run an accessibility audit and fix any violations introduced. - [ ] Ensure no duplicate Bootstrap CSS or JS files are loaded (check network tab). - [ ] Verify that Chart.js charts load and display data as expected. - [ ] Confirm that icons from `@coreui/icons` appear correctly. - [ ] Review the final bundle size and ensure it meets performance expectations.
