happy_platform_sdk 1.0.0 copy "happy_platform_sdk: ^1.0.0" to clipboard
happy_platform_sdk: ^1.0.0 copied to clipboard

A powerful Flutter client for the Happy Platform BaaS. Enables fluent, type-safe access to your self-hosted Firestore-like database.

1.0.0 #

🚀 Major Release: Authentication & Firestore Overhaul #

This release introduces a complete rework of the Authentication and Firestore services, delivering a more robust, flexible, and developer-friendly SDK.

Authentication

  • HappyPlatform.auth() is now the single entry point for all authentication operations.
  • Auth.signInWithGoogle(): Added support for Google Sign-In via ID Tokens for easier integration.
  • Auth.registerWithEmailAndPassword() & Auth.signInWithEmailAndPassword(): Parameters are now optional, enabling more flexible flows when supported by your backend.
  • Auth.updateUserByPassword(): New method to update user profile details (name, email, password) by verifying with current credentials (no JWT required).
  • Auth.deleteUserByPassword(): New method to delete a user account by verifying with email and password (no JWT required).
  • Auth.fetchAllUsers(): Retrieve a list of all public user profiles.
  • Existing JWT-based methods (updateProfile(), deleteAccount()) remain available for token-based flows.
  • Admin API (Auth.admin().listUsers(), updateUser(), deleteUser()) remains for secure server-side use with a developerAuthToken.

Firestore

  • HappyPlatform.firestore() is now the entry point for all Firestore operations.
  • Collection add(): Reworked to use POST requests to the collection path, letting the server generate and return document IDs (REST-compliant).
  • Query Enhancements: The Query class now supports advanced filters (where clauses), sorting (orderBy), limits, and offsets more robustly.
  • Firestore.runTransaction(): Added support for atomic read/write transactions.
  • WriteBatch: Introduced for grouping multiple write operations into a single atomic commit.
  • DocumentSnapshot.data(): Now returns null if the document doesn’t exist, improving null safety.
  • Streaming Snapshots: Query and DocumentReference now provide snapshots() methods for real-time updates via polling (WebSocket support planned for future versions).
  • Type Safety: Improved CollectionReference.withConverter for strongly typed custom object mapping.

General Improvements

  • Simplified Initialization: HappyPlatform.initialize() now sets apiBaseUrl internally, removing the need to pass it manually.
  • Error Handling: Better error messages via HappyPlatformException and AuthException, with improved DioException handling.
  • Refactoring: Codebase cleaned up for consistency, readability, and maintainability.
1
likes
130
points
52
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A powerful Flutter client for the Happy Platform BaaS. Enables fluent, type-safe access to your self-hosted Firestore-like database.

Repository (GitHub)

License

MIT (license)

Dependencies

dio, uuid, web_socket_channel

More

Packages that depend on happy_platform_sdk