
The Genesis of NertiaKit
What Makes NertiaKit Different
Modern Tech Stack
- Laravel 11 for a robust backend
- Inertia.js + React for seamless SPA experience
- TypeScript for better type safety
- ShadcnUI for beautiful, accessible components
- TailwindCSS for responsive styling
Developer Experience
- Pre-configured layouts for authenticated and guest views
- Type-safe data sharing between Laravel and React
- Role-based navigation system
- Organized route and controller structure
- Comprehensive type definitions
- Hot module replacement in development
const { auth, app } = usePage<PageProps>().props;
return (
<div>
<h1>{app.name}</h1>
{auth.user && <p>Welcome, {auth.user.name}</p>}
</div>
);export type PageProps<T = {}> = T & {
auth: { user: User };
app: {
name: string;
tagline: string;
};
flash: {
success?: string;
error?: string;
};
};Role-Based Access Control
// database/seeders/RoleSeeder.php
public function run(): void
{
Role::create(['name' => 'admin']);
Role::create(['name' => 'user']);
}
// Assigning roles on registration
$user->assignRole('user');Navigation System
const navigation = [
{
title: 'Dashboard',
url: route('dashboard'),
icon: LayoutDashboard,
isActive: route().current('dashboard')
},
{
title: 'Users',
url: route('admin.users.index'),
icon: Users,
isActive: route().current('admin.users.*'),
viewBy: 'admin'
}
];Route Organization
// routes/admin.php
Route::middleware(['auth', 'role:admin'])
->prefix('admin')
->name('admin.')
->group(function () {
Route::resource('users', UserController::class);
});Getting Started
Option 1: Use as Template
- Click "Use this template" on GitHub
- Create your repository
- Clone and setup:
git clone https://github.com/your-username/your-project.git
cd your-project
composer install
npm install
npm run dev
cp .env.example .env
php artisan key:generate
php artisan migrate --seedOption 2: Fork and Customize
- Email: admin@example.com
- Password: password
Future Development
- API authentication setup
- More UI components and layouts
- Enhanced testing setup
- Additional role presets
- Improved documentation