
Meticulously architected web applications. @TenancyLaravel v4 launching soon!
United States
Joined April 2021
- Tweets2.1K
- Following99
- Followers5.9K
- Likes2.9K
The final step in generating each boilerplate setup is running tests (multiple variations, including regular tests, in-memory SQLite, and parallel tests) and if they all pass, create a zip file that users can download. If tests don't pass, the program reports which test run failed and how
1
2
140
Speaking of helpers, can't forget dd() 😁
If you're at least a bit familiar with Rust, you'll notice we use unwrap() a lot. This is intentional — there are basically no recoverable errors in our code, so they should all panic and report exactly where they happened
1
3
103
Most of the Rust code looks like this
Functions that either modify files or copy stubs, and helpers that are called by those functions
1
2
128
This means the only things we need to maintain *separately* are views
Separate views for Inertia and Blade/Livewire setups, also depending on the starter kit being used since they use different components and layouts
1
2
103
The methods shown above are used in controller *templates* like this one
We keep route names consistent across setups, so the only things that need to change are usually view names (Blade vs Inertia) or parameters based on what the view might need
1
2
113
The first thing is having descriptive types for anything our code may want to know about the setup being generated
Based on those types, functions adjust their behavior to the currently used frontend stack, database setup, identification method, or starter kit used
1
2
157
🦀 The neat thing is how we've implemented this. Maintaining 24 repos would be impossible, so instead we have a custom tool written in Rust for generating these setups
Each generated setup has a clean git history and is automatically tested after being built
Here's how we keep this maintainable 👇
True!
Over the years of working on Tenancy for Laravel, one of the biggest sources of pain was the queue logic. Difficult to test with just testbench, fixing bug A introduces bug B or some kind of regression, ...
Spent a few days on writing a full *app-based* testing suite













