Meet Hiker
Hiker is a robust and modern way to build high-quality Laravel applications. It can be installed on top of a Laravel project, existing or new, like any regular package.
It provides the following advantages:
- A super easy way to structure logic flows using multiple chained actions;
- A beautiful, extensible and highly customisable user interface;
- A seamless bridge between the two;
Hiker was first developed as an internal tool at Whitecube, a digital agency that spends most of its time building custom solutions for its clients using Laravel. After a few years of building custom admin panels for each project, we were happy to see more and more admin-builder tools appear. These worked well up to a point, until one day we stumbled upon a project where it just was not enough – and that's when we envisioned a tool that would allow us to go a lot further, that would allow us to build even huge CMMs, CRMs, CMSs, ERPs,... with ease.
A scalable methodology
To achieve such a high level of scalability, it was imperative that our solution could provide a robust way to structure a complex codebase. Laravel itself is great already, but we felt inspired by the actions & pipeline patterns that were starting to make waves at the time. We wondered how we could apply this to the needs of our big projects; and our answer was simply to just chain those actions together into "logic flows". When working within Hiker, we just call them "flows" for short. The actions they're built of are called "nodes".
High-quality user interface components
But that was only half of the story. The tools we had been using provided the UI layer: a set of pre-built UI components, easily instantiated with a PHP class, which would transform themselves into beautiful form inputs and other elements on the page. However, a big frustration of ours was that we couldn't just display whatever we wanted whenever we wanted; and this new flows-based approach was the perfect solution.
Considering that showing a form or a page is just another step within a flow, things suddenly become much more interesting: the ability to shape ultra-customisable UIs, built with high-quality pre-built components, directly responding to the application's logic flows.
In practice
When combining actions and views within flow definitions, the application's complexity quickly disolves into readable and executable schemes:
class MountainJourneyFlows extends FlowsRepository { public function create(): roadmap { return roadmap() ->run(FetchWeatherConditions::class) ->branch(CheckWeather::class, function (Outcome $weather) { $weather->is('rainy') ->show(RaincoatForm::class); $weather->is('sunny') ->show(ShadesForm::class); }) ->save(SaveJourney::class) ->chain('create', Picnic::class) ->show(JourneyDetailView::class); } }
This methodology has been very effective in keeping both small and very large projects maintainable over the years. Even in projects with high level of churn (constantly changing requirements and endless modifications to the code), the flows-based approach has kept complex operations easy to understand at a glance.