Sign in

John Koster

@johnmkoster.bsky.social
149 followers 83 following 284 posts

Doing things with Laravel and Statamic

PostsRepliesMedia
John Koster @johnmkoster.bsky.social · 21/06/2026
Working on a new #statamic tag this afternoon 💅
150
John Koster @johnmkoster.bsky.social · 06/06/2026
Curious development. #statamic
010
John Koster @johnmkoster.bsky.social · 24/12/2025
Forte rewrite is complete, and a new alpha just dropped. It was a grind, I am tired, but now I can work on the docs and all the other supporting packages and tools 🗡️
040
John Koster @johnmkoster.bsky.social · 24/11/2025
Here's an early look at Hone - another library I am working to release at the same time as Forte. An over-powered #laravel #blade formatter, written in PHP.
160
John Koster @johnmkoster.bsky.social · 23/11/2025
A few extra folders have appeared 👀
020
John Koster @johnmkoster.bsky.social · 10/11/2025
Look at how the AST dramatically changes once I enable the options that contain the extension 🔥
010
John Koster @johnmkoster.bsky.social · 10/11/2025
Some progress from the weekend. Forte's error recovery and extensibility models are now extremely overpowered. Here's a short code example without a custom extension I wrote to test:
120
John Koster @johnmkoster.bsky.social · 26/10/2025
A fun look at something I've been chipping away at: leveling up the View Scaffolding feature in #statamic It generates templates, taking your blueprints and field configuration into consideration!
000
John Koster @johnmkoster.bsky.social · 26/10/2025
Another fun preview. Got timelines working for Livewire AJAX requests - and the timeline entries get associated with the live DOM tree (hovering over a view in this image highlights that node in the page):
031
John Koster @johnmkoster.bsky.social · 25/10/2025
A quick progress update on my Alpine, Blade and Livewire dev tool project! I've been working hard on improving visualizations, adding features that I've always wanted (like hovering over an SVG element and seeing what it looks like), as well as some client-side performance monitoring!
030
John Koster @johnmkoster.bsky.social · 29/09/2025
And of course, log tailing, in your browser:
100
John Koster @johnmkoster.bsky.social · 29/09/2025
This is one of my favorite things: being able to pause/resume wire:polls.
100
John Koster @johnmkoster.bsky.social · 29/09/2025
An inspector panel also provides an overview of all detected Alpine and Livewire attributes:
100
John Koster @johnmkoster.bsky.social · 29/09/2025
The tool also supports bi-directional state management for Alpine and Livewire. Switch between component states, and even edit the state in arbitrary ways (fun to see what breaks if you throw in unexpected values haha)
100
John Koster @johnmkoster.bsky.social · 29/09/2025
The tool opens in a new tab or window - this way I don't have to worry about adding too much stuff to the DOM, or modals covering the debug tool. Here is a demo of it being able to detect regular Blade components, and pull up the source for them directly in the tool:
100
John Koster @johnmkoster.bsky.social · 05/09/2025
I'm in the weeds.
020
John Koster @johnmkoster.bsky.social · 31/08/2025
Took a short break from PHP tonight to write some TypeScript. Threw together a quick language server implementation; it's fun to see Forte's diagnostics appearing next to the Laravel Extension's!
020
John Koster @johnmkoster.bsky.social · 31/08/2025
Implemented another built-in transformer. This one tidies passed values to certain directives, smoothing out a few papercuts 💅
000
John Koster @johnmkoster.bsky.social · 30/08/2025
Small proof of concept! The logic could be made smarter over time, and this information would be relatively trivial to pull into the VS Code extension, etc. Going to keep chipping away at things!
110
John Koster @johnmkoster.bsky.social · 30/08/2025
And another quick example - Forte can also be used to make existing Blade features play nice together. This example demonstrates using it to allow the PHP directive with arguments, and the block-style to exist in the same file:
100
John Koster @johnmkoster.bsky.social · 30/08/2025
Here's a small preview of the Forte feature I'm currently working on: Enclaves. In this demo, I'm using them to add support for server-side conditional elements and loops.
100
John Koster @johnmkoster.bsky.social · 29/08/2025
The next obvious thing to experiment with was relative performance data - visually see where the time is going!
010
John Koster @johnmkoster.bsky.social · 28/08/2025
I built a thing that lets you peek into the #laravel Blade that was used to render a page. It tracks component hierarchy, includes, etc. - works with Blade components, Flux, etc. All without runtime overhead! Might continue this experiment in the future
151
John Koster @johnmkoster.bsky.social · 27/08/2025
Another experiment testing out node swapping - I'm collecting a rather large amount of these experiments 😅
120
John Koster @johnmkoster.bsky.social · 26/08/2025
Another random experiment to make sure the AST produced by Forte is useful. This one was really fun to make!
110
John Koster @johnmkoster.bsky.social · 24/08/2025
I'm pretty happy with the AST traverser and visitor. Now, it's just fine-tuning some of the APIs. Laravel's LazyCollection is super useful here:
070
John Koster @johnmkoster.bsky.social · 23/08/2025
This is the before/after of the Blade template once Forte is done with it:
000
John Koster @johnmkoster.bsky.social · 23/08/2025
Chipping away at Forte's Blade AST infrastructure. It's adding the Blade directives/rewriting some HTML before handing it off to Laravel's compiler. Not saying you should do this... but you could lol
100
John Koster @johnmkoster.bsky.social · 22/08/2025
Forte Phase 0 is officially complete! 🥳 Private invites going out soon 🗡️
030
John Koster @johnmkoster.bsky.social · 17/08/2025
Feeling much more confident in Forte's parser now. This test takes an already gnarly template and breaks it up, reverses it, randomizes it - just absolutely wrecks it and shoves it through the parser. An excellent way to find subtle whitespace bugs and infinite loops.
000
John Koster @johnmkoster.bsky.social · 16/08/2025
Had to whip up a precompiler to play with. This nerd sniped me hard. Brain is happy now knowing it's technically possible - back to my other tasks 😅
000
John Koster @johnmkoster.bsky.social · 16/08/2025
It's nice to have an extensive back catalog of tests to rely on. Getting close to being able to focus on the Node and Document models.
000
John Koster @johnmkoster.bsky.social · 15/08/2025
Things also got into some voodoo territory to not have it conflcit with the existing element recovery:
000
John Koster @johnmkoster.bsky.social · 15/08/2025
Look what you made me do. To be clear, it doesn't compile to anything; I just wanted this parser to be able to handle it for future shenanigans 😅
200
John Koster @johnmkoster.bsky.social · 15/08/2025
Getting there! Core HTML+Blade parsers complete. The next step is to start backporting tests from existing projects and start parser fuzzing.
051
John Koster @johnmkoster.bsky.social · 14/08/2025
Forte's mixed HTML & Blade parser can now produce a useful AST from this. Will do a write-up once my brain recovers a bit.
020
John Koster @johnmkoster.bsky.social · 11/08/2025
Forte's HTML and Blade attribute parsing is now next level. It can now do this:
120
John Koster @johnmkoster.bsky.social · 10/08/2025
Nothing like attribute parsing on a Sunday afternoon! I am 🤏 this close to being done with attribute parsing.
192
John Koster @johnmkoster.bsky.social · 08/08/2025
Wrote a blog post while working on Forte yesterday. It's a simple write up about my thoughts on parsing HTML tags, components, and some edge-cases. Here's the link! stillat.com/blog/2025/08...
010
John Koster @johnmkoster.bsky.social · 28/06/2025
Test grind is real today
010
John Koster @johnmkoster.bsky.social · 15/06/2025
And it's been implemented in Dagger 1.4! Love it when a powerful feature has a simple implementation!
100
John Koster @johnmkoster.bsky.social · 06/06/2025
Getting the WIP Blade parser to handle this was incredibly fun, let me tell you 😅
010
John Koster @johnmkoster.bsky.social · 01/06/2025
Components are also now supported. Any custom component syntax is represented as an "Element", so even those are intrinsically supported 🥳
010
John Koster @johnmkoster.bsky.social · 01/06/2025
A bit more progress on the new #laravel Blade tokenizer/parser I'm working on. Getting it to handle dynamic elements in the AST without a ton of hackery was a fun challenge 😅
130
John Koster @johnmkoster.bsky.social · 27/05/2025
Got node traversers/visitors working well late last night 🥳
010
John Koster @johnmkoster.bsky.social · 26/05/2025
Last experiment for the day, I think. Added a "x-section" attribute as a shorthand for the section directives. Feels really nice
000
John Koster @johnmkoster.bsky.social · 26/05/2025
Another morning #laravel Blade experiment! Added support for the x-text and x-html attributes to the experimental compiler.
000
John Koster @johnmkoster.bsky.social · 26/05/2025
I've generalized this even more! It now allows an arbitrary number per element and respects their order during compilation. Behold the insanity!
000
John Koster @johnmkoster.bsky.social · 25/05/2025
Another #laravel Blade experiment: conditional elements! This would be pretty trivial to expand to loops and other fun stuff.
030
John Koster @johnmkoster.bsky.social · 25/05/2025
Figured it out! Also got it to work with prop values. Since the solution is generalized, you can do some pretty weird things, like adding attributes in a loop 😅
110