Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up
for free
Highlights from the Flare codebase (laracon AU)
Freek Van der Herten
October 31, 2019
Technology
0
100
Highlights from the Flare codebase (laracon AU)
Freek Van der Herten
October 31, 2019
Tweet
Share
More Decks by Freek Van der Herten
See All by Freek Van der Herten
freekmurze
0
68
freekmurze
0
250
freekmurze
1
370
freekmurze
1
190
freekmurze
0
350
freekmurze
0
110
freekmurze
1
320
freekmurze
0
310
freekmurze
0
46
Other Decks in Technology
See All in Technology
chaspy
6
1.2k
pg0084
1
130
picardparis
4
2.3k
taxin
0
150
ocise
1
1.8k
viva_tweet_x
1
380
andoshin11
0
140
line_developers
PRO
0
170
hikiaki
0
180
1027kg
0
170
norioikedo
0
210
raykataoka
9
7.8k
Featured
See All Featured
ufuk
56
5.4k
smashingmag
283
47k
iamctodd
18
2k
lara
590
61k
malarkey
192
8.6k
andyhume
64
3.7k
schacon
145
6.6k
chriscoyier
145
20k
3n
163
22k
philhawksworth
190
17k
jmmastey
10
600
lauravandoore
11
1.5k
Transcript
None
About me Freek Van der Herten Partner & developer at
Spatie @freekmurze freek.dev flareapp.io ohdear.app
Open source stats ± 250 packages on Packagist ± 50,000,000
total downloads ± 3 000,000 downloads a month spatie.be/open-source/packages
Highlights from the Flare codebase
A way to structure a large Laravel app
Take a look at the Flare codebase Not a sales
talk Techniques you can use in your own projects Opinionated
Short walkthrough of the UI Domains Inertia / React /
TypeScript
Let's take a look at Flare
Using domains
Using domains Term taken from DDD A sphere of knowledge
Grouping code Larger projects
Refactor to domains app/ ├── Models/ │ ├── User.php │
├── Team.php │ └── Project.php ├── Mails/ │ ├── Welcome.php │ ├── InvitedToTeam.php │ └── ApiKeyRegenerated.php └── Events/ ├── UserDeleted.php └── Project.php
Refactor to domains app/ └── Domain/ ├── Team └── Project
Show me the code
Front end
Front end “I strongly believe JavaScript is a requirement for
excellent user experiences. Not good experiences, excellent experiences.” —Seb
Front end: JavaScript Inertia Built by Jonathan Reinink Replace Blade
by React (or Vue or whatever) Makes server client communication seamless No full pages refreshes
public function index(Team $team) { return view('team.settings', collect('team')); }
public function index(Team $team) { return inertia()->render('team.settings', collect('team')); }
Show me!
In closing
Using domains stitcher.io/blog/laravel-beyond-crud-01-domain-oriented-laravel freek.dev/1371-refactoring-to-actions freek.dev/1433-supercharging-common-controllers
Front end inertiajs.com typescriptlang.org freek.dev/1391-how-to-handle-front-end-authorization-using- laravel-inertia-and-typescript
Thank you! speakerdeck.com/freekmurze/highlights-flare-codebase spatie.be/open-source freek.dev flareapp.io ohdear.app