rifatxtra/laravel-featurekit

The professional Laravel Feature-Driven Starter Kit (Laravel Feature Kit) with Inertia.js v2, 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: 9

Dependents: 0

Suggesters: 0

Stars: 0

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

This package is auto-updated.

Last update: 2026-04-12 10:19:08 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 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/Features/TrafficAnalytics/Models/TrafficLog.php β€” new fillable fields, casts, and query scopes.
  • app/Features/TrafficAnalytics/Middleware/TrackTraffic.php β€” captures response time, status code, session ID; proxy-aware IP resolution.
  • app/Features/TrafficAnalytics/Jobs/ProcessTrafficLog.php β€” geo lookup, new vs returning detection, extended browser/OS/bot parsing.
  • app/Features/TrafficAnalytics/Admin/Services/TrafficAnalyticsService.php β€” 16 aggregations + real-time stats endpoint.
  • app/Features/TrafficAnalytics/Admin/Controllers/TrafficController.php β€” new GET /admin/traffic/realtime REST endpoint.
  • app/Features/TrafficAnalytics/Admin/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/Features/SystemSettings/ β€” Entire domain for settings logic.
  • app/Core/Utils/FaviconUtil.php β€” Image to ICO conversion utility.
  • app/Core/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

  • πŸ›οΈ Feature-Driven Architecture: Self-contained domains in app/Features/ β€” each feature owns its Controllers, Services, Models, Requests, Observers, Events, Exceptions & Routes.
  • βš›οΈ 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.
  • πŸ—οΈ 7 Custom Artisan Commands: Generate entire features, controllers, services, requests, events, observers, and exceptions with flexible positional arguments (e.g., make:feature Auth or make:feature Dashboard Admin).
  • 🎨 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.
  • πŸ—„οΈ Zero-Config Routing: Routes inside app/Features/*/routes/web.php and api.php are auto-discovered at boot β€” no manual registration needed.
  • πŸ›‘οΈ 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/
β”‚   β”œβ”€β”€ Console/Commands/       # 7 custom Artisan scaffolding commands
β”‚   β”œβ”€β”€ Core/                   # BaseController, BaseService, ApiResponseTrait, BaseException
β”‚   β”‚   └── Middleware/         # HandleInertiaRequests, RoleMiddleware, CheckMaintenanceMode
β”‚   β”œβ”€β”€ Features/               # πŸ›οΈ Feature-Driven Domains
β”‚   β”‚   β”œβ”€β”€ Auth/               # Login, Register, ForgotPassword (full implementation)
β”‚   β”‚   β”œβ”€β”€ TrafficAnalytics/   # πŸ“Š Analytics console β€” middleware, job, service, dashboard
β”‚   β”‚   β”‚   β”œβ”€β”€ Middleware/     # TrackTraffic (response time, IP, session capture)
β”‚   β”‚   β”‚   β”œβ”€β”€ Jobs/           # ProcessTrafficLog (geo, bot detection, UA parsing)
β”‚   β”‚   β”‚   β”œβ”€β”€ Models/         # TrafficLog
β”‚   β”‚   β”‚   └── Admin/          # TrafficController, TrafficAnalyticsService, routes
β”‚   β”‚   └── Landing/            # Home, Documentation, Features pages
β”‚   β”œβ”€β”€ Mail/                   # GeneralMail (universal queued mailable)
β”‚   └── 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

v2.2.0 β€” Traffic Analytics Console (Current)

  • ✨ 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.