vanestack_common 0.1.2 copy "vanestack_common: ^0.1.2" to clipboard
vanestack_common: ^0.1.2 copied to clipboard

Shared models and utilities for the VaneStack Dart backend framework.

VaneStack Logo

vanestack_common

Shared models and types used across VaneStack server, client SDK, and dashboard.

Website · Documentation


All models use dart_mappable for JSON serialization/deserialization with generated .mapper.dart files.

Models #

Model Description
User, ListUsersResult User accounts with id, email, name, type, timestamps
AuthResponse Access token, refresh token, and user
Collection (sealed) BaseCollection (with attributes/indexes/rules) and ViewCollection (SQL view)
Attribute (sealed) Column types: TextAttribute, IntAttribute, BoolAttribute, DateAttribute, DoubleAttribute, JsonAttribute
ForeignKey, Index Constraints and indexes for collections
Document, ListDocumentsResult Records within collections (id, data map, timestamps)
Bucket S3-compatible storage buckets with access rules
File, ListFilesResult File metadata (path, mimeType, size)
Settings App config (name, URL, S3, mail, OAuth providers)
S3Settings, MailSettings S3 and SMTP configuration
OAuthProvider, OAuthProviderList OAuth provider credentials (Google, Apple, GitHub, etc.)
RealtimeEvent (sealed) SSE events: DocumentCreatedEvent, DocumentUpdatedEvent, DocumentDeletedEvent, CustomRealtimeEvent
Log, ListLogsResult, LogsStatEntry Request logs and statistics
ExportResponse, ImportResponse Collection import/export results

Enums #

  • UserType - admin, user, guest
  • IdTokenAuthProvider - google, apple, facebook

Usage #

import 'package:vanestack_common/vanestack_common.dart';

// Deserialize from JSON
final user = UserMapper.fromJson(jsonString);

// Serialize to JSON
final json = user.toJson();

Code Generation #

Run after modifying any model:

dart run build_runner build
Package Description
vanestack Server framework
vanestack_annotation @Route annotation and HttpMethod enum
vanestack_client Generated HTTP client SDK
vanestack_generator Build runner code generator
0
likes
150
points
200
downloads

Documentation

API reference

Publisher

verified publishervanestack.dev

Weekly Downloads

Shared models and utilities for the VaneStack Dart backend framework.

Homepage
Repository (GitHub)
View/report issues

Topics

#server #backend #serialization

License

BSD-3-Clause (license)

Dependencies

dart_mappable, path

More

Packages that depend on vanestack_common