Slide 1

Slide 1 text

No content

Slide 2

Slide 2 text

About me Freek Van der Herten Partner & developer at Spatie @freekmurze freek.dev flareapp.io ohdear.app

Slide 3

Slide 3 text

Open source stats ± 250 packages on Packagist ± 50,000,000 total downloads ± 3 000,000 downloads a month spatie.be/open-source/packages

Slide 4

Slide 4 text

Highlights from the Flare codebase

Slide 5

Slide 5 text

A way to structure a large Laravel app

Slide 6

Slide 6 text

Take a look at the Flare codebase Not a sales talk Techniques you can use in your own projects Opinionated

Slide 7

Slide 7 text

Short walkthrough of the UI Domains Inertia / React / TypeScript

Slide 8

Slide 8 text

Let's take a look at Flare

Slide 9

Slide 9 text

Using domains

Slide 10

Slide 10 text

Using domains Term taken from DDD A sphere of knowledge Grouping code Larger projects

Slide 11

Slide 11 text

Refactor to domains app/ ├── Models/ │ ├── User.php │ ├── Team.php │ └── Project.php ├── Mails/ │ ├── Welcome.php │ ├── InvitedToTeam.php │ └── ApiKeyRegenerated.php └── Events/ ├── UserDeleted.php └── Project.php

Slide 12

Slide 12 text

Refactor to domains app/ └── Domain/ ├── Team └── Project

Slide 13

Slide 13 text

Show me the code

Slide 14

Slide 14 text

Front end

Slide 15

Slide 15 text

Front end “I strongly believe JavaScript is a requirement for excellent user experiences. Not good experiences, excellent experiences.” —Seb

Slide 16

Slide 16 text

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

Slide 17

Slide 17 text

public function index(Team $team) { return view('team.settings', collect('team')); }

Slide 18

Slide 18 text

public function index(Team $team) { return inertia()->render('team.settings', collect('team')); }

Slide 19

Slide 19 text

Show me!

Slide 20

Slide 20 text

In closing

Slide 21

Slide 21 text

Using domains stitcher.io/blog/laravel-beyond-crud-01-domain-oriented-laravel freek.dev/1371-refactoring-to-actions freek.dev/1433-supercharging-common-controllers

Slide 22

Slide 22 text

Front end inertiajs.com typescriptlang.org freek.dev/1391-how-to-handle-front-end-authorization-using- laravel-inertia-and-typescript

Slide 23

Slide 23 text

Thank you! speakerdeck.com/freekmurze/highlights-flare-codebase spatie.be/open-source freek.dev flareapp.io ohdear.app