rifatxtra/laravel-featurekit

The professional Laravel MVC Starter Kit (Laravel Feature Kit) with Inertia.js v3, React 19, and Tailwind CSS v4.

Maintainers

Package info

github.com/rifatxtra/Laravel-FeatureKit

Issues

Language:JavaScript

Type:project

pkg:composer/rifatxtra/laravel-featurekit

Statistics

Installs: 11

Dependents: 0

Suggesters: 0

Stars: 0

v2.2.0 2026-04-12 09:14 UTC

This package is auto-updated.

Last update: 2026-05-10 11:51:10 UTC


README

The Professional Laravel 12 Feature-Driven Starter Kit (Laravel Feature Kit).

Built for developers who want to skip the "boring" setup and start building production-grade applications from day one.

๐Ÿ†• What's New in v3.0.0

๐Ÿ›๏ธ Professional MVC Architecture Overhaul

The backend has been completely refactored from a feature-driven structure to a standardized, professional Laravel MVC architecture. This ensures maximum compatibility with the Laravel ecosystem, better IDE support, and a cleaner developer experience while keeping the powerful frontend features intact.

โœจ Key Improvements

  • Consolidated Models: No more duplicate models! Core models live in app/Models as the single source of truth.
  • Centralized Routing: Removed complex auto-discovery logic for standard, explicit, and performant routing in routes/web.php.
  • Organized Layering: Controllers, Services, and Requests are now organized by role (Admin, User, Auth) within their standard Laravel directories.
  • Improved Performance: Faster boot times by removing filesystem-heavy route discovery.
  • Standardized Naming: Fixed various typos and inconsistent naming conventions across the backend.

๐Ÿ†• What's New in v2.2.0

๐Ÿ“Š Advanced Traffic Analytics Console

The built-in traffic tracker has been completely rebuilt from a basic visitor log into a professional-grade analytics console โ€” on par with lightweight alternatives to Google Analytics, running entirely within your own Laravel app.

โœจ New Features

  • 3-Tab Dashboard UI: Overview, Real-Time, and Behavior tabs โ€” each with dedicated charts and data.
  • Real-Time Visitor Monitoring: REST-based polling (no WebSockets needed) refreshes live stats every 15 seconds โ€” active visitors, pages being viewed, hit stream, and active countries.
  • Traffic Heatmap: A 7ร—24 hour/day intensity grid showing when your site is busiest.
  • Geographic Tracking: Country detection via ip-api.com โ€” displayed with flag emojis, no extra PHP packages needed.
  • Referrer Categorization: Automatically classifies traffic into Direct, Search, Social, and Other.
  • Session Analytics: Bounce rate, average pages per session, new vs returning visitors โ€” all computed from session-ID hashes (privacy-safe, no cookies).
  • HTTP Status Code Monitoring: 2xx/3xx/4xx/5xx breakdown with visual indicators.
  • Response Time Tracking: Per-request timing in milliseconds with trend charts and color-coded performance indicators.
  • Real IP Resolution: Proxy-aware IP detection supporting Cloudflare (CF-Connecting-IP), nginx (X-Real-IP), and standard load balancers (X-Forwarded-For) via Laravel's trustProxies.
  • Enhanced Log Viewer: New columns for status code, response time, country, device type, and new visitor status with new filter dropdowns.
  • Detailed Visit Modal: Click any log row to inspect the full request audit โ€” UA string, browser, OS, country, response time, session info.

๐Ÿ“‚ New/Modified Files

  • database/migrations/2026_04_11_โ€ฆ_add_advanced_fields_to_traffic_logs_table.php โ€” 6 new columns.
  • app/Models/TrafficLog.php โ€” consolidated model.
  • app/Http/Middleware/TrackTraffic.php โ€” captures response time, status code, session ID; proxy-aware IP resolution.
  • app/Jobs/ProcessTrafficLog.php โ€” geo lookup, new vs returning detection, extended browser/OS/bot parsing.
  • app/Services/Admin/TrafficAnalyticsService.php โ€” 16 aggregations + real-time stats endpoint.
  • app/Http/Controllers/Admin/TrafficController.php โ€” new GET /admin/traffic/realtime REST endpoint.
  • routes/web.php โ€” added realtime route.
  • resources/js/pages/(portals)/admin/traffic/page.jsx โ€” complete 3-tab dashboard redesign.
  • resources/js/pages/(portals)/admin/traffic/logs/page.jsx โ€” enhanced with new columns and filters.
  • bootstrap/app.php โ€” trustProxies(at: '*') for correct real-IP resolution.

๐Ÿ†• What's New in v2.1.2

โš™๏ธ Dynamic System Settings & Branding

You can now manage your application's identity and availability directly from the Admin Portal without touching a single line of code.

  • Dynamic branding: Change App Name, upload a Logo, and a Favicon instantly.
  • Favicon Engine: Automated GD-powered conversion of any image to a professional 32x32 .ico file.
  • Smart Maintenance Mode:
    • Admin Bypass: Keeps admins productive by allowing access to /admin and /auth routes during maintenance.
    • SPA Support: Detects Inertia requests and forces a full reload to the branded 503 page.
    • Dynamic Duration: Set estimated downtime from the UI, reflected on the maintenance page.
  • Source of Truth: All settings are cached indefinitely using Setting::get($key, $default) for maximum performance.

๐Ÿ“‚ New/Modified Files:

  • app/Http/Requests/Admin/UpdateProfileRequest.php โ€” updated requests.
  • app/Utils/FaviconUtil.php โ€” Image to ICO conversion utility.
  • app/Http/Middleware/CheckMaintenanceMode.php โ€” Advanced maintenance gate.
  • resources/views/errors/503.blade.php โ€” Premium branded downtime template.
  • resources/js/pages/(portals)/admin/settings/page.jsx โ€” Interactive settings dashboard.

๐Ÿš€ Key Features

  • ๐Ÿ›๏ธ Standardized MVC Architecture: Clean separation of concerns with Controllers, Services, Models, and Requests organized into standard Laravel directories with role-based subfolders.
  • โš›๏ธ Next-Gen Frontend: Next.js (App Router) style folder structure with React 19 + Inertia.js v3 for SPA portals. Blade + Tailwind v4 for SEO-critical pages.
  • ๐Ÿ›ก๏ธ Intelligent Layouts: Automatic persistent layout injection (MainLayout) for all dashboard pages โ€” zero configuration required.
  • ๐Ÿ“ฌ Universal Mail System: A single queued GeneralMail class with a professional Markdown master template handles every email in your app.
  • ๐Ÿงฐ 11-Module JS Utility Suite: Image Compression, Toast, Storage, Clipboard, Date, Number/Currency, String, Validation, Performance (debounce/throttle), and Web Vitals monitoring.
  • ๐ŸŽจ Tailwind CSS v4: Semantic @theme design tokens (primary, secondary, surface, error, success) with OKLCH color space for accessible, white-labelโ€“ready theming.
  • ๐Ÿ” Complete Auth System: Login, Register, Forgot Password, and Reset Password โ€” fully coded with Blade views, form requests, and service-layer logic.
  • ๐ŸŽฏ Pre-Built UI Kit: React components for Toast, Modal, LoadingSpinner, Pagination, SeoHead, BasicEditor (TipTap), and 5 PromoTemplate variants.
  • ๐Ÿช 20+ Custom React Hooks: useAuth, useUser, useHasRole, useHasPermission, useFlash, useErrors, useRoute, and more โ€” all in one barrel export.
  • โšก Single-Command Dev: composer dev launches the Laravel server, queue listener, Pail log viewer, and Vite HMR simultaneously via concurrently.
  • ๐Ÿ—„๏ธ Clean Routing: Centralized, explicit routing in routes/web.php and routes/api.php โ€” no manual discovery overhead.
  • ๐Ÿ›ก๏ธ Built-in Middleware: HandleInertiaRequests (shares auth, flash, CSRF, config to all pages) + RoleMiddleware (gate routes with role:admin).
  • ๐Ÿ“Š Analytics Console: Built-in full-stack traffic analytics with real-time monitoring, heatmaps, geo tracking, session metrics, and performance trends โ€” no third-party service needed.

โšก Quick Start

composer create-project rifatxtra/laravel-feature-kit my-app
cd my-app
composer setup    # installs deps, copies .env, generates key, migrates DB, builds assets
composer dev      # starts server + queue + logs + vite concurrently

Note: Uses SQLite by default โ€” no database server required. Switch to MySQL/Postgres via .env. Queue Worker Required: For traffic analytics geo-lookup, run php artisan queue:work alongside composer dev.

๐Ÿ“‚ Project Structure

โ”œโ”€โ”€ app/
โ”‚   โ”œโ”€โ”€ Http/
โ”‚   โ”‚   โ”œโ”€โ”€ Controllers/        # ๐ŸŽฎ Controllers (Admin, User, Auth, Landing)
โ”‚   โ”‚   โ”œโ”€โ”€ Middleware/         # ๐Ÿ›ก๏ธ Middleware (Inertia, Role, Maintenance, Traffic)
โ”‚   โ”‚   โ””โ”€โ”€ Requests/           # โœ… Form Requests (Admin, User, Auth)
โ”‚   โ”œโ”€โ”€ Services/               # ๐Ÿง  Business Logic (Admin, User, Auth)
โ”‚   โ”œโ”€โ”€ Models/                 # ๐Ÿ—„๏ธ Core Models (User, Notification, Setting, etc.)
โ”‚   โ”œโ”€โ”€ Events/                 # ๐Ÿ“ข Domain Events
โ”‚   โ”œโ”€โ”€ Listeners/              # ๐Ÿ‘‚ Event Listeners
โ”‚   โ”œโ”€โ”€ Jobs/                   # โš™๏ธ Background Jobs
โ”‚   โ”œโ”€โ”€ Mail/                   # ๐Ÿ“ฌ Universal Mail System
โ”‚   โ”œโ”€โ”€ Utils/                  # ๐Ÿ› ๏ธ Helper Utilities (Favicon, etc.)
โ”‚   โ””โ”€โ”€ Providers/              # AppServiceProvider
โ”œโ”€โ”€ resources/
โ”‚   โ”œโ”€โ”€ css/app.css             # Tailwind v4 @theme design tokens
โ”‚   โ”œโ”€โ”€ js/
โ”‚   โ”‚   โ”œโ”€โ”€ app.jsx             # Inertia entry point with auto-layout resolver
โ”‚   โ”‚   โ”œโ”€โ”€ Components/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Layout/         # MainLayout (shared base)
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ ui/             # Toast, Modal, etc.
โ”‚   โ”‚   โ”œโ”€โ”€ Contexts/           # ModalContext (global modal state)
โ”‚   โ”‚   โ”œโ”€โ”€ Hooks/              # 20+ Inertia hooks (useAuth, useUser, etc.)
โ”‚   โ”‚   โ”œโ”€โ”€ Utils/              # 11 utility modules with barrel export
โ”‚   โ”‚   โ””โ”€โ”€ pages/              # โš›๏ธ React Page Components
โ”‚   โ”‚       โ””โ”€โ”€ (portals)/      # Role-based layouts & pages
โ”‚   โ”‚           โ”œโ”€โ”€ admin/
โ”‚   โ”‚           โ”‚   โ”œโ”€โ”€ traffic/  # ๐Ÿ“Š Analytics dashboard (3-tab console)
โ”‚   โ”‚           โ”‚   โ””โ”€โ”€ layout.jsx
โ”‚   โ”‚           โ””โ”€โ”€ user/
โ”‚   โ”‚               โ””โ”€โ”€ layout.jsx
โ”‚   โ””โ”€โ”€ views/
โ”‚       โ”œโ”€โ”€ app.blade.php       # Inertia root template (React SPA)
โ”‚       โ”œโ”€โ”€ emails/             # Email layout + content templates
โ”‚       โ”œโ”€โ”€ layout/             # Header & footer partials
โ”‚       โ””โ”€โ”€ pages/              # Blade pages (auth, home, components)
โ”œโ”€โ”€ bootstrap/app.php           # Auto-route discovery engine + trusted proxies
โ”œโ”€โ”€ database/migrations/        # Users, sessions, cache, jobs, traffic_logs tables
โ””โ”€โ”€ config/                     # Standard Laravel config files

๐Ÿ› ๏ธ Tech Stack

Layer Technology Version
Backend Laravel Framework 12.x
Frontend React 19.x
Bridge Inertia.js 3.x
Styling Tailwind CSS 4.x
Build Vite 8.x
PHP PHP 8.2+
Database SQLite (default), MySQL, PostgreSQL โ€”
Queue Database driver (default) โ€”
Testing PHPUnit 11.x

๐Ÿ“‹ Changelog

v3.0.0 โ€” Professional MVC Refactor (Current)

  • ๐Ÿ—๏ธ Architecture Overhaul: Refactored from FDD to standard Laravel MVC.
  • ๐Ÿ—„๏ธ Model Consolidation: Unified models in app/Models.
  • ๐ŸŽฎ Organized Controllers: Role-based folders in app/Http/Controllers.
  • ๐Ÿง  Service Layer: Business logic moved to role-based app/Services.
  • โœ… Standard Requests: Validation moved to app/Http/Requests.
  • ๐Ÿ—„๏ธ Central Routing: Removed auto-route discovery for central routes/web.php.
  • ๐Ÿ›ก๏ธ Middleware & Events: Moved to standard Laravel locations.

v2.2.0 โ€” Traffic Analytics Console

  • โœจ Complete rebuild of Traffic Analytics into a 3-tab professional console
  • โœจ Real-time visitor monitoring via REST polling (no WebSockets)
  • โœจ 7ร—24 traffic heatmap, geographic breakdown with flag emojis
  • โœจ Session metrics: bounce rate, pages/session, new vs returning
  • โœจ HTTP status code tracking (2xx/3xx/4xx/5xx)
  • โœจ Response time trend charts with ms-precision per-request timing
  • โœจ Proxy-aware real IP resolution (Cloudflare, nginx, load balancers)
  • โœจ Enhanced log viewer with status, response time, country, and device filters
  • ๐Ÿ—„๏ธ Migration: 6 new columns on traffic_logs table

v2.1.2 โ€” System Settings & Branding

  • โœจ Dynamic app name, logo, and favicon management from Admin UI
  • โœจ GD-powered favicon ICO conversion
  • โœจ Smart maintenance mode with admin bypass and branded 503 page

v2.1.1

  • ๐Ÿ› Bug fixes and stability improvements

๐Ÿค Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“„ License

MIT Licensed. Open for everyone to scale.

Built with โค๏ธ for rapid Laravel development by Rifat.