Search the site
FLUTTER'S LARAVEL
dartvel dev
You write pages, data models and backend functions. Dartvel generates the routes, forms, typed client and API server, and builds the app for phones, desktops, the web, TVs and browser extensions.
Do I have to leave Flutter?
No. Your pages are Flutter widgets, and dartvel build runs the Flutter SDK you already have.
FSL-1.1-MIT licensed. dartvel_dev 0.11.5 is on pub.dev.
DATA MODELS
@DVModel(subject: DVSubject.field('authorId'))
class const _Article({
required final String slug,
@DVModel.pageTitle() required final String title,
@DVModel.mainContent() required final String body,
required final String authorId,
@DVModel.sensitiveField() required final String authorEmail,
});Copy code to clipboard
dartvel dev regenerates the form, table, admin and typed client each time you save the class.
Article.Form() is a form that creates an article, and article.Form() one that edits it. Saving checks the rules each field declares.
authorEmail stays out of logs, search, public JSON and the admin until a policy allows it, and erasing an author reaches it through authorId.
Article.Form()
Article.Page.fromId(...)
Article.Table(...)
Article.Admin()
BACKEND FUNCTIONS
// Server: lib/backend/functions/hello.get.dart
@DVBackendFunction()
Future<Map<String, Object?>> _hello(String name) async =>
<String, Object?>{'greeting': 'Hello, $name'};
// Client
final Map<String, Object?> greeting = await hello(name: 'Ada');Copy code to clipboard
The HTTP endpoint and its typed client are generated together.
Return a Stream and the function is served as server-sent events.
A Rust server built on Axum and Tokio calls your Dart through FFI.
Thanks to the Rust projects the server is built on:
by the Tokio project
by the Tokio project
ONE-FILE BACKEND
$ dartvel build web-server
build/server: the backend, the web app and the native server, in one file.
$ cd /srv/shop && ./server
dartvel: no DATABASE_URL, creating SQLite database /srv/shop/dartvel_data/data.db
dartvel: created table notes
dartvel backend listening on http://0.0.0.0:3000/apiCopy code to clipboard
Copy one file to your server and run it. The first run creates your tables.
The database lives in dartvel_data next to the binary, so you back up one folder.
The web app, the API, the admin and the pages rendered on request all come from that file.
Why not use PocketBase?
PocketBase is also one file with its admin inside, and you extend it in Go or JavaScript. This binary carries its admin too: turn on dartvel.admin.enabled, grant yourself access with dartvel admin grant, and open it at /__studio. Your backend stays in Dart beside your Flutter app, with a typed client generated for it.
STUDIO
Studio is free and runs inside your web-server binary. Apps never carry it.
Build a page visually, and export it as an ordinary @DVPage file.
Frontend and backend functions are built from steps, free. Studio Pro, with Dartvel Cloud, adds Figma import and team review.
HOT RELOAD ON A PHONE
$ dartvel build android --profile development
$ dartvel dev
[dartvel] Pairing: serving main on port 8787.
[dartvel] Scan with the camera on a device running a development build:
# the QR code and its dartvel-dev://pair link print hereCopy code to clipboard
Install the development build once. It is your own app, so every plugin you added is in it.
Scan the code, and each save hot reloads every paired phone over your local network.
Or run in Dartvel Preview to test any project instantly without building it for the device first.
Does it work on an iPhone?
Yes, with one limit. CI pairs an iOS simulator, an Android emulator and Linux, macOS and Windows desktops, edits a file and checks the change runs. On a physical iPhone a debug build only starts from Xcode or flutter run, so launch it from there and it pairs. Dartvel Preview runs on Android and desktops and is not on an iPhone yet.
OVER-THE-AIR UPDATES
# shorebird.yaml: base_url: https://shop.example.com/updates
$ dartvel updates release --platform android --patch-source https://shop.example.com/updates
# fix the bug, then
$ dartvel updates patch --platform android --patch-source https://shop.example.com/updatesCopy code to clipboard
Your web-server binary serves the patches, so you need no Shorebird account.
DV.Updates.check(), apply() and rollback() let the app choose when a patch installs.
Staged rollout, pinned versions and skipped versions are decided in one check.
DV.Updates runs on the
by Shorebird (MIT or Apache-2.0).
Is it finished?
On Android, yes: CI releases an app, patches it into a running web-server binary and relaunches it into the patch. iOS is not supported yet.
ROUTING
// lib/routes.dart, beside the pages in lib/pages
final List<DVRouteNode> routes = <DVRouteNode>[
DVRoute(path: '/settings', builder: (context, state) =>
const SettingsScreen()),
];
// Or mount every Dartvel route into your own GoRouter
GoRouter(routes: <RouteBase>[...yourRoutes, ...dartvelRoutes(at: '/app')]);Copy code to clipboard
A (tabs) folder keeps a stack per tab, and back pops inside the tab you are on.
dartvel.deepLinks in pubspec.yaml writes assetlinks.json and apple-app-site-association for you.
A redirect or a _guard.dart runs before the page shows, and an async check shows a pending view while it decides.
Do I have to move my screens into lib/pages?
No. Declare them in lib/routes.dart, or mount your GoRoute list inside Dartvel's router with DVGoRoutes. Or keep your router: go_router, auto_route, Navigator 1.0 or 2.0, or a RouterConfig of your own.
BUILD TARGETS
web
web-server
telegram
android
ios
macos
windows
linux
fireos
tvos
horizon
tizen
sony-elinux
vscode
chrome-extension
firefox-extension
Verified means the build ran and its output was inspected.
Terminal apps build for Linux. webOS, Fuchsia and terminal apps on macOS and Windows are in progress.
Thanks to the projects these targets are built on:
by the FlutterTV authors
by Samsung
by Sony
by SlowGen
by LG
by the Fuchsia authors
by Jia Hao (jiahaog)
16
4
6
targets that build
targets in progress
packages on pub.dev
COMING FROM EXPO
Development builds
Over-the-air updates
Cloud builds
dartvel build <target> --profile development, paired with dartvel dev by a QR code. CI pairs Android, the iOS simulator and the Linux, macOS and Windows desktops.
dartvel updates patch --patch-source publishes into your own web-server binary. Proven on an Android emulator in CI; iOS is not supported yet, where EAS Update covers both.
There is no hosted build service and no certificate management. You build on your own machine or in CI.
STATUS
24
79
0.11.5
sections shipped
sections partial
current version
Every partial section names what is missing.
A CI check fails when a shipped section cites evidence that is gone.
Is it production-ready?
Parts of it. Check the section you need before you depend on it.
START
brew install Danroyal001/dartvel_dev/dartvel_dev
dartvel create shop
cd shop && dartvel devCopy code to clipboard
Will I be locked in?
Your pages are Flutter widgets, your backend is a file on your own server, and your patches can come from your own host. Dartvel is under the Functional Source License: you can fork it for anything except a competing product, and each release becomes MIT two years after it ships.
FSL-1.1-MIT licensed. Built with Dartvel.
Dartvel is made by
To the bottom