Skip to content

Commit 841d941

Browse files
committed
docs
1 parent 04b5925 commit 841d941

21 files changed

+19350
-0
lines changed

docs/.gitignore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Nuxt dev/build outputs
2+
.output
3+
.data
4+
.nuxt
5+
.nitro
6+
.cache
7+
dist
8+
9+
# Node dependencies
10+
node_modules
11+
12+
# Logs
13+
logs
14+
*.log
15+
16+
# Misc
17+
.DS_Store
18+
.fleet
19+
.idea
20+
.eslintcache
21+
22+
# Local env files
23+
.env
24+
.env.*
25+
!.env.example
26+
27+
# npm pack
28+
*.tgz
29+
30+
# Temp files
31+
.tmp
32+
.profile
33+
*.0x
34+
35+
#VSC
36+
.history
37+
.wrangler

docs/app.config.ts

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
export default defineAppConfig({
2+
docus: {
3+
title: 'Flowforge',
4+
description: 'Transform any Laravel model into production-ready drag-and-drop Kanban boards.',
5+
url: 'https://flowforge.dev',
6+
image: '/social-card.png',
7+
github: {
8+
dir: 'docs/content',
9+
branch: '2.x',
10+
repo: 'flowforge',
11+
owner: 'Relaticle',
12+
edit: true
13+
},
14+
header: {
15+
logo: {
16+
alt: 'Flowforge Logo',
17+
light: '/logo-light.svg',
18+
dark: '/logo-dark.svg'
19+
},
20+
showLinkIcon: false,
21+
fluid: false,
22+
iconLinks: [
23+
{
24+
href: 'https://github.com/relaticle/flowforge',
25+
icon: 'simple-icons:github'
26+
}
27+
]
28+
}
29+
},
30+
socials: {
31+
github: 'https://github.com/Relaticle/flowforge',
32+
discord: 'https://discord.gg/b9WxzUce4Q'
33+
},
34+
ui: {
35+
colors: {
36+
primary: 'violet',
37+
neutral: 'zinc'
38+
}
39+
}
40+
})

docs/components/AppHeaderLogo.vue

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<script setup lang="ts">
2+
const appConfig = useAppConfig()
3+
</script>
4+
5+
<template>
6+
<UColorModeImage
7+
v-if="appConfig.docus?.header?.logo?.dark || appConfig.docus?.header?.logo?.light"
8+
:light="appConfig.docus?.header?.logo?.light || appConfig.docus?.header?.logo?.dark"
9+
:dark="appConfig.docus?.header?.logo?.dark || appConfig.docus?.header?.logo?.light"
10+
:alt="appConfig.docus?.header?.logo?.alt || appConfig.docus?.title"
11+
class="h-8 w-auto shrink-0"
12+
/>
13+
<span v-else class="text-lg font-semibold">
14+
{{ appConfig.docus?.title || 'Flowforge' }}
15+
</span>
16+
</template>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
title: Getting Started
2+
icon: false
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
title: Introduction
3+
description: Transform any Laravel model into production-ready drag-and-drop Kanban boards.
4+
navigation:
5+
icon: i-lucide-home
6+
seo:
7+
title: Introduction
8+
description: Learn about Flowforge - the Laravel package that creates Kanban boards from Eloquent models for Filament 4.x.
9+
---
10+
11+
Welcome to **Flowforge**, a powerful Laravel package that transforms any Eloquent model into production-ready drag-and-drop Kanban boards.
12+
13+
## What is Flowforge?
14+
15+
Flowforge is built specifically for Filament 4.x admin panels, providing a seamless way to visualize and manage your data through intuitive Kanban interfaces. Whether you're tracking tasks, managing leads, or organizing any workflow, Flowforge handles the complex parts so you can focus on your business logic.
16+
17+
![Flowforge Kanban Board Preview](/preview.png)
18+
19+
## Why Choose Flowforge?
20+
21+
::card-group
22+
:::card
23+
---
24+
icon: i-lucide-zap
25+
title: Production-Ready Performance
26+
---
27+
Handles 100+ cards per column with intelligent pagination, infinite scroll, and optimistic UI updates.
28+
:::
29+
30+
:::card
31+
---
32+
icon: i-lucide-clock
33+
title: Quick Setup
34+
---
35+
Get running in 90 seconds. Add a position column, generate your board, and you're ready to go.
36+
:::
37+
38+
:::card
39+
---
40+
icon: i-lucide-layers
41+
title: 3 Integration Patterns
42+
---
43+
Use as Filament Pages, Resource integration, or standalone Livewire components - whatever fits your needs.
44+
:::
45+
46+
:::card
47+
---
48+
icon: i-lucide-palette
49+
title: Fully Customizable
50+
---
51+
Rich card schemas, custom actions, search & filtering, themes, and complete UI control.
52+
:::
53+
::
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
title: Installation
3+
description: Get started with Flowforge in 90 seconds.
4+
navigation:
5+
icon: i-lucide-download
6+
seo:
7+
description: Install Flowforge and create your first Kanban board.
8+
---
9+
10+
## Requirements
11+
12+
- **PHP:** 8.3+
13+
- **Laravel:** 11+
14+
- **Filament:** 4.x
15+
- **Database:** MySQL, PostgreSQL, SQLite, SQL Server, MariaDB
16+
17+
## Quick Setup
18+
19+
::steps
20+
### Install Package
21+
22+
```bash [Terminal]
23+
composer require relaticle/flowforge
24+
```
25+
26+
### Include CSS Assets
27+
28+
::alert{type="warning"}
29+
If you haven't set up a custom theme for Filament, follow the [Filament Docs](https://filamentphp.com/docs/4.x/styling/overview#creating-a-custom-theme) first.
30+
::
31+
32+
Add the plugin's views to your theme CSS file:
33+
34+
```css [resources/css/app.css]
35+
@source "../../../../vendor/relaticle/flowforge/resources/views/**/*.blade.php";
36+
```
37+
38+
### Add Position Column
39+
40+
Create a migration to add the position column:
41+
42+
```bash [Terminal]
43+
php artisan make:migration add_position_to_tasks_table
44+
```
45+
46+
```php [migration]
47+
Schema::table('tasks', function (Blueprint $table) {
48+
$table->flowforgePositionColumn('position'); // Handles database-specific collations automatically
49+
});
50+
```
51+
52+
### Generate Board
53+
54+
```bash [Terminal]
55+
php artisan flowforge:make-board TaskBoard --model=Task
56+
```
57+
58+
### Register Page
59+
60+
```php [AdminPanelProvider.php]
61+
->pages([
62+
App\Filament\Pages\TaskBoard::class,
63+
])
64+
```
65+
::
66+
67+
**Done!** Visit your Filament panel to see your Kanban board in action.
68+
69+
## Optional Commands
70+
71+
| Command | Action |
72+
|---------|--------|
73+
| `php artisan flowforge:repair-positions` | Fix corrupted or missing position data |
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
title: Essentials
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
---
2+
title: Integration Patterns
3+
description: Three ways to integrate Flowforge into your application.
4+
navigation:
5+
icon: i-lucide-layers
6+
---
7+
8+
Flowforge provides three flexible integration patterns to fit different use cases and application architectures.
9+
10+
## Pattern 1: Filament Page (Recommended)
11+
12+
Perfect for dedicated board pages in your admin panel.
13+
14+
```php
15+
<?php
16+
17+
namespace App\Filament\Pages;
18+
19+
use App\Models\Task;
20+
use Relaticle\Flowforge\Board;
21+
use Relaticle\Flowforge\BoardPage;
22+
use Relaticle\Flowforge\Column;
23+
24+
class TaskBoard extends BoardPage
25+
{
26+
protected static ?string $navigationIcon = 'heroicon-o-view-columns';
27+
28+
public function board(Board $board): Board
29+
{
30+
return $board
31+
->query(Task::query())
32+
->columnIdentifier('status')
33+
->positionIdentifier('position')
34+
->columns([
35+
Column::make('todo')->label('To Do')->color('gray'),
36+
Column::make('in_progress')->label('In Progress')->color('blue'),
37+
Column::make('completed')->label('Completed')->color('green'),
38+
]);
39+
}
40+
}
41+
```
42+
43+
**Use when:** You want a standalone Kanban page in your admin panel
44+
**Benefits:** Full Filament integration, automatic registration, built-in actions
45+
46+
## Pattern 2: Resource Integration
47+
48+
Integrate with your existing Filament resources. Perfect for campaign management where teams track tasks within campaigns.
49+
50+
```php
51+
<?php
52+
53+
namespace App\Filament\Resources\CampaignResource\Pages;
54+
55+
use App\Filament\Resources\CampaignResource;
56+
use Relaticle\Flowforge\Board;
57+
use Relaticle\Flowforge\BoardResourcePage;
58+
use Relaticle\Flowforge\Column;
59+
60+
class CampaignTaskBoard extends BoardResourcePage
61+
{
62+
protected static string $resource = CampaignResource::class;
63+
64+
public function board(Board $board): Board
65+
{
66+
return $board
67+
->query(
68+
// Get tasks for this specific campaign and current user's team
69+
$this->getRecord()
70+
->tasks()
71+
->whereHas('team', fn($q) => $q->where('id', auth()->user()->current_team_id))
72+
->getQuery()
73+
)
74+
->columnIdentifier('status')
75+
->positionIdentifier('position')
76+
->columns([
77+
Column::make('backlog')->label('Backlog')->color('gray'),
78+
Column::make('in_progress')->label('In Progress')->color('blue'),
79+
Column::make('review')->label('Review')->color('amber'),
80+
Column::make('completed')->label('Completed')->color('green'),
81+
]);
82+
}
83+
}
84+
85+
// Register in your CampaignResource
86+
public static function getPages(): array
87+
{
88+
return [
89+
'index' => Pages\ListCampaigns::route('/'),
90+
'create' => Pages\CreateCampaign::route('/create'),
91+
'edit' => Pages\EditCampaign::route('/{record}/edit'),
92+
'tasks' => Pages\CampaignTaskBoard::route('/{record}/tasks'), // Add this line
93+
];
94+
}
95+
```
96+
97+
**Use when:** You want to add Kanban to existing Filament resources
98+
**Benefits:** Inherits resource permissions, policies, and global scopes
99+
100+
## Pattern 3: Standalone Livewire
101+
102+
Use outside of Filament or in custom applications.
103+
104+
```php
105+
<?php
106+
107+
namespace App\Livewire;
108+
109+
use App\Models\Task;
110+
use Filament\Actions\Concerns\InteractsWithActions;
111+
use Filament\Actions\Contracts\HasActions;
112+
use Filament\Forms\Concerns\InteractsWithForms;
113+
use Filament\Forms\Contracts\HasForms;
114+
use Livewire\Component;
115+
use Relaticle\Flowforge\Board;
116+
use Relaticle\Flowforge\Column;
117+
use Relaticle\Flowforge\Concerns\InteractsWithBoard;
118+
use Relaticle\Flowforge\Contracts\HasBoard;
119+
120+
class TaskBoard extends Component implements HasBoard, HasActions, HasForms
121+
{
122+
use InteractsWithBoard;
123+
use InteractsWithActions;
124+
use InteractsWithForms;
125+
126+
public function board(Board $board): Board
127+
{
128+
return $board
129+
->query(Task::query())
130+
->columnIdentifier('status')
131+
->positionIdentifier('position')
132+
->columns([
133+
Column::make('todo')->label('To Do')->color('gray'),
134+
Column::make('in_progress')->label('In Progress')->color('blue'),
135+
Column::make('completed')->label('Completed')->color('green'),
136+
]);
137+
}
138+
139+
public function render()
140+
{
141+
return view('livewire.task-board');
142+
}
143+
}
144+
```
145+
146+
```blade
147+
{{-- resources/views/livewire/task-board.blade.php --}}
148+
<div>
149+
<h1 class="text-2xl font-bold mb-6">Task Board</h1>
150+
{{ $this->board }}
151+
</div>
152+
```
153+
154+
**Use when:** Building custom interfaces or non-Filament applications
155+
**Benefits:** Maximum flexibility, custom styling, independent routing

0 commit comments

Comments
 (0)