Skip to content

Commit 30ea8e0

Browse files
committed
Reframe hero as user problems and add quick-start + ecosystem pages
- Hero tagline + 6 feature cards rewritten from inventory-listing to problem-first framing - New guide/quick-start.md: 5-step concrete onboarding (install, base classes, trim+helpers, behavior, next steps) - New guide/ecosystem.md: map of Tools dependencies, frequently-paired plugins, and the wider author-plugin family - Sidebar Getting Started group includes both new entries
1 parent ae1dd80 commit 30ea8e0

4 files changed

Lines changed: 137 additions & 15 deletions

File tree

docs/.vitepress/config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ function unifiedSidebar() {
66
text: 'Getting Started',
77
items: [
88
{ text: 'Overview', link: '/guide/' },
9+
{ text: '5-min Quick Start', link: '/guide/quick-start' },
910
{ text: 'Installation', link: '/guide/install' },
1011
{ text: 'Upgrade Guide', link: '/guide/upgrade' },
1112
{ text: 'Shims', link: '/guide/shims' },
1213
{ text: 'Tools Backend', link: '/guide/backend' },
14+
{ text: 'Plugin Ecosystem', link: '/guide/ecosystem' },
1315
],
1416
},
1517
{

docs/guide/ecosystem.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Plugin Ecosystem
2+
3+
Tools sits at the center of a small family of CakePHP plugins by the same maintainer. Each one has a specific job — Tools pulls in the few it depends on, and the others are opt-in.
4+
5+
## What Tools depends on (auto-installed)
6+
7+
| Plugin | Why Tools needs it |
8+
| --- | --- |
9+
| [cakephp-shim](https://github.com/dereuromark/cakephp-shim) | 4.x → 5.x BC shims (validation, model property style, etc.). Letting you migrate apps gradually instead of rewriting. |
10+
11+
## Frequently paired with Tools
12+
13+
These are not dependencies, but they're commonly installed alongside Tools because they extend the same areas.
14+
15+
| Plugin | What it adds | When to add it |
16+
| --- | --- | --- |
17+
| [cakephp-setup](https://github.com/dereuromark/cakephp-setup) | Bake theme + setup commands + a small admin sidebar layout. | When you want a head start on baking and an opinionated admin shell. |
18+
| [cakephp-ide-helper](https://github.com/dereuromark/cakephp-ide-helper) | PHPStorm meta files for CakePHP — autocomplete on association calls, `loadModel()`, etc. | When using PHPStorm. Always. |
19+
| [cakephp-icon](https://github.com/dereuromark/cakephp-icon) | Icon helper (Font Awesome / Bootstrap / custom collections). | The dedicated replacement for the deprecated [`Tools\View\Helper\IconHelper`](/helper/icon). |
20+
| [cakephp-tools-extra](https://gitlab.com/markscherer/cakephp-tools-extra) | Less-stable utilities that don't meet the Tools quality bar yet. | If you need bleeding-edge bits. |
21+
| [cakephp-setup-extra](https://gitlab.com/markscherer/cakephp-setup-extra) | Same role for Setup. | Same caveat. |
22+
23+
## Other plugins from the same author
24+
25+
Worth knowing about, even if Tools doesn't depend on them.
26+
27+
- **[cakephp-queue](https://github.com/dereuromark/cakephp-queue)** — background jobs.
28+
- **[cakephp-tinyauth](https://github.com/dereuromark/cakephp-tinyauth)** — INI-based ACL.
29+
- **[cakephp-geo](https://github.com/dereuromark/cakephp-geo)** — Geocoder behavior, GoogleMapsV3 helper.
30+
- **[cakephp-fixture-factories](https://github.com/dereuromark/cakephp-fixture-factories)** — factory-pattern test fixtures.
31+
- **[cakephp-dto](https://github.com/dereuromark/cakephp-dto)** — generated DTO classes from XML.
32+
- **[cakephp-templating](https://github.com/dereuromark/cakephp-templating)** — extra template helpers and view utilities.
33+
34+
Browse the full list at <https://github.com/dereuromark?tab=repositories&q=cakephp>.

docs/guide/quick-start.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# 5-min Quick Start
2+
3+
Get the most common Tools features wired up in five minutes.
4+
5+
## 1. Install
6+
7+
```bash
8+
composer require dereuromark/cakephp-tools
9+
bin/cake plugin load Tools
10+
```
11+
12+
## 2. Use the Tools base classes
13+
14+
In every Table, extend the Tools `Table`:
15+
16+
```php
17+
namespace App\Model\Table;
18+
19+
use Tools\Model\Table\Table;
20+
21+
class UsersTable extends Table {}
22+
```
23+
24+
In every Entity, extend the Tools `Entity`:
25+
26+
```php
27+
namespace App\Model\Entity;
28+
29+
use Tools\Model\Entity\Entity;
30+
31+
class User extends Entity {}
32+
```
33+
34+
You now have access to the extra validation rules ([URL](/reference/url), email/phone formats, ranges), `tokens` integration, native [Enum](/model/enum) helpers — see [Table](/model/table) for the full list.
35+
36+
## 3. Auto-trim POSTs and load the helpers
37+
38+
In `AppController`:
39+
40+
```php
41+
namespace App\Controller;
42+
43+
use Tools\Controller\Controller;
44+
45+
class AppController extends Controller {
46+
public function initialize(): void {
47+
parent::initialize();
48+
$this->loadComponent('Tools.Common'); // auto-trim POST data so notEmpty validation works
49+
}
50+
}
51+
```
52+
53+
In `AppView`:
54+
55+
```php
56+
public function initialize(): void {
57+
parent::initialize();
58+
$this->loadHelper('Tools.Common');
59+
$this->loadHelper('Tools.Format');
60+
}
61+
```
62+
63+
That's the minimum — `Common` covers misc rendering, `Format` covers numbers/dates/badges/status pills.
64+
65+
## 4. Add a behavior to a Table
66+
67+
Every behavior is a one-liner in `initialize()`:
68+
69+
```php
70+
class ArticlesTable extends Table {
71+
public function initialize(array $config): void {
72+
parent::initialize($config);
73+
$this->addBehavior('Tools.Slugged', ['field' => 'title']);
74+
}
75+
}
76+
```
77+
78+
Browse the [behaviors index](/behavior/) for the full list — each page has a minimal config example.
79+
80+
## 5. Where to next
81+
82+
- [Behaviors](/behavior/) — Slugged, Bitmasked, Passwordable, Jsonable, Reset, Toggle, AfterSave, String, Encryption, Typographic
83+
- [Helpers](/helper/) — Common, Format, Form, Html, Tree, Progress, Meter, Typography, Icon
84+
- [Components](/component/) — Common, Mobile, RefererRedirect
85+
- [Live Sandbox](https://sandbox.dereuromark.de/sandbox/tools-examples) — runnable examples for most features
86+
- [Plugin Ecosystem](/guide/ecosystem) — how Tools fits with Shim, Setup, IDE Helper, and friends

docs/index.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ layout: home
44
hero:
55
name: cakephp-tools
66
text: The CakePHP Toolbox
7-
tagline: Behaviors, helpers, components, model and entity utilities — the swiss-army-knife plugin for CakePHP applications.
7+
tagline: Stop reinventing slugs, password flows, bitmasks, and the dozen helpers you copy into every CakePHP app.
88
image:
99
src: /logo.svg
1010
alt: cakephp-tools
1111
actions:
1212
- theme: brand
13-
text: Get Started
14-
link: /guide/
13+
text: 5-min Quick Start
14+
link: /guide/quick-start
1515
- theme: alt
1616
text: Live Sandbox
1717
link: https://sandbox.dereuromark.de/sandbox/tools-examples
@@ -21,21 +21,21 @@ hero:
2121

2222
features:
2323
- icon: 🧱
24-
title: Behaviors
25-
description: Ten production-ready ORM behaviors — Bitmasked, Slugged, Passwordable, Jsonable, Reset, Toggle, AfterSave, String, Encryption, Typographic.
24+
title: Behaviors you'd write yourself anyway
25+
details: Slugs, bitmasks, password change with confirm, JSON columns, soft toggles — ten battle-tested ORM behaviors instead of a folder full of half-finished traits.
2626
- icon: 🎨
27-
title: Helpers
28-
description: View helpers for HTML, Form, Format, Tree, Progress, Meter, Typography, Icon, and a Common helper covering frequent app needs.
29-
- icon: 🧩
30-
title: Components
31-
description: Common, Mobile, RefererRedirect — drop-in controller components for the boilerplate you would otherwise write yourself.
27+
title: Your AppView, pre-loaded
28+
details: Format, Html, Form, Tree, Progress and a Common helper covering the rendering you keep adding to every project. Load two helpers and stop writing element wrappers.
3229
- icon: 🗃️
33-
title: Model & Entity
34-
description: Improved Table base class with extra validation rules, native Enum and StaticEnum traits, and Tokens table for one-time link / token flows.
30+
title: A Table base that knows the things you forgot
31+
details: Validation rules core CakePHP doesn't ship (URL, email, phone, ranges), plus Tokens for one-time login links and native Enum integration.
32+
- icon: 🧩
33+
title: Controller boilerplate, gone
34+
details: Auto-trim POST data so empty validation behaves. Mobile detection. Safe redirect-to-referer with allow-listing. Three components instead of three new files in src/Controller/Component.
3535
- icon: 🌍
36-
title: I18n & Routing
37-
description: Locale detection and switching, improved DateTime / Date handling, plus URL generation utilities.
36+
title: i18n + URL helpers without the dance
37+
details: Detect and switch locale with one component call. Improved DateTime/Date handling. URL generation utilities for the cases the core helper doesn't cover.
3838
- icon: 🛠️
3939
title: Plus the rest
40-
description: ExceptionTrap for cleaner error handling, FileLog for one-line custom logging, login-link auth flow, Datalist widget, Inflect command, and more.
40+
details: ExceptionTrap for cleaner errors, FileLog for one-line custom logging, login-link auth flow, Datalist widget, Inflect command. The whole [plugin ecosystem](/guide/ecosystem) connects them.
4141
---

0 commit comments

Comments
 (0)