rifatxtra / laravel-featurekit
The professional Laravel MVC Starter Kit (Laravel Feature Kit) with Inertia.js v3, 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 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/Modelsas 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'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/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โ newGET /admin/traffic/realtimeREST 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
.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/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
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.
- ๐จ 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. - ๐๏ธ Clean Routing: Centralized, explicit routing in
routes/web.phpandroutes/api.phpโ no manual discovery overhead. - ๐ก๏ธ 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/
โ โโโ 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_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.