Dartvel, home
Docs
Features
Studio
Cloud
Compared

Search the site

GitHub
pub.dev

GETTING STARTED

Getting started
Existing Flutter apps
Existing Native apps
Run on your phone

APP

UI and styling
Routing
State
Accessibility
Keyboard shortcuts
Localization
Devices and desktop
Native device access
Media, 3D and XR

DATA

Data models
Forms
Search
Sync and offline
Import and export
Change capture
Database
Cache
File storage
Images
Privacy and erasure

BACKEND

Backend functions
Auth and sessions
Authorization
Queues and jobs
Workers and memory
Notifications and mail
Outbound HTTP
AI
Webhooks
GraphQL and OpenAPI
API keys and OAuth
Multi-tenancy
Billing and commerce
Modules

OPERATIONS

Edge security
Secrets and environments
Monitoring
Releases

SHIPPING

Build targets
Telegram Mini Apps
Static web hosting
Servers and deploying

REFERENCE

Testing
CLI reference
Coding agents

GETTING STARTED

Getting started

Install the dartvel command and run a new app on your machine.

Every command here matches what dartvel --help prints.

ON THIS PAGE

Install the CLI

Create an app

Write your first page

Project structure

Choose your services at startup

Go from idea to production with one CLI

Ask the CLI what your project contains

Generated code is the same on every machine

Check what is built before you depend on it

Install the CLI

You need Flutter 3.47 or newer, which ships Dart 3.13. Pick one install method.

# pub: the CLI as a global command
dart pub global activate dartvel_cli

# Homebrew: a prebuilt binary
brew install Danroyal001/dartvel_dev/dartvel_dev

# In a project, from its dev_dependencies
dart run dartvel_cli:dartvel --help

# npm: the same prebuilt binary
npm install -g dartvel_dev

Copy code to clipboard

The command is dartvel, whichever way you install it.

You can also download the binary from the GitHub releases page. dartvel ensure-path adds it to your PATH if your shell cannot find it.

Activate dartvel_cli, the command. dartvel_dev is the package your app depends on, and it depends on Flutter, which pub does not run as a global command.

Pub puts dartvel in ~/.pub-cache/bin. Add that to your PATH if your shell cannot find it.

The Homebrew tap is updated after each release, so it can be a version behind pub.dev.

dart run works in a project that already lists dartvel_cli in dev_dependencies, which dartvel create writes. The first run compiles the CLI, so it is slower than the binary.

dartvel update installs the latest release later.

Prebuilt binaries are Linux only for now

The release binaries behind Homebrew and npm (v0.11.5) are Linux only, for x64 and arm64. The macOS and Windows binaries follow when the release workflow can run again.

Download a release

Create an app

dartvel create my_app
cd my_app

Copy code to clipboard

It runs flutter create, then adds pages, a backend and the Dartvel dependencies.

Web and mobile are on by default. Add --desktop for Windows, macOS and Linux.

dartvel init adds Dartvel to a Flutter project you already have.

Run it with dartvel dev

dartvel dev

Copy code to clipboard

It generates the client, starts the backend and runs the Flutter app.

Edit a page and Flutter hot-reloads. Edit a backend function and only the backend restarts.

Pick a device with -d, for example dartvel dev -d chrome.

Generated code is not committed

dartvel dev and dartvel build write lib/dartvel_client for you. After a fresh clone, run dartvel routes once before your editor analyzes the project.

Write your first page

A file under lib/pages is a route. This is lib/pages/index.dart, served at /.

Functional

Class

@DVPage(title: 'Home')
Widget _indexPage(BuildContext context) => DVBox.list(<Widget>[
      const DVText('Hello from Dartvel'),
      DVNavLink(to: DVRoutes.about, child: const DVText('About us')),
    ]);

Copy code to clipboard

The annotated function is private. Dartvel generates the public page and the DVRoutes target.

Import the generated barrel, dartvel_client.dart. It exports Dartvel and your generated code.

Project structure

my_app/
  pubspec.yaml            # dependencies and the dartvel: block
  .env  .env.example      # values read at startup
  lib/
    main.dart
    pages/                # one file per route
      index.dart
      index.loading.dart  # shown while the page loads
      index.error.dart    # shown when it fails to load
    models/               # @DVModel classes
    components/           # your widgets
    styles/  services/
    backend/functions/    # one file per endpoint
      health.get.dart
      contact.dart
    dartvel_client/       # generated, ignored by git
  test/

Copy code to clipboard

The dartvel block in pubspec.yaml

dartvel:
  backendHost: 0.0.0.0
  backendPort: 3000
  devBackendHost: http://localhost:3000
  prodBackendHost: https://api.my-app.com
  pagesDir: lib/pages
  backendDir: lib/backend
  apiBasePath: /api
  envFiles: [.env, .env.local]

Copy code to clipboard

The app calls devBackendHost in development and prodBackendHost in a release build.

Backend functions are served under apiBasePath.

Each directory has a key of its own: pagesDir, modelsDir, backendDir, componentsDir, stylesDir and servicesDir. Leave one out and it keeps the path shown above.

Keep the configuration in Dart

# pubspec.yaml
dartvel: config/dartvel.dart

Copy code to clipboard

Point dartvel: at a Dart file instead of a map. The file must declare a public class that extends DartvelConfig.

One package with every import

dartvel_dev re-exports the Dartvel packages as barrels: dartvel_ui.dart, dartvel_backend.dart, dartvel_auth.dart, dartvel_database.dart, dartvel_storage.dart, dartvel_ai.dart and more. A generated app imports its own dartvel_client.dart barrel.

Partial

Spec section: Project Structure

Planned work and implementation limits

Directory keys take one path each. Glob patterns are not read, so pages cannot live in two directories.

Partial

Spec section: Package Structure

Planned work and implementation limits

The Rust bindings are DVRust and DVRustInt, one integer type. They are types you construct, so there is no DV.Rust to call.

Choose your services at startup

Set up auth and mail in main.dart, before runApp.

DV.Auth.configure(DVLocalAuthProvider());
DV.Notifications.mail.useProvider(DVMemoryMailProvider());

Copy code to clipboard

These are the in-memory versions for development. Each topic page shows the production adapters.

You set the database in configuration and write no code for it. The generated backend opens DATABASE_URL for your data models and jobs.

# .env
DATABASE_URL=sqlite:dartvel.db

Copy code to clipboard

Go from idea to production with one CLI

dartvel create shop
cd shop && dartvel dev
dartvel db migrate
dartvel test
dartvel build web-server
dartvel deploy
dartvel upgrade --plan

Copy code to clipboard

Every step is one command, from a new project to a deployed server.

upgrade --plan lists what a new Dartvel release would change in your project, and dartvel migrate-code --apply rewrites the source for you.

Partial

Spec section: The Golden Path

Planned work and implementation limits

dartvel upgrade updates the CLI. Applying the project changes listed by upgrade --plan is Planned; the plan is read-only.

Ask the CLI what your project contains

dartvel inspect routes
dartvel inspect models
dartvel explain DV-GEN-001

Copy code to clipboard

inspect prints the routes, models, functions and jobs the build found, from the same project graph Studio reads.

explain tells you what a DV- error code means and how to fix it.

Partial

Spec section: Unified Development, Transparency, and Contracts

Planned work and implementation limits

There is no inspector yet for modules, transactions, the schema or generated files.

Generated code is the same on every machine

dartvel generate --check

Copy code to clipboard

The same project generates byte-identical files on any machine and in any folder, with no timestamps or absolute paths.

generate --check fails your CI when the committed files are stale, without touching the project.

Partial

Spec section: Generated Code Determinism

Planned work and implementation limits

Generated files are not run through dart format.

Check what is built before you depend on it

Dartvel 0.11.5 ships 24 spec sections in full and 79 in part; two are planned.

Twenty-five sections are a frozen public contract with unfinished code behind them. Contract stability and implementation status are tracked separately.

Pages in these docs mark partial features and say what is missing.

The full record is spec-status.json in the Dartvel repository.

GETTING STARTED

Adoption

Partly built

Dev Client

Partly built

Generated Code Determinism

Partly built

Package Structure

Partly built

Project Structure

Partly built

The Golden Path

Partly built

Unified Development, Transparency, and Contracts

Partly built

APP

3D Scenes

Partly built

Accessibility

Shipped

Desktop, Embedded, and Qt-Critical Capabilities

Partly built

Error, Empty, and Loading States

Partly built

Home Widgets

Partly built

Internationalization and Localization

Shipped

Kiosk Mode

Partly built

Lifecycle Signals

Partly built

Media Playback and Capture

Partly built

Multi-Window

Partly built

PWA

Shipped

Pages

Shipped

Platform

Partly built

Platform Memory

Partly built

Routing

Shipped

SEO

Shipped

State

Shipped

Styling

Partly built

Tab Workspaces

Partly built

Theme

Partly built

UI

Shipped

XR: Spatial Presentation

Partly built

DATA

Cache

Partly built

Change Data Capture and Warehouse Sync

Partly built

Content Workflow

Partly built

Data Compliance and Lifecycle

Partly built

Data Import, Export, and Reporting

Partly built

Database

Shipped

File Storage

Partly built

Forms

Shipped

Generated Model Pages

Partly built

Media Pipeline

Partly built

Model Sync and Presence

Partly built

Models

Shipped

Offline-First Models

Partly built

Record History and Optimistic Concurrency

Partly built

Schema Evolution

Partly built

Search

Shipped

Semantic Search and Embeddings

Partly built

Sensitive Model Fields

Partly built

Storage-Neutral Records

Partly built

BACKEND

AI

Partly built

AI Operations

Partly built

APIs

Shipped

Authentication

Shipped

Authorization

Shipped

Backend

Shipped

Backend Function Request Lifecycle

Partly built

Background and Durable Work

Shipped

Billing

Partly built

CSRF Protection

Shipped

Commerce: Tax, Promotions, Disputes and Payouts

Partly built

Compute: Workers and Native Offload

Partly built

Mail and Notifications

Partly built

Middleware

Partly built

Module Distribution and Trust

Partly built

Module Sources

Partly built

Modules

Partly built

Multi-tenancy

Partly built

Native Binding Graph

Partly built

Outbound HTTP

Partly built

Outbound Webhooks

Partly built

Platform API: Keys, Scopes and OAuth Provider

Partly built

Purchases and Entitlements

Partly built

Queues, Jobs, and Signals

Partly built

Reversible Transactions

Shipped

Scheduling

Partly built

Sessions and Account Management

Partly built

Streaming Functions

Shipped

Usage Metering and Quotas

Partly built

Web Server Rendering

Partly built

OPERATIONS

Alerting, SLOs and Status Pages

Partly built

Backend Release Management

Partly built

Branch deployments

Partly built

Crash Reporting and Release Health

Partly built

Distributed Tracing

Partly built

Edge Security

Partly built

Feature Flags and Staged Rollout

Partly built

Monitoring and Observability

Partly built

Product Analytics and Consent

Partly built

Protocol Versioning and Client Compatibility

Partly built

Secrets and Environments

Partly built

Server Provisioning

Partly built

SHIPPING

App Store Deployment and Privacy Manifests

Partly built

Dartvel Cloud

Partly built

Deployment

Shipped

Embedded, Television, and Extension Build Targets

Partly built

OTA Updates

Partly built

Static Web Generation

Shipped

Terminal Rendering

Partly built

STUDIO

Admin, Devtools, and Scaffolding

Shipped

Dartvel Studio

Shipped

REFERENCE

CLI

Partly built

Coding Agent Documentation

Partly built

Documentation Generation

Partly built

Module Health

Partly built

Testing

Partly built

See what works today
Read spec-status.json
NEXT Existing Flutter apps Add Dartvel to an app you already have
GitHub
pub.dev
npm
Acknowledgements
Privacy
Terms

FSL-1.1-MIT licensed. Built with Dartvel.

Dartvel is made by

SigmaDev Digital

To the bottom