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 (Full Stack Ghent)
Freek Van der Herten
November 13, 2019
Programming
0
310
Highlights from the Flare codebase (Full Stack Ghent)
Freek Van der Herten
November 13, 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
100
freekmurze
0
46
Other Decks in Programming
See All in Programming
7603
0
270
madai0517
1
150
yasaichi
30
7.6k
martysuzuki
1
300
dqneo
3
290
panini
1
160
zwass
0
350
legalforce
PRO
0
610
amaotone
15
7.8k
danilop
0
260
rarous
0
170
bells17
0
360
Featured
See All Featured
zenorocha
296
40k
roundedbygravity
84
7.9k
revolveconf
200
9.7k
geoffreycrofte
21
920
jlugia
216
16k
philhawksworth
190
17k
aarron
257
36k
marktimemedia
7
390
samanthasiow
56
6.3k
jrom
116
7.2k
dougneiner
55
5.4k
myddelton
109
11k
Transcript
None
About me Freek Van der Herten Partner & developer at
Spatie @freekmurze freek.dev mailcoach.app flareapp.io ohdear.app
Open source stats ± 250 packages on Packagist ± 3,500,000
downloads a month ± 50,000,000 total downloads spatie.be/open-source/packages
spatie.be/open-source
spatie.be/open-source/postcards
Our address SPATIE Samberstraat 69D BE-2060 Antwerp Belgium Europe
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 the code!
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-fullstack spatie.be/open-source freek.dev mailcoach.app flareapp.io ohdear.app