Skip to content
Back to search

shadcn-lar

Made an shadcn/ui admin for Laravel with 🀍

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/binjuhor--shadcn-lar/badge.svg)](/listings/binjuhor--shadcn-lar)

HTML

<a href="/listings/binjuhor--shadcn-lar"><img src="/api/listings/binjuhor--shadcn-lar/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md Β· README Β· 264 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Laravel Shadcn Admin Dashboard
  2. A modern, responsive, and accessible admin dashboard built with Shadcn UI, Laravel, and Vite. This project combines the elegance of Shadcn's UI components with the robustness of Laravel's backend framework, providing a seamless development experience.
  3. ![alt text](public/images/shadcn-admin.png)
  4. This project is inspired by [Shadcn-admin](https://github.com/satnaing/shadcn-admin) and adapted to work seamlessly with Laravel and Inertia.js.
  5. ## Features
  6. - Light/dark mode
  7. - Responsive
  8. - Accessible
  9. - With built-in Sidebar component
  10. - Global Search Command
  11. - 10+ pages
  12. - Extra custom components
  13. ## Tech Stack
  14. **UI:** [ShadcnUI](https://ui.shadcn.com) (TailwindCSS + RadixUI)
  15. **Backend:** [Laravel](https://laravel.com/) 12.x
  16. **Frontend Integration:** [InertiaJs](https://inertiajs.com/)
  17. **Build Tool:** [Vite](https://vitejs.dev/)
  18. **Type Checking:** [TypeScript](https://www.typescriptlang.org/)
  19. **Linting/Formatting:** [Eslint](https://eslint.org/) & [Prettier](https://prettier.io/)
  20. **Icons:** [Tabler Icons](https://tabler.io/icons)
  21. ## Run Locally
  22. 1. Clone the project
  23. ```bash
  24. git clone git@github.com:binjuhor/shadcn-lar.git
  25. ```
  26. 2. Go to the project directory
  27. ```bash
  28. cd shadcn-lar
  29. ```
  30. 3. Install dependencies
  31. - Install JavaScript dependencies:
  32. ```bash
  33. pnpm install
  34. ```
  35. - Install PHP dependencies:
  36. ```bash
  37. composer install
  38. ```
  39. - Data migration
  40. ```bash
  41. php artisan migrate
  42. ```
  43. 4. Start the dev
  44. Frotnedend and Backend server
  45. - Start the Vite development server:
  46. ```bash
  47. pnpm run dev
  48. ```
  49. - Start the Laravel development server:
  50. ```bash
  51. php artisan serve
  52. ```
  53. 5. Open your browser and visit http://localhost:8000 to view the dashboard.
  54. ## CI/CD Guide
  55. This project includes automated CI/CD workflows using GitHub Actions. The workflows are located in the `.github/workflows/` directory and provide continuous integration and deployment capabilities.
  56. ### Available Workflows
  57. #### 1. Tests Workflow (`test.yml`)
  58. Automatically runs on every push to the `main` branch and performs:
  59. - **PHP Setup:** Uses PHP 8.2 with required extensions
  60. - **Environment Setup:** Copies `.env.example` to `.env` and generates application key
  61. - **Dependencies:** Installs Composer dependencies
  62. - **Frontend Build:** Installs Node.js dependencies and builds production assets
  63. - **Database Setup:** Creates SQLite database for testing
  64. - **Test Execution:** Runs PHPUnit/Pest tests (unit and feature tests)
  65. #### 2. Deploy Workflow (`deploy.yml`)
  66. Automatically deploys to production server on successful pushes to `main` branch:
  67. - **Code Deployment:** Uses rsync to sync code to production server
  68. - **Frontend Build:** Builds production assets before deployment
  69. - **Dependencies:** Installs/updates Composer dependencies via Docker
  70. - **Database Migration:** Runs Laravel migrations
  71. - **Cache Management:** Clears and optimizes application cache
  72. - **Docker Integration:** Restarts Docker containers for updated services
  73. ### Required Secrets
  74. For the deployment workflow to work, configure these GitHub repository secrets:
  75. - `PRIVATE_KEY` - SSH private key for server access
  76. - `SSH_HOST` - Production server hostname/IP
  77. - `SSH_USER` - SSH username for server access
  78. - `WORK_DIR` - Application directory path on server
  79. - `DOCKER_DIR` - Docker compose directory path on server
  80. **Note**: Ensure your server is set up to allow SSH access using the provided private key. Public key should be added to the server's `~/.ssh/authorized_keys`. Folder permissions should allow the SSH user to read/write as needed.`.ssh` folder should have `700` permissions and `authorized_keys` file should have `600` permissions.
  81. ### Local Development Workflow
  82. 1. **Before Committing:**
  83. ```bash
  84. # Run tests locally
  85. php artisan test
  86. # Build frontend assets
  87. pnpm run build
  88. # Check code formatting
  89. pnpm run lint
  90. ```
  91. 2. **Push to Main:**
  92. - Tests workflow runs automatically
  93. - If tests pass and on `main` branch, deployment begins
  94. - Monitor workflow progress in GitHub Actions tab
  95. ### Workflow Customization
  96. To modify the CI/CD behavior:
  97. - **Test Configuration:** Edit `.github/workflows/test.yml`
  98. - **Deployment Steps:** Edit `.github/workflows/deploy.yml`
  99. - **Add Quality Checks:** Consider adding code style checks, static analysis, or security scans
  100. ## Modular Architecture
  101. This project uses [nwidart/laravel-modules](https://github.com/nWidart/laravel-modules) for a modular monorepo architecture. Each module is self-contained with its own controllers, models, migrations, and React frontend.
  102. ### Available Modules
  103. | Module | Description |
  104. |--------|-------------|
  105. | Finance | Personal finance tracking (accounts, transactions, budgets) |
  106. | Invoice | Invoice management |
  107. | Permission | Roles and permissions management |
  108. | Settings | Application settings |
  109. | Blog | Blog posts and categories |
  110. | Ecommerce | Products, orders, and categories |
  111. | Notification | User notifications |
  112. ### Module Commands
  113. #### Create a New Module
  114. ```bash
  115. # Basic module scaffolding
  116. php artisan module:scaffold ModuleName
  117. # With CRUD scaffolding (model, migration, policy, controller, pages)
  118. php artisan module:scaffold ModuleName --with-crud
  119. # Specify entity name for CRUD
  120. php artisan module:scaffold Inventory --with-crud --entity=Product
  121. # Preview without creating files
  122. php artisan module:scaffold ModuleName --dry-run
  123. ```
  124. #### Generate a Standalone Site from Modules
  125. Extract selected modules into a completely new Laravel project:
  126. ```bash
  127. # Create a finance-only site
  128. php artisan site:generate FinanceApp --modules=Finance --output=~/Projects
  129. # Create a multi-module site
  130. php artisan site:generate AdminPanel --modules=Finance,Settings,Permission --output=~/Projects
  131. # Preview what would be created
  132. php artisan site:generate TestApp --modules=Finance --dry-run
  133. ```
  134. The `site:generate` command:
  135. - Copies base Laravel+React project structure
  136. - Includes only selected modules
  137. - Updates all configuration files (composer.json, tsconfig.json, vite.config.js)
  138. - Removes unused module references
  139. - Shows next steps after generation
  140. #### Enable/Disable Modules
  141. ```bash
  142. # Enable a module
  143. php artisan module:enable ModuleName
  144. # Disable a module
  145. php artisan module:disable ModuleName
  146. # List all modules
  147. php artisan module:list
  148. ```
  149. ### Module Structure
  150. ```
  151. Modules/
  152. └── ModuleName/
  153. β”œβ”€β”€ app/
  154. β”‚ β”œβ”€β”€ Http/Controllers/
  155. β”‚ β”œβ”€β”€ Models/
  156. β”‚ β”œβ”€β”€ Policies/
  157. β”‚ └── Providers/
  158. β”œβ”€β”€ config/
  159. β”œβ”€β”€ database/
  160. β”‚ β”œβ”€β”€ migrations/
  161. β”‚ └── seeders/
  162. β”œβ”€β”€ resources/
  163. β”‚ └── js/
  164. β”‚ β”œβ”€β”€ pages/
  165. β”‚ └── types/
  166. β”œβ”€β”€ routes/
  167. β”‚ β”œβ”€β”€ api.php
  168. β”‚ └── web.php
  169. └── module.json
  170. ```
  171. ## Roadmap
  172. Here are some of the planned features for future updates:
  173. - **User Permissions & Roles:** Manage user roles and permissions with a flexible and intuitive system.
  174. - **Profile Manager:** Allow users to update their profiles, including personal information and security settings.
  175. - **Post & Page Manager:** Create and manage dynamic posts and pages with a rich text editor.
  176. - **Theme & Plugin Manager:** Easily install and manage themes and plugins to extend functionality.
  177. - **File & Media Manager:** A powerful file and media manager for handling uploads and organizing assets.
  178. ## Author
  179. This project was crafted with 🀍 by [@binjuhor](https://github.com/binjuhor)
  180. ## License
  181. This project is open-source and licensed under the [MIT License](https://choosealicense.com/licenses/mit/). Feel free to use, modify, and distribute it as needed.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.