rifatxtra / laravel-featurekit
The professional Laravel Feature-Driven Starter Kit (Laravel Feature Kit) with Inertia.js v2, React 19, and Tailwind CSS v4.
Package info
github.com/rifatxtra/Laravel-FeatureKit
Language:JavaScript
Type:project
pkg:composer/rifatxtra/laravel-featurekit
Requires
- php: ^8.2
- inertiajs/inertia-laravel: ^3.0
- laravel/framework: ^12.0
- laravel/tinker: ^2.10.1
Requires (Dev)
- fakerphp/faker: ^1.23
- laravel/pail: ^1.2.2
- laravel/pint: ^1.24
- laravel/sail: ^1.41
- mockery/mockery: ^1.6
- nunomaduro/collision: ^8.6
- phpunit/phpunit: ^11.5.50
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'strustProxies. - 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β newGET /admin/traffic/realtimeREST 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
.icofile. - Smart Maintenance Mode:
- Admin Bypass: Keeps admins productive by allowing access to
/adminand/authroutes 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.
- Admin Bypass: Keeps admins productive by allowing access to
- 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
GeneralMailclass 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 Authormake:feature Dashboard Admin). - π¨ Tailwind CSS v4: Semantic
@themedesign 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 devlaunches the Laravel server, queue listener, Pail log viewer, and Vite HMR simultaneously viaconcurrently. - ποΈ Zero-Config Routing: Routes inside
app/Features/*/routes/web.phpandapi.phpare auto-discovered at boot β no manual registration needed. - π‘οΈ Built-in Middleware:
HandleInertiaRequests(shares auth, flash, CSRF, config to all pages) +RoleMiddleware(gate routes withrole: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, runphp artisan queue:workalongsidecomposer 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_logstable
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
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
π License
MIT Licensed. Open for everyone to scale.
Built with β€οΈ for rapid Laravel development by Rifat.