#F3Prague
My name is Russell Wheatley
A few projects I work on:
FlutterFire
FlutterFire CLI
Zapp
#F3Prague
#F3Prague
What is Zapp?
Zapp is a free online code sandbox for building and sharing Dart and Flutter apps.
#F3Prague
Why Zapp?
Share code and embed live examples in your documentation.
https://docs-v2.riverpod.dev/docs/introduction/getting_started
Rapidly prototype your idea and share it.
Reproduce bugs and attach them to a GitHub issue.
Teach Flutter without needing to set up a local environment.
#F3Prague
Architecture
A peek under the hood
#F3Prague
How do we mimic a file system in the browser?
Solution
The Flutter SDK runs locally on your machine, it assumes there is a file system that contains the source code.
We use a memory file system to mimic the nodeJS file system API.
Dependencies are loaded into the in-memory file system.
#F3Prague
Architectural Overview
Browser
Cloudflare Service Worker
Google Cloud Storage
#F3Prague
How do we run Dart tools in the browser?
Solution
"dart analyse" & "dart build" - are executables built for your local dev environment, not possible to run in the browser.
We patch up the tools we need in the Dart & Flutter SDK, and compile to JavaScript so they can run in separate Web service workers.
#F3Prague
Overview of how we patch up Dart & Flutter SDK
Requires a couple of layers of inception:
#F3Prague
Custom Dart analyser and compiler at work
zapp_analyser.js
zapp_compiler.js
CDN
When Zapp code editor is opened on your browser.
#F3Prague
How do we pull in dependencies?
Some Dart dependencies can be over 500mb in size when downloading from "pub" the Dart dependency manager.
Solution
We created a facade over Pub to pull in dependencies called “Zub”.
#F3Prague
Zub at work
Zub
Zub retrieves the dependencies required, strips out unnecessary content.
Caches stripped out dependencies by version.
#F3Prague
Upcoming Zapp features
Delete projects from Zapp dashboard.
Import GitHub & Pub projects directly into Zapp editor.
Integrating VS Code web editor into Zapp.
Ability to favourite projects and track in Zapp dashboard.
Ability to pool projects into collections on the Zapp dashboard and share link.
Support for Dart 3.
#F3Prague
Thank you for listening to my talk!
#F3Prague