Skip to content

Directory Structure

Tachi Kit uses the standard Laravel layout. This page covers only what the kit adds or relies on.

app/
├── Actions/Fortify/ CreateNewUser, ResetUserPassword
├── Concerns/ GeneratesUserCode, validation rule traits
├── Console/Commands/ tachi:types, tachi:superadmin
├── Enums/ Permission, RoleName, ActivityEvent
├── Http/
│ ├── Controllers/ Dashboard, User, Role, Activity
│ │ └── Settings/ Profile, Security, Avatar
│ ├── Middleware/ HandleInertiaRequests (shared props), HandleAppearance
│ ├── Requests/ DataTableRequest, Store/Update User & Role requests
│ │ └── Settings/ Profile, password and avatar requests
│ └── Resources/ RoleResource
├── Listeners/ LogAuthenticationActivity
├── Models/ User, Role
├── Policies/ UserPolicy, RolePolicy, ActivityPolicy
└── Providers/ AppServiceProvider (Gate::before), FortifyServiceProvider
config/tachi.php Kit-level settings
database/seeders/ DatabaseSeeder, RolePermissionSeeder, DemoUserSeeder
routes/
├── web.php Dashboard, users, roles, activity
├── settings.php Profile, avatar, security, appearance
└── console.php Scheduled activitylog:clean
File Why you’ll open it
app/Enums/Permission.php Add or rename permissions.
app/Enums/RoleName.php The built-in system roles.
app/Enums/ActivityEvent.php Activity log events and their sentences.
app/Providers/AppServiceProvider.php Policy registration and the superadmin Gate::before bypass.
app/Providers/FortifyServiceProvider.php Auth views, login rules, rate limits, the registration gate.
app/Http/Middleware/HandleInertiaRequests.php Props shared with every page (auth.can, auth.roles, canRegister…).
resources/js/
├── app.tsx Inertia bootstrap and layout resolution
├── pages/ One folder per feature (users/, roles/, activity/, settings/, auth/)
├── layouts/ App (sidebar/header), auth and settings layouts
├── components/ Kit components (data-table, stat-card, avatar-upload…)
│ ├── ui/ shadcn/ui primitives
│ └── dashboard/ Sign-ups chart, recent users table
├── constants/
│ ├── navigation.ts Sidebar and global search items
│ ├── permissions.ts PERMISSIONS, groups, labels (re-exported)
│ ├── roles.ts ROLES (re-exported)
│ └── access.generated.ts GENERATED from the PHP enums
├── hooks/ usePermissions, useAppearance, useFlashToast…
├── types/ Shared TypeScript types
├── utils/role-color.ts Role badge colors
├── actions/ GENERATED by Wayfinder (controller actions)
└── routes/ GENERATED by Wayfinder (named routes)
resources/css/app.css Theme tokens (colors, radius, charts)

Three places are generated. Don’t edit them by hand; change the source and regenerate.

Output Source Regenerate with Committed?
resources/js/constants/access.generated.ts Permission and RoleName enums php artisan tachi:types Yes. A test fails when it’s stale.
resources/js/actions/** Controllers php artisan wayfinder:generate --with-form No (gitignored)
resources/js/routes/** Named routes php artisan wayfinder:generate --with-form No (gitignored)

You rarely need to run Wayfinder by hand: its Vite plugin regenerates the helpers (with --with-form) whenever Vite starts or builds, and whenever a file in routes/ or app/Http/ changes.

tests/Feature/
├── Auth/ Fortify flows
├── Console/ tachi:types, tachi:superadmin
├── Settings/ Profile, security, avatar
├── Seeders/ DatabaseSeeder behavior
├── ActivityLogTest.php
├── DashboardTest.php
├── RolesTest.php
├── SharedPropsTest.php
└── UsersTest.php