Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
eb0657b
latte 3.0.22
dg Jun 24, 2025
5315789
fixed a typo
vrana Jun 30, 2025
16b9fdf
fixed a typo
vrana Jun 30, 2025
bf9ad0f
typo
vrana Jul 9, 2025
7f480c3
typo
vrana Jul 16, 2025
748306a
nette/application 3.2.7
dg Jul 17, 2025
9b633a3
php-generator: version is 4.x
dg Aug 6, 2025
bc4f22e
nette/tester 2.5.6
dg Aug 6, 2025
964377b
Typo
vrana Aug 8, 2025
95cea1a
typo
vrana Aug 8, 2025
e8624e2
typo
vrana Sep 10, 2025
e843e34
presenter: info about AbortException
dg Sep 16, 2025
e86ff86
ajax: linked best practices
vrana Sep 23, 2025
10a9a47
typo
vrana Oct 3, 2025
8a77c01
php2latte & twig2latte moved to fiddle.nette.org
dg Oct 20, 2025
e9a1de7
tests: added coverage.html
dg Oct 20, 2025
ddb0479
added @meta
dg Oct 22, 2025
d2fc92c
texy: extensive documentation update
dg Oct 21, 2025
6a97a0c
removed null as an array offset
dg Oct 31, 2025
af99301
typo [Closes #1081]
jtojnar Sep 27, 2025
b07d9ff
latte 3.1.0
dg Nov 26, 2025
2659b49
application: improved info about attributes, added #[Deprecated]
dg Nov 29, 2025
3007b82
application: improved info about template variables and extensions
dg Nov 29, 2025
07f569b
nette/utils 4.0.10
dg Dec 1, 2025
6782ded
nette/application 3.2.9
dg Nov 29, 2025
3bf5b65
adding missing stuff in nette/http
dg Dec 27, 2025
a7c68f4
used first-class callables
dg Jan 4, 2026
a241df7
added coding standard section about global functions and constants
dg Jan 6, 2026
01baf81
Tester 2.6: updated documentation for php.ini loading behavior change
dg Jan 6, 2026
bdef356
added dibi & texy
dg Oct 3, 2025
6d6830c
added ai.nette.org
dg Jan 8, 2026
e65bfff
latte 3.1.2
dg Jan 23, 2026
e129efd
latte: info about whitespace
dg Mar 17, 2026
59d2a04
latte 3.1.3
dg Dec 23, 2025
c5bd290
typo
dg Feb 23, 2026
028623a
latte: changed user template
dg Apr 13, 2026
6eb116a
php-generator: v4.2.2
dg Feb 23, 2026
3ffbfe1
di: documented @Type as service key for modifications
dg Mar 5, 2026
6953c86
nette/mail 4.1.0
dg Mar 27, 2026
94c726c
updated links to PhpStorm plugins
dg Apr 12, 2026
e9ba74f
tracy: open-files-in-ide updated Chrome policy to AutoLaunchProtocols…
dg Apr 12, 2026
35f5b9c
coding standard: added enums.php convention
dg Apr 6, 2026
98f8ba1
Update @home.texy
Ondris Apr 18, 2026
75dfc45
neon: link to fiddle
dg Apr 27, 2026
ac75ce1
texy: extensive documentation update
dg Oct 21, 2025
16ed8f1
removed null as an array offset
dg Oct 31, 2025
09cb748
typo [Closes #1081]
jtojnar Sep 27, 2025
58fd2dd
latte 3.1.0
dg Nov 26, 2025
2e89653
application: improved info about attributes, added #[Deprecated]
dg Nov 29, 2025
b8a006e
application: improved info about template variables and extensions
dg Nov 29, 2025
30af51c
nette/utils 4.0.10
dg Dec 1, 2025
f36f09b
nette/application 3.2.9
dg Nov 29, 2025
85deb86
adding missing stuff in nette/http
dg Dec 27, 2025
5a9eb0c
used first-class callables
dg Jan 4, 2026
69ec6ab
added coding standard section about global functions and constants
dg Jan 6, 2026
231c290
Tester 2.6: updated documentation for php.ini loading behavior change
dg Jan 6, 2026
503c771
added ai.nette.org
dg Jan 8, 2026
29f702d
latte 3.1.2
dg Jan 23, 2026
d450c7c
latte: info about whitespace
dg Mar 17, 2026
72e9a06
latte 3.1.3
dg Dec 23, 2025
1f47096
typo
dg Feb 23, 2026
0b5697c
latte: changed user template
dg Apr 13, 2026
f5b1336
php-generator: v4.2.2
dg Feb 23, 2026
11e75bd
di: documented @Type as service key for modifications
dg Mar 5, 2026
065b028
nette/mail 4.1.0
dg Mar 27, 2026
410dc0e
updated links to PhpStorm plugins
dg Apr 12, 2026
ff68355
tracy: open-files-in-ide updated Chrome policy to AutoLaunchProtocols…
dg Apr 12, 2026
34fb428
coding standard: added enums.php convention
dg Apr 6, 2026
875a57e
latte 3.1.4
dg Dec 23, 2025
b38a86d
latte: develop.texy adds 'Ways to Extend Latte' overview
dg Apr 25, 2026
2ec19e7
nette: add emoji icons to documentation home links
dg Apr 25, 2026
ba1124f
Merge branch 'master' into patch-2
Ondris May 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 11 additions & 0 deletions ai/cs/@home.texy
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Nette AI
********

- [Introduction |guide]
- [Getting Started |getting-started]
- [MCP Inspector |mcp-inspector]
- [Claude Code |claude-code]
- [Tips & Best Practices |tips]

{{maintitle: Nette AI – Vibe Coding with Nette Framework}}
{{description: Build Nette applications with AI assistance. MCP Inspector gives any AI tool deep knowledge of your application's DI container, database, routing, and errors. No hallucinations, just clean code.}}
1 change: 1 addition & 0 deletions ai/cs/@meta.texy
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{sitename: Nette AI}}
11 changes: 11 additions & 0 deletions ai/en/@home.texy
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Nette AI
********

- [Introduction |guide]
- [Getting Started |getting-started]
- [MCP Inspector |mcp-inspector]
- [Claude Code |claude-code]
- [Tips & Best Practices |tips]

{{maintitle: Nette AI – Vibe Coding with Nette Framework}}
{{description: Build Nette applications with AI assistance. MCP Inspector gives any AI tool deep knowledge of your application's DI container, database, routing, and errors. No hallucinations, just clean code.}}
5 changes: 5 additions & 0 deletions ai/en/@left-menu.texy
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- [Introduction |guide]
- [Getting Started |getting-started]
- [MCP Inspector |mcp-inspector]
- [Claude Code |claude-code]
- [Tips & Best Practices |tips]
1 change: 1 addition & 0 deletions ai/en/@meta.texy
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{sitename: Nette AI}}
251 changes: 251 additions & 0 deletions ai/en/claude-code.texy
Original file line number Diff line number Diff line change
@@ -0,0 +1,251 @@
Claude Code Plugin
******************

<div class=perex>

The Nette plugin gives Claude deep knowledge of the framework. Instead of generic PHP advice, you get recommendations that follow Nette conventions – from presenters and forms to Latte templates and database queries.

The plugin includes:
- **10 skills** covering all major areas of Nette development
- **Automatic validation** that catches errors in Latte and NEON files
- **MCP Inspector integration** for real-time application introspection

</div>


Installation
============

If you haven't installed Claude Code yet, see the [complete setup guide |getting-started]. Once Claude Code is running, install the Nette plugin:

```shell
/plugin marketplace add nette/claude-code
/plugin install nette@nette
```


How Skills Work
===============

You don't need to activate skills manually. They turn on automatically based on what you're talking about.

- Ask about "presenter structure" → the `nette-architecture` skill activates
- Ask about "form validation" → the `nette-forms` skill activates
- Ask about "Latte filters" → the `latte-templates` skill activates

This means you get relevant, context-aware help without having to think about which skill you need.


Available Skills
================

Here's what each skill covers:


nette-architecture
------------------

When you're designing your application structure, this skill guides you through:

- **Directory organization** – Where to put presenters, services, entities, and components
- **Module design** – How to split your application into logical modules (Admin, Front, Api)
- **Presenter patterns** – When to use base presenters, how to handle authentication
- **Evolution strategy** – Start minimal, grow organically, refactor when needed

The key principle: Don't over-engineer. Create subdirectories when you have 5+ related files, not before.


nette-configuration
-------------------

Everything about the DI container and NEON configuration:

- **Service registration** – How to define services in `services.neon`
- **Autowiring** – When it works automatically and when you need explicit configuration
- **Parameters** – How to use configuration parameters across your application
- **Extensions** – Working with DI extensions from Nette and third parties


nette-database
--------------

Covers both the raw SQL approach and the Database Explorer:

- **Database Explorer** – Using `Selection` for queries, `ActiveRow` for entities
- **Entity conventions** – The `Row` suffix pattern, type hints with `@property-read`
- **Relationships** – Navigating foreign keys with colon notation
- **When to use what** – Explorer for CRUD, raw SQL for complex analytics

Example: Claude knows that `->where('category.slug', $slug)` automatically joins the category table.


nette-forms
-----------

Creating and handling forms the Nette way:

- **Controls** – All built-in controls from text inputs to file uploads
- **Validation** – Built-in rules, custom validators, conditional validation
- **Rendering** – Manual rendering, Bootstrap integration, custom renderers
- **Patterns** – Create/edit forms, form components, AJAX submissions


nette-schema
------------

Data validation and normalization with the Schema component:

- **Expect class** – Building validation schemas for arrays and objects
- **Configuration schemas** – Validating NEON configuration in DI extensions
- **Type coercion** – Automatic conversion of strings to integers, dates, etc.
- **Custom validators** – Adding your own validation rules

Example: Claude knows how to create schemas like:

```php
$schema = Expect::structure([
'name' => Expect::string()->required(),
'age' => Expect::int()->min(0)->max(120),
'email' => Expect::string(),
'roles' => Expect::listOf('string')->default([]),
]);
```


nette-testing
-------------

Writing tests with Nette Tester:

- **Test structure** – The `.phpt` format, `@testCase` annotation, file organization
- **Assertions** – All `Assert::*` methods: `same()`, `equal()`, `exception()`, `match()`, and more
- **Fixtures** – Setting up test data, mocking dependencies, database transactions
- **Running tests** – Command-line options, parallel execution, code coverage

Example: Claude can generate proper test files:

```php
/** @testCase */
class UserServiceTest extends TestCase
{
public function testCreateUser(): void
{
$service = new UserService($this->mockDatabase());
$user = $service->create(['name' => 'John']);
Assert::same('John', $user->name);
}
}
```


nette-utils
-----------

The utility classes that make PHP development easier:

- **Arrays** – `Nette\Utils\Arrays` with `get()`, `getRef()`, `map()`, `flatten()`, and more
- **Strings** – Unicode-safe operations: `webalize()`, `truncate()`, `contains()`, `startsWith()`
- **Finder** – File system traversal with filtering by name, size, date
- **Image** – Resize, crop, sharpen with automatic format detection
- **Json** – Safe JSON encoding/decoding with proper error handling
- **Validators** – Email, URL, numeric validation helpers
- **DateTime** – Immutable date/time with Czech locale support


frontend-development
--------------------

Integrating frontend tools with Nette:

- **Vite** – Setting up Vite for modern JavaScript/TypeScript development, HMR configuration
- **Nette Assets** – Using the asset system for cache-busted URLs in production
- **Tailwind CSS** – Configuration for Tailwind with Latte templates, purging unused styles
- **ESLint & Prettier** – Code quality tools integration
- **Build scripts** – npm/package.json scripts for development and production builds

Claude can help configure `vite.config.js` to work with Nette's directory structure and generate proper asset references in Latte templates.


latte-templates
---------------

Everything about the Latte templating engine:

- **Syntax** – Tags, filters, blocks, and inheritance
- **Security** – Auto-escaping, content-aware output
- **Custom filters** – Creating and registering your own filters
- **Template classes** – Using typed templates for better IDE support


neon-format
-----------

The NEON configuration format:

- **Syntax** – Mappings, sequences, entities, and multiline strings
- **Common patterns** – Service definitions, parameter references
- **Debugging** – Finding and fixing syntax errors


Automatic Validation
====================

One of the most useful features is automatic validation. After every file edit, the plugin checks for errors:

| What | How It Works |
|------|--------------|
| **Latte templates** | Runs `latte-lint` to check syntax after every `.latte` edit |
| **NEON files** | Validates NEON syntax after every `.neon` edit |
| **Tracy errors** | Watches the exception log and alerts Claude about new errors |

If there's a syntax error in your Latte template, Claude knows about it immediately and can suggest a fix. No more discovering errors in the browser.


Plugin for Framework Contributors
=================================

If you're contributing to Nette itself, there's an additional plugin with coding standards:

```shell
/plugin install nette-dev@nette
```

| Skill | What It Covers |
|-------|----------------|
| `php-coding-standards` | Nette's PHP coding style – indentation, naming, structure |
| `php-doc` | PHPDoc conventions – when to document, what format to use |
| `commit-messages` | How to write commit messages for Nette repositories |


Automatic PHP Style Fixing
==========================

For automatic code style fixing after every PHP file edit, install the optional php-fixer plugin:

```shell
/plugin install php-fixer@nette
/install-php-fixer
```

The second command installs `nette/coding-standard` globally. After that, every PHP file you edit will be automatically formatted according to Nette coding standards.


MCP Inspector Integration
=========================

The plugin works even better with [MCP Inspector |mcp-inspector] – a tool that lets Claude see your actual application state. With MCP Inspector, Claude can:

- Query your real database schema instead of guessing
- List your registered DI services and their configuration
- Read Tracy error logs for debugging
- Match URLs to presenters using your actual routes

Install it with a single command:

```shell
/install-mcp-inspector
```

Then restart Claude Code. See the [MCP Inspector documentation |mcp-inspector] for all 20 available tools.

{{composer: nette/claude-code}}
Loading