Slide 1

Slide 1 text

SvelteKit: From landing pages to PWAs Powering interactive experiences at Germany’s largest anime con!

Slide 2

Slide 2 text

Who am I? https://danpetrov.xyz

Slide 3

Slide 3 text

Who am I? https://danpetrov.xyz Frequent con goer, traveller, landscape and cosplay photographer, video game streamer, coffee nerd etc.

Slide 4

Slide 4 text

Bit more background - Some basic knowledge of React - Pretty decent at TypeScript - Started with a small hobby project in Svelte before once 1.0 of Kit was released - Went on to mostly make some promo websites - Mostly spend my work time in the backend side of things

Slide 5

Slide 5 text

About DoKomi Germany’s largest anime and japan expo (~155K visitors this year). Organized since around a decade ago. Largely community and volunteer driven.

Slide 6

Slide 6 text

The hololive fan booth project

Slide 7

Slide 7 text

What’s hololive anyway?

Slide 8

Slide 8 text

What? VTuber? Hololive Production is a virtual YouTuber agency owned by Japanese tech entertainment company Cover Corporation. A virtual YouTuber (streamer) that uses face and body tracking technology to stream games and other activities online.

Slide 9

Slide 9 text

Let’s make a stamp rally!

Slide 10

Slide 10 text

Requirements Convention network can be spotty and unreliable. 1 2 3 Primary target is smartphones, which can be ancient Android devices. Strict deadlines and limited human resources. Offline first Fast and lightweight Good DevX

Slide 11

Slide 11 text

Offline - Progressive Web App (PWA) Options 1 2 3 Fast and lightweight - Svelte DevX - Svelte

Slide 12

Slide 12 text

How does the stamp rally work?

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

Features - QR code scanning and validation - Information about each rally vendor and how to find them - Real time events - An online leaderboard - Bonus “gacha” game! First implementation included core features like the QR scanner, other things added later.

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

Architecture

Slide 17

Slide 17 text

Phoenix.js Why Phoenix Channels? - Already existing experience in Elixir and Phoenix - Incredible flexibility in pubsub configuration - All benefits of Elixir like remote shell for remote debugging Easily integrate with Phoenix Channels using your custom client!

Slide 18

Slide 18 text

Example

Slide 19

Slide 19 text

PWAs! What is mostly supported now? - Asset and request caching - Background sync - Over the air updates - “Installable” Progressive Web Apps (PWA) have become nearly as fully featured as native apps in past years.

Slide 20

Slide 20 text

How to PWA in SvelteKit then? Start with making sure your src/service-worker.js exists. There are a few options, for example: a) SvelteKit low level boilerplate b) Use workbox directly yourself

Slide 21

Slide 21 text

Don’t do it from scratch! Introducing: workbox Set of modules that massively simplify work with service workers. SvelteKit doesn’t include it by default!

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

Conclusions? - SvelteKit is great for SSR, as well as client-focused PWAs - Ecosystem not as huge as for React/Vue, but good enough for most projects - Very great metrics out of the box, fantastic documentation - Built in animations are fantastic! - Using Phoenix JS client directly is not so scary! - Not sure about a new stack? Try it out in a smaller project first, and scale from there!

Slide 24

Slide 24 text

Links! - https://github.com/watsonindustries/holoquest - https://kit.svelte.dev/docs/service-workers - https://web.dev/learn/pwa/workbox/ - https://www.npmjs.com/package/phoenix - https://danpetrov.xyz - https://hololivepro.com/en/

Slide 25

Slide 25 text

And yes, we are hiring platogo.com/hiring

Slide 26

Slide 26 text

Thank you!