| Install | |
|---|---|
composer require jeffersongoncalves/teamkitv4 |
|
| Latest Version: | 4.9.0 |
| PHP: | ^8.3 |

TeamKit is a robust starter kit built on Laravel 13.x and Filament 4.x, designed to accelerate the development of modern web applications with a ready-to-use multi-panel structure.
/admin) - For system administrators/app) - For authenticated application usersconfig/teamkit.php fileClone the repository
laravel new my-app --using=jeffersongoncalves/teamkitv4 --database=mysql
Or use FilaKit CLI for a simplified setup:
filakit new my-app --kit=jeffersongoncalves/teamkitv4
Install FilaKit CLI:
composer global require jeffersongoncalves/filakit-cli
TeamKit can be easily installed using the following command:
php install.php
This command automates the installation process by:
Install JavaScript dependencies
pnpm install
Install Composer dependencies
composer install
Set up environment
cp .env.example .env
php artisan key:generate
Configure your database in the .env file
Run migrations
php artisan migrate
Run the server
php artisan serve
Clone the repository
laravel new my-app --using=jeffersongoncalves/teamkitv4 --database=mysql
Move into the project directory
cd my-app
Install Composer dependencies
composer install
Set up environment
cp .env.example .env
Configuring custom ports may be necessary if you have other services running on the same ports.
# Application Port (ex: 8080)
APP_PORT=8080
# MySQL Port (ex: 3306)
FORWARD_DB_PORT=3306
# Redis Port (ex: 6379)
FORWARD_REDIS_PORT=6379
# Mailpit Port (ex: 1025)
FORWARD_MAILPIT_PORT=1025
Start the Sail containers
./vendor/bin/sail up -d
You won’t need to run php artisan serve, as Laravel Sail automatically handles the development server within the container.
Attach to the application container
./vendor/bin/sail shell
Generate the application key
php artisan key:generate
Install JavaScript dependencies
pnpm install
TeamKit comes pre-configured with a custom authentication system that supports different types of users:
Admin - For administrative panel accessUser - For application panel accessTeamkit includes native support for Teams (multitenancy) in the application panel (/app). This allows you to isolate data by team and provide a multi‑company/multi‑project experience.
Key points:
App\Models\Team with fields user_id (owner), name, and personal_team.current_team_id and helper methods for team management.Team::class, tenant route prefix team, a team registration page, and a team profile page.URLs and navigation:
/app/app/team/register (also accessible via the user menu under Tenancy)/app/team/{id}/profile – managed by Filament)Creating and managing teams:
/app/team/register, enter the team name. The authenticated user becomes the team owner (user_id).name.$user->switchTeam($team).User ↔ team association:
user_id).User::teams()/Team::users() uses the pivot represented by App\Models\Membership.User::canAccessTenant($tenant) validates whether the user belongs to the team (owner or member). The User::getTenants() method returns the list for the switcher.Team invitations (new):
Team‑scoped data:
App\Http\Middleware\ApplyTenantScopes is prepared for you to apply global scopes to your models, for example:
// Example (uncomment and adapt):
// SomeModel::addGlobalScope(
// fn (Builder $query) => $query->whereBelongsTo(Filament::getTenant()),
// );
Relevant migrations:
database/migrations/0001_01_01_000005_create_teams_table.php
teams table with: id, user_id (indexed), name, and personal_team (boolean), plus timestamps.database/migrations/0001_01_01_000007_create_team_invitations_table.php
team_invitations table to store pending invitations per team and email.Filament pages related to Teams:
App\Filament\App\Pages\Tenancy\RegisterTeam (uses Filament\Pages\Tenancy\RegisterTenant).App\Filament\App\Pages\Tenancy\EditTeamProfile (uses Filament\Pages\Tenancy\EditTenantProfile).App\Filament\App\Pages\TeamInvitationAccept — user menu → “Invitations” in the App panel.App panel configuration (summary):
App\Providers\Filament\AppPanelProvider
->tenant(Team::class)->tenantRoutePrefix('team')->tenantRegistration(RegisterTeam::class)->tenantProfile(EditTeamProfile::class)TeamInvitationAccept::getUrl() when a team is active->tenantMiddleware([ApplyTenantScopes::class], isPersistent: true)Tips:
Team and apply the scope in the middleware or in your queries.User::currentTeam is resolved automatically if current_team_id is empty (it falls back to the personal team if it exists).# Run the development server with logs, queues and asset compilation
composer dev
# Or run each component separately
php artisan serve
php artisan queue:listen --tries=1
pnpm run dev
Panels can be customized through their respective providers:
app/Providers/Filament/AdminPanelProvider.phpapp/Providers/Filament/AppPanelProvider.phpapp/Providers/Filament/PublicPanelProvider.phpAlternatively, these settings are also consolidated in the config/teamkit.php file for easier management.
Each panel can have its own color scheme, which can be easily modified in the corresponding Provider files or in the
teamkit.php configuration file.
The config/teamkit.php file centralizes the configuration of the starter kit, including:
This project already comes with the Filament Edit Profile plugin integrated for the Admin and App panels. It adds a complete profile editing page with avatar, language, theme color, security (tokens, MFA), browser sessions, and email/password change.
Where to configure
Panel providers
General settings: config/filament-edit-profile.php
Migrations and models
Avatar storage
Quick access
Reference
TeamKit includes support for:
This project is licensed under the MIT License.
Developed by Jefferson Gonçalves.