| Current Path : /var/www/html/reddsis/ |
| Current File : /var/www/html/reddsis/README.md |
# Your Project Name A Laravel-based CMS with frontend site builder, components system, and dynamic permissions. ## Requirements - PHP 8.3+ - Composer 2.x - Node.js 18+ - PostgreSQL 14+ (or MySQL/MariaDB) - Git ## Installation ### 1. Clone & Setup Environment ```bash # Clone the repository git clone <repository-url> your-project-name cd your-project-name # Copy environment file cp .env.example .env ``` ### 2. Configure Database Edit `.env` file with your database credentials: ```env DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=your_database_name DB_USERNAME=your_username DB_PASSWORD=your_password ``` For PostgreSQL: ```env DB_CONNECTION=pgsql DB_HOST=127.0.0.1 DB_PORT=5432 DB_DATABASE=your_database_name DB_USERNAME=your_username DB_PASSWORD=your_password ``` ### 3. Install PHP Dependencies ```bash composer install ``` ### 4. Generate Application Key ```bash php artisan key:generate ``` ### 5. Run Migrations ```bash php artisan migrate ``` ### 6. Seed Database (Optional - creates default admin user) ```bash php artisan db:seed ``` Default superadmin credentials: - Email: superadmin@example.com - Password: password ### 7. Install Frontend Dependencies ```bash # Install root dependencies npm install # Install TailAdmin template dependencies cd public/tailadmin npm install cd ../../ ``` ### 8. Build Assets ```bash # Build for production npm run build # Or for development with hot reload npm run dev ``` ### 9. Create Storage Link ```bash php artisan storage:link ``` ### 10. Start Development Server ```bash php artisan serve ``` Visit `http://localhost:8000` in your browser. ## Quick Start Checklist - [ ] Clone repository - [ ] Copy `.env.example` to `.env` - [ ] Configure database credentials - [ ] Run `composer install` - [ ] Run `php artisan key:generate` - [ ] Run `php artisan migrate` - [ ] Run `php artisan db:seed` (for default admin) - [ ] Run `npm install` - [ ] Run `cd public/tailadmin && npm install` - [ ] Run `npm run build` - [ ] Run `php artisan serve` ## Features ### Frontend Site Builder - Create multiple sites with custom layouts - Drag-and-drop components into page content - Visual layout builder with GrapesJS - Monaco editor for code editing with syntax highlighting ### Component System - Reusable components organized by category - Component variables for dynamic content - Easy insertion via `$component_code` syntax ### Dynamic Permissions - Automatic permission generation for models - Guard-based permission system - Blade directives for permission checking ## Project Structure ``` app/ ├── Http/ │ ├── Controllers/ │ │ ├── Backend/ # Admin controllers │ │ └── Frontend/ # Frontend user controllers │ ├── Helpers/ # MenuHelper, SettingHelper │ ├── Middleware/ # Admin, User, Auth middleware │ └── Requests/Backend/ # Form requests ├── Models/ │ ├── Backend/ # Admin models │ └── Traits/ # Visitable, HasVisits ├── Services/ # BladeSyncService, PortalHandler, etc. ├── Observers/ # ActivityObserver └── View/Composers/ # PublicMenuComposer, FrontendUserMenuComposer resources/views/ ├── backend/ # Admin panel (TailAdmin theme) │ ├── auth/ # Login pages │ ├── layouts/ # Layout + sidebar partials │ └── module/ # Module CRUD views ├── frontend/ # CMS Builder output (cms.blade.php) └── vendor/ # Published vendor views public/ ├── tailadmin/ # Admin assets └── vendor/monaco-editor/ # Code editor ``` ## Troubleshooting ### Asset Not Loading ```bash php artisan storage:link npm run build ``` ### Permission Denied Errors ```bash chmod -R 775 storage bootstrap/cache ``` ### Database Connection Failed - Verify database server is running - Check credentials in `.env` - Ensure database exists ## License MIT License