Release Notes
Changelog

Flint Dart Changelog

A version-by-version history of features, fixes, and behavior changes across the Flint ecosystem.

v1.2.2

Latest

2026-07-20

Changed

  • Logged the server-ready message at info level so flint run clearly shows when the HTTP server is listening.

v1.2.1

2026-07-20

Added

  • Added Flint native jobs core, scheduler support, jobs registry contracts, and worker runtime commands.
  • Added app table and seeder registry contracts for framework-level bootstrapping.
  • Added Dart-style fullstack CLI aliases for jobs and seeders.

Fixed

  • Parsed aggregate query results returned as strings so database drivers can safely return values like "4.0".
  • Fixed Flint UI build CSS extraction exit behavior.

Changed

  • Updated Flint UI dependency to flint_ui: ^0.1.15.
  • Updated Flint Client dependency to flint_client: ^0.0.6.

v1.2.0

2026-07-13

Added

  • Added first-class HTTP QUERY route registration with app.query(...) and controller route builder support.
  • Added QUERY support to route matching, middleware, automatic OPTIONS/Allow responses, CORS defaults, cache middleware, route discovery, and generated Swagger vendor extensions.
  • Preserved explicit null values in ORM update data maps so apps can intentionally clear nullable columns.

Changed

  • Updated Flint UI dependency to flint_ui: ^0.1.14.
  • Updated Flint Client dependency to flint_client: ^0.0.5.
  • Made ORM where(...).orWhere(...) chains compile in chain order, so orWhere now combines with the previous condition using OR instead of being grouped behind an AND.

Added

  • Added response cache helpers: cachePublic, cachePrivate, revalidate, noStore, etag, lastModified, and header.
  • Added CacheMiddleware for route-level browser/CDN cache headers and ETagMiddleware for simple conditional GET handling.

v1.1.19

2026-07-08

Changed

  • Made page-bundle production builds write manifest.json progressively after each successful page compile, so interrupted large builds keep a valid manifest and can fall back to the global bundle for unfinished pages.

v1.1.18

2026-07-08

Changed

  • Restored page-level Flint UI bundles as the default for flint web and production flint build web asset generation.
  • Kept the shared runtime available through flint web --shared-runtime for projects that prefer one deferred runtime bundle.
  • Made static asset caching production-aware: fingerprinted or query-versioned assets now use one-year immutable caching, while HTML, manifest.json, and service workers revalidate on every request.

v1.1.17

2026-07-08

Changed

  • Changed flint web --build-only and default flint web production-style builds to use the shared runtime bundle by default instead of compiling every registered page one by one.
  • Kept page-level bundle compilation available through --page-bundles and single-page compilation through --page <name>.
  • Updated flint web --help to make shared runtime the documented default and page bundles opt-in.

v1.1.16

2026-07-08

Added

  • Added relationQuery() so model relation metadata can be reused as the starting point for constrained relation queries.
  • Added countRelation() and hasRelated() for common relation count and existence checks.
  • Added relationCounts() for grouped counts from the same relation, useful for dashboards, sidebars, and product ownership checks.
  • Added loadRelationCount() to store a related record count directly on a model attribute.
  • Added ORM pagination metadata helpers for page/per-page list responses.

Changed

  • Updated the Flint UI dependency to flint_ui: ^0.1.13 for media/device APIs, server-safe media stubs, and canvas editor primitives.

v1.1.15

2026-07-06

Added

  • Added framework-level startup migrations through Flint(autoMigrate: true) and the FLINTAUTOMIGRATE environment flag.
  • Added public FlintMigrations.ensure() helpers for apps that want explicit deployment-time migration control.
  • Added dev-only on-demand Flint UI page bundle builds when a requested page bundle is missing during hot reload.
  • Added automatic page registry discovery for lib/ui/registry.dart and lib/ui/pageregistry.dart in addition to lib/ui/componentregistry.dart.

Changed

  • Updated the Flint UI dependency to flint_ui: ^0.1.12 for built-in light/dark theme provider support, global theme state, and theme-scoped styles.
  • Quieted default hot-reload startup logging so watcher paths, debounce details, endpoint URLs, and duplicate restart messages are only shown when verbose hot reload logging is enabled.
  • Made the Dart VM service for hot reload opt-in through FLINTDEBUGVM_SERVICE=true instead of enabling it by default.
  • Quieted Flint UI build output so normal builds show a single Building Flint UI... message and save-triggered hot reload shows Rebuilding Flint UI...; detailed asset/compiler logs are now opt-in with FLINTWEBUI_VERBOSE=true.
  • Added completion messages after successful Flint UI builds and rebuilds.
  • Serialized save-triggered Flint UI rebuilds so repeated file events queue one follow-up rebuild instead of launching overlapping compilers.
  • Changed the default console log level to info while keeping Flint UI build/rebuild start and completion messages visible.
  • Changed hot reload startup to silently compile only the main Flint UI bundle after the server starts; page bundles are rebuilt on page/source saves or by flint web --build-only.
  • Changed save-triggered Flint UI rebuilds to rebuild only the directly changed page bundle when the changed source maps to a page registry entry.

v1.1.14

2026-06-24

Added

  • Added flint_ai: ^0.1.0 as the first-party AI runtime dependency for Flint Dart applications.
  • Added package:flintdart/ai.dart as the public AI entrypoint, re-exporting the standalone flintai runtime plus Flint-specific adapters.
  • Added app.ai on Flint so every app has a shared AI runtime instance.
  • Added ctx.ai on request Context so controllers and route handlers can run agents, chat providers, workflows, tools, memory, and repository operations from the current request.
  • Added Flint-backed AI memory and repository adapters:
  • FlintDbAiMemoryStore
  • FlintAutoAiMemoryStore
  • FlintDbAiRunStore
  • FlintDbAiThreadStore
  • FlintDbAiTraceStore
  • FlintDbAiArtifactStore
  • FlintAutoAiRepository
  • Added database fallback behavior for AI stores so development apps can keep running with in-memory storage when the database is not connected.
  • Added canonical AI table definitions through flintAiTables, covering AI runs, threads, traces, artifacts, run events, and thread messages.
  • Added .env provider setup helpers:
  • useOpenAiFromEnv()
  • useGeminiFromEnv()
  • useAnthropicFromEnv()
  • useChatProvidersFromEnv()
  • Added .env production policy setup through useProductionToolPolicyFromEnv().
  • Added sample AI table registration in the example app.
  • Added AI example endpoints for support, reporting, and content-email workflows.
  • Added tests for environment provider setup, app.ai, ctx.ai, Flint AI persistence fallback, route execution, workflow metadata, and streaming HTTP client compatibility.

Changed

  • Changed package:flintdart/ai.dart to delegate to the standalone flintai package instead of carrying a duplicated AI runtime inside flint_dart.
  • Changed the default Flint AI runtime to use Flint auto adapters for memory and repository persistence.
  • Updated the example Flint UI component registry to use PageRegistry.
  • Updated README guidance to show .env provider setup, production AI policy setup, Flint-backed AI persistence, and the sample AI endpoints.
  • Updated .pubignore and the example package ignore file so local pubspec_overrides.yaml files are not included in published packages.

Removed

  • Removed the duplicated internal lib/src/ai/* runtime implementation from flint_dart.
  • Removed internal Flint Dart copies of AI providers, tools, workflows, memory stores, repository stores, and the basic agent example because these now live in flint_ai.

Fixed

  • Fixed route parenthesis counting in Swagger route extraction so static analysis no longer reports unrelated int/string equality checks.

v1.1.13

2026-06-18

Added

  • Added RichTextUpload middleware to handle secure rich text image/media uploads, featuring strict file extension whitelisting (blocking executables/scripts) and double-extension bypass mitigation (sanitizing intermediate dots).
  • Added onUploadSuccess callback hook to RichTextUpload middleware to allow custom actions (like saving file metadata to a database) when uploads complete successfully.

Changed

  • Updated the Flint UI dependency to flint_ui: ^0.1.11.

v1.1.12

2026-06-16

Changed

  • Updated the Flint UI dependency to flint_ui: ^0.1.10.

v1.1.11

2026-06-12

Fixed

  • flint run now uses PORT from .env as its default port before falling back to 8080, so the hot-reload launcher and app server agree without requiring --port.

v1.1.10

2026-06-12

Fixed

  • Hot reload now updates its watcher port when the worker announces a different listening port, preventing false restart failures such as checking port 8080 after the app starts on 3030.
  • Hot reload worker processes now receive the selected port through the PORT environment variable as well as the positional CLI argument.

v1.1.9

2026-06-12

Fixed

  • Hot reload now serializes overlapping restarts so rapid save events cannot start multiple workers at the same time.
  • Hot reload now waits for the old worker to release the configured port before starting the next worker.
  • Hot reload now force-stops stale listeners on the configured port before startup, using taskkill on Windows and lsof, ss, or netstat plus process signals on Linux and macOS.
  • Restarted hot reload workers now inherit FLINT_HOT=1, keeping worker processes from launching nested hot-reload parents.
  • Browser reload notifications now recover by restarting the server when the internal hot-reload endpoint is unavailable.
  • flint run now accepts --port=<port> and --port <port> in addition to a positional port argument.

Changed

  • Flint Web UI builds are deferred to the hot-reload watcher during development so the server can start first.
  • Default Flint Web UI compilation now builds both the main bundle and page-level bundles when available.
  • Flint Web UI output cleanup now removes stale bundle, manifest, compressed, and deferred-part files more safely.
  • Updated the Flint UI dependency to flint_ui: ^0.1.9.

v1.1.7

2026-05-31

Added

  • Flint Web UI builds now generate /flint-sw.js, a service worker that caches the Flint UI manifest, fallback bundle, and page-level bundles in the browser.
  • res.page(...) now automatically registers the generated service worker during browser idle time when it exists and hot reload is disabled.

Fixed

  • Service worker files now bypass immutable static caching so clients can pick up updated background caching behavior promptly.

v1.1.6

2026-05-31

Fixed

  • StaticFileMiddleware now serves JavaScript, CSS, and source map assets with production cache headers unless hot reload is enabled.
  • StaticFileMiddleware now honors its gzip compression option for text-like assets when clients send Accept-Encoding: gzip.

v1.1.5

2026-05-31

Changed

  • flint build now builds Flint Web UI assets first, generates page-level bundles by default when a component registry is detected, copies resources into build/, and then compiles the server executable.
  • flint web now treats page-level bundles as the default build mode and adds --no-page-bundles for projects that only want a single global JavaScript bundle.

v1.1.4

2026-05-31

Added

  • Added manifest-aware Flint UI script selection for res.page(...) so pages can automatically use page-level JavaScript bundles when public/assets/js/flint-ui/manifest.json is present.
  • Added opt-in flint web --page-bundles, --pages-config, and --page <name> CLI support for generating page-level Flint UI bundles and a manifest.
  • Added automatic page bundle discovery from lib/ui/component_registry.dart, including direct imports for each registered page so generated page bundles do not import the full registry.

v1.1.3

2026-05-31

Release Status

  • Public patch build.

Fixed

  • Flint page props are now sanitized before being embedded in the data-flint-page payload.
  • DateTime, Uri, enum values, models, maps, iterables, and objects with toJson() or toMap() are converted into JSON-safe values for Flint UI pages.
  • Non-serializable prop values now fall back to strings instead of breaking page rendering.

v1.1.2

2026-05-26

Release Status

  • Public patch build.

Added

  • Added anti SQL injection middleware exports.
  • Added database administration CLI improvements.
  • Added request and response helpers for full-stack Flint UI apps.

Improved

  • Updated Flint UI build commands and generators for app-owned lib/ui entrypoints.
  • Improved static asset discovery for compiled Flint UI bundles.
  • Updated examples and README guidance for deploying FlintDart as a full-stack app host.

Tests

  • Expanded coverage for app middleware behavior, response page rendering, request helpers, UI generation, and web UI bundle building.

v1.1.1

2026-05-14

Release Status

  • Public patch build.

Fixed

  • Flint Web UI auto build now discovers app-owned lib/ui/main.dart entrypoints.
  • App-owned UI builds now default to public/assets/js/flint-ui/main.dart.js so deployed public assets stay organized.
  • flintPage() now loads app-owned Flint UI bundles from /assets/js/flint-ui/main.dart.js when present.
  • UI generators now prefer lib/ui for app-owned Flint UI source.
  • Flint's default middleware stack now serves public static assets automatically.
  • Development servers now bind exclusively to their port so stale workers cannot intercept hot-reload WebSocket traffic.
  • The browser hot-reload client now backs off and avoids repeated console errors while the dev server restarts.

v1.1.0

2026-05-14

Release Status

  • Public minor release.

Added

  • Added first-class Flint UI package support through the standalone flint_ui dependency.
  • Added public bridge exports for package:flintdart/flintui.dart and the deprecated package:flintdart/flintweb_ui.dart compatibility entrypoint.
  • Added Flint Web UI CLI workflows for creating and building browser UI entrypoints.
  • Added hot-reload rebuild support for Flint UI browser bundles.

Changed

  • Moved Flint UI usage onto the external flint_ui: ^0.1.3 package instead of the old in-framework UI implementation.
  • Updated the example app to use the standalone Flint UI package during local development.

v1.0.4

2026-04-30

Release Status

  • Public patch build.

Added

  • Added Column.comment, Column.after, and Column.renamedFrom schema metadata.
  • Added safe column rename handling during migrations so renamedFrom preserves existing data instead of dropping and re-adding columns.
  • Added helpful migration detection for case-only column renames, with guidance to use renamedFrom.
  • Added app.controller(...) and ControllerRouteBuilder for concise, request-scoped controller route registration.
  • Added shorter controller(...) and controllerVoid(...) helpers while keeping useController(...) and useControllerVoid(...) compatible.
  • Added regression coverage for controller route groups, controller binding/unbinding, migration comments, MySQL after, and rename handling.

Changed

  • MySQL migrations can place newly added columns with AFTER and persist column comments.
  • PostgreSQL migrations can apply column comments with COMMENT ON COLUMN.
  • Updated the grouped controller route example to use the new app.controller(...) API.
  • Pointed the in-repo example app to the local package path for development against unreleased framework APIs.

Fixed

  • Prevented case-only column renames such as Nickname to nickname from silently becoming unsafe drop/add migrations.
  • Ensured renamedFrom behaves as a one-time migration hint and is harmless on later reruns once the target column exists.

v1.0.3

2026-04-26

Release Status

  • Public patch build.

Added

  • Added Auth.verifyPasswordResetCode(...) to validate password reset codes without changing the user's password.
  • Added the AuthVerification.verifyPasswordResetCode(...) extension wrapper for backward-compatible verification flows.
  • Added regression coverage for ExceptionMiddleware handling awaited async AuthException failures.

Changed

  • Reused the password reset code verification helper inside resetPasswordWithCode(...) so standalone checks and password resets share the same validation logic.

v1.0.2

2026-04-18

Release Status

  • Public patch build.

Added

  • Added Request.rawBody() for exact undecoded request payload access alongside higher-level request parsers.
  • Added normalized request helpers Request.input(...) and Request.allInput() for query, JSON, form, multipart, file, and route-param access through one API.
  • Added websocket payload normalization so emit(...) and sendJson(...) can safely serialize values like DateTime, nested collections, exceptions, and objects with toMap() or toJson().
  • Added Swagger/OpenAPI websocket documentation support with 101 Switching Protocols, x-websocket, x-flint-transport, and a top-level x-websockets extension block.
  • Added regression tests covering unified request input/validation, raw body access, websocket namespace behavior, websocket payload normalization, and websocket Swagger docs generation.

Changed

  • Unified Request.validate(...) so it auto-detects JSON, urlencoded form, and multipart request input instead of only validating JSON bodies.
  • Request.form() now remains focused on text form fields while files stay available through file helpers and normalized input access.
  • WebSocket rooms are now namespace-scoped by path by default, with explicit cross-namespace helpers emitToRoomIn(...) and emitToNamespace(...).
  • Swagger docs generation now discovers app.websocket(...) routes and documents their handshake path in a Swagger-friendly way.

Fixed

  • Fixed orWhere handling so grouped OR clauses are compiled consistently across select, update, delete, first(), and all() query paths.
  • Fixed all() on models so chained query builder filters are respected instead of returning every row.
  • Fixed MySQL where-based update parameter ordering when orWhere filters are present.
  • Fixed websocket event encoding crashes when emitting non-primitive Dart objects such as DateTime.

v1.0.1+1

2026-04-15

Release Status

  • Public patch build.

Added

  • Added focused upsert regression tests covering excludeUpdatedData, createData, and updateData.

Changed

  • Expanded upsert to support explicit createData and updateData payloads alongside the legacy shared data payload.
  • Restricted excludeUpdatedData to legacy data mode and improved uniqueBy resolution when explicit payloads are used.

Fixed

  • Prevented upsert from creating rows when only update payload data is available.
  • Ensured DB.overrideConnection(...) sets the active driver so database-backed tests can run against fake connections.

v1.0.1

2026-04-15

Release Status

  • Public stable patch release.

Fixed

  • Fixed flint migrate so migration failures propagate instead of returning a successful process exit.
  • Fixed MySQL schema comparison to decode metadata reliably and avoid false column updates on clean reruns.
  • Fixed migration type parsing so column types like DOUBLE NOT NULL and BOOLEAN NOT NULL are parsed correctly.
  • Fixed default comparison normalization for boolean, numeric, and timestamp defaults during schema sync.
  • Fixed MySQL updatedat handling by correctly recognizing ON UPDATE CURRENTTIMESTAMP.

Added

  • Added migration support for syncing declared indexes from Table.indexes, including composite indexes.
  • Added regression tests for schema comparison, default normalization, inline unique columns, and desired index generation.

Changed

  • runTableRegistry now provides canonical table definitions to the migrator instead of precomputed diffs.
  • Restored ai.dart to the top-level package:flintdart/flintdart.dart export surface for backward compatibility.

v1.0.0+33

2026-03-16

Release Status

  • Public release build.

Changed

  • Bumped package version to 1.0.0+33.

v1.0.0+32

2026-03-06

Release Status

  • Public release build.

Fixed

  • Fixed framework exception handling so AuthException and validation failures are caught reliably by ExceptionMiddleware.
  • Unified validation exception behavior and aligned validation responses with HTTP 422.
  • Fixed validator edge cases for optional email fields and list:<type> rules.

Changed

  • Simplified the exported exception surface by removing unused exception wrappers and standardizing exception naming.

v1.0.0+31

2026-03-01

Release Status

  • Public release build.

Fixed

  • Fixed stale database connection failures after idle periods in long-running apps (for example, MySQL Can not prepare stmt: connection closed).
  • Added automatic reconnect for both MySQL and PostgreSQL when a closed/stale connection is detected.
  • Added one automatic retry for DB query/execute operations after reconnect on connection-loss errors.
  • Enabled default DB keepalive heartbeats to reduce idle disconnects without requiring extra framework configuration.

v1.0.0+30

2026-02-27

Release Status

  • Public release build.

Fixed

  • Fixed Response.view(...) to avoid wrapping full HTML documents in #main-content, preserving valid <head> metadata structure for SEO and favicon tags.
  • Improved full-document detection in Response.view(...) (<!doctype html and <html>/<head>/<body> checks) to prevent false wrapping.
  • Fixed dev hot-reload script to use the current browser host/protocol (ws:// or wss://) instead of hardcoded ws://localhost:3000/flint_reload.

v1.0.0+29

2026-02-25

Release Status

  • Public release build.

Added

  • Added request-scoped Controller base with bind(Context) and internal context storage.
  • Added controller getters: req, res, socket, plus isHttp / isWebSocket.
  • Added meaningful controller context errors when res is used in WebSocket routes or socket is used in HTTP routes.
  • Added controllerAction(...) helper for binding controller instances per HTTP/WebSocket route invocation.
  • Added useController(...) and useControllerVoid(...) extension helpers for shorter route group controller registration.
  • Added extensible Context.extras storage and typed read<T>() / write<T>() helpers for future session/user injection.

Changed

  • Added controller-based HTTP and WebSocket route examples to the example app and docs.
  • Updated route-group examples to use controller actions without Context method parameters inside controllers.

v1.0.0+28

2026-02-18

Release Status

  • Public release build.

Changed

  • Bumped package version to 1.0.0+28.

v1.0.0+27

2026-02-11

Release Status

  • Public stable release 1.0.1 is planned for a later date.

Added

  • Added new documentation screens in flint_docs: What's New and Changelog.
  • Added automatic loading of framework release notes from flint_dart/CHANGELOG.md in the changelog page.

Changed

  • Updated documentation to a context-first handler style using (Context ctx) examples.
  • Refined WebSocket route examples to emphasize route-level middleware usage.

Improved

  • Improved changelog UI readability with one card per version.
  • Clarified route handler return behavior for serializable values.

Fixed

  • Fixed response lifecycle handling to avoid duplicate header-write crashes in error paths.
  • Simplified WebSocket route flow by relying on route-level middleware execution.

v1.0.0+26

2025-12-20

Fixed

  • Fixed hot reload behavior on Linux.

v1.0.0+25

2025-12-20

Notes

  • Maintenance release.

v1.0.0+24

2025-12-20

Added

  • Live hot reload for .flint.html templates without restarting the server.
  • WebSocket-based reload listener for development mode.
  • Automatic WebSocket reconnection for hot reload when the connection drops.

Improved

  • Developer experience when editing view templates.
  • Faster iteration on UI changes with instant browser refresh.

Fixed

  • Hot reload disconnect issues when the server restarts.

v1.0.0+23

2025-12-17

Added

  • WebSocketManager helpers: emitToRoom, emitToClient, emitToAll for room-scoped and global event emission.
  • Global room system using Set<FlintWebSocket> to prevent duplicate clients in rooms.
  • IsolateTask class for running heavy or long-running tasks in isolates with optional completion and error callbacks.
  • ViewMailable class to send and queue emails from .flint.html templates, replacing the old FlintUI mail system.
  • Support for task progress broadcasting over WebSockets in background tasks.
  • OOP-based RouteGroup system, enabling modular and nested route registration with middleware inheritance.

Changed

  • Refactored AppRoutes and other route groups to OOP style, replacing procedural callbacks.
  • FlintWebSocket now fully cleans up event listeners and rooms on disconnect.
  • Improved middleware inheritance across nested route groups.
  • Flint framework now supports emitting events safely from background isolates.

Fixed

  • Prevented potential memory leaks on WebSocket disconnect.
  • Minor JSON decoding fixes in FlintWebSocket._handleIncomingMessage.
  • Fixed edge cases in queued mail sending.

Notes

  • Internal build increment only (+23) β€” no breaking changes.
  • All APIs are backward-compatible; some procedural route registration can be migrated to RouteGroup classes.

All notable changes to Flint Dart will be documented in this file.

v1.0.0+22

No details provided.

v1.0.0+21

2025-12-02

πŸ†• New Features

  • Full QueryBuilder Dartdoc: Added complete documentation for all QueryBuilder methods.
  • Enhanced LIKE Helpers: whereContains, whereStartsWith, whereEndsWith, and their OR counterparts now fully documented.
  • Date and Range Filtering: whereDate, whereBetween, whereNotBetween fully documented with examples.
  • Aggregate Functions: count, max, min, avg, sum updated with usage examples.

v1.0.0+20

2025-11-28

πŸ†• New Features

  • UUID Primary Key Support: Automatically generates UUIDs for string-based primary keys when no value is provided.
  • Database-Aware Inserts: Insert logic now checks column types and auto-increment settings for both MySQL and PostgreSQL.
  • Column Info Caching: Reduces repeated queries to information_schema by caching column metadata per table.
  • Seamless Auto-Increment Handling: Integer primary keys without values are left to DB auto-increment; no manual intervention needed.
  • PostgreSQL & MySQL Compatible: Insert logic and ID handling work consistently across both supported databases.

v1.0.0+19

2025-11-25

πŸ†• New Features

  • QueryBuilder orWhereLike and orWhereNotLike: Adds OR-based LIKE conditions for more flexible queries.
  • Eager-Loaded Relations Support: withRelations() method added for automatic relation fetching.
  • Pagination Improvements: paginate() method now restores original limits/offsets after fetching.

v1.0.0+18

2025-11-22

πŸ†• New Features

  • Helper Methods for LIKE: Added whereContains, whereStartsWith, whereEndsWith helpers for clean queries.
  • OR Helper Methods: orWhereContains, orWhereStartsWith, orWhereEndsWith for OR-based matching.
  • Case Sensitivity Toggle: All LIKE helpers support caseSensitive parameter.
  • Escape Special Characters: LIKE patterns automatically escape % and with escapeLike() helper.
  • Aggregate Functions: Added count, max, min, avg, and sum for QueryBuilder.
  • Group & Order: groupBy() and orderBy() methods enhanced to support multiple fields.
  • LIMIT & OFFSET: Fluent interface for pagination and query control.

v1.0.0+17

πŸš€ Flint Dart β€”

πŸ†• New Features

  • UUID Primary Key Support: Automatically generates UUIDs for string-based primary keys when no value is provided.
  • Database-Aware Inserts: Insert logic now checks column types and auto-increment settings for both MySQL and PostgreSQL.
  • Column Info Caching: Reduces repeated queries to information_schema by caching column metadata per table.
  • Seamless Auto-Increment Handling: Integer primary keys without values are left to DB auto-increment; no manual intervention needed.
  • PostgreSQL & MySQL Compatible: Insert logic and ID handling work consistently across both supported databases.

πŸ›  Improvements

  • Enhanced debug logging for column info and UUID generation.
  • Optimized fallback for missing column info.
  • Refactored _loadIdColumnInfo for reliable type detection across DB drivers.
  • Improved safety when inserting rows without IDs.

βœ… Fixes

  • Resolved issues with inserting into tables with integer primary keys without breaking auto-increment.
  • Fixed type conversion issues in MySQL when fetching column data.

v1.0.0+16

πŸš€ Flint Dart β€”

✨ New Features

  • Automatic Model Response Handling Flint Dart can now automatically respond with a Model, a List<Model>, or even a Future<Model> / Future<List<Model>> β€” no manual conversion required.
  • .toMap() / .toJson() Object Support Any object implementing a .toMap() or .toJson() method will automatically be serialized into JSON when passed to res.respond() or res.json().
  • .asMaps() Added for List<Model> You can now easily convert a list of models into a list of maps for flexible use in responses or logic.
CodeBlock dart
  var allUsers = await User().all();
  var users = allUsers.asMaps(); // βœ… Converts to List<Map<String, dynamic>>
  return res.json(users);

βš™οΈ Improvements

  • Enhanced JSON serialization to handle:
  • Future<Model> and Future<List<Model>>
  • Nested Futures within lists or maps
  • Custom classes exposing toMap() or toJson()
  • Fully async-safe response system: respond() automatically awaits pending data before sending the response.
  • Smarter RespondType inference β€” now correctly detects:
  • Flint widgets (RespondType.flint)
  • JSON data (maps, lists, models, or futures)
  • HTML strings (<html> / <!DOCTYPE html>)
  • Plain text fallbacks

🧠 Example Usage

CodeBlock dart
// Single Model
return res.respond(user);

// List of Models
return res.respond(users);

// Future<List<Model>>
return res.respond(User().all());

// Object with toMap() or toJson()
return res.respond(customObject);

// Manual list-to-map conversion
var allUsers = await User().all();
return res.json(allUsers.asMaps());

### 🧩 Summary

This update makes Flint Dart’s response system:

* **Smarter** β€” understands models, lists, and async responses automatically
* **Safer** β€” cleans and serializes all nested data properly
* **Simpler** β€” no need for manual `.toMap()` calls in most cases

v1.0.0+15

πŸš€ Flint Dart β€”

v1.0.0+14

πŸš€ Flint Dart β€”

v1.0.0+13

πŸš€ Flint Dart β€”

v1.0.0+12

πŸš€ Flint Dart β€”

v1.0.0+11

πŸš€ Flint Dart β€”

🧩 Updates & Improvements

  • πŸ› οΈ Bug Fixes: Resolved several minor issues across the framework for improved stability.
  • βš™οΈ Patch Enhancements: Applied multiple patches to improve reliability and developer experience.
  • 🧰 CLI Upgrade: The CLI has been updated and upgraded with new commands and performance improvements.
  • πŸ”„ Update System Added: Introduced support for automatic update checks and smoother upgrade handling.

Flint Dart continues to evolve toward a more seamless, developer-friendly backend framework for Dart.

v1.0.0+10

πŸš€ Flint Dart β€”

Flint Dart continues to evolve into a complete backend + UI ecosystem for Dart, combining powerful server-side tools with a new rendering engine β€” Flint UI.

🎨 Flint UI β€” Cross-Platform Rendering System

Flint UI introduces a Flutter-like declarative UI engine for generating HTML, email layouts, and console output directly from Dart β€” no React or HTML strings required.

✨ Core Concept

Flint UI widgets are class-based, composable, and type-safe, similar to Flutter widgets β€” but designed for rendering to multiple formats (HTML, text, JSON).

CodeBlock dart
final button = FlintButton(
  text: "Click Me",
  onClick: () => Log.debug("Button clicked!"),
  style: ButtonStyle(color: "#0066FF"),
);

This can render to:

🧱 Widget Architecture

Every Flint UI element extends FlintWidget, which defines multi-output rendering:

CodeBlock dart
abstract class FlintWidget {
  String toHtml();
  String toText();
  Map<String, dynamic> toJson();
}

Flint UI currently includes:

| Widget                     | Purpose                                      |
| -------------------------- | -------------------------------------------- |
| `FlintText`                | Render styled text                           |
| `FlintButton`              | Interactive button element                   |
| `FlintImage`               | Display images with `ImageStyle`             |
| `FlintContainer`           | Layout box with padding, border, and shadows |
| `FlintRow` / `FlintColumn` | Flexbox-style layout widgets                 |
| `FlintCard`                | For email-style components                   |
| `FlintSpacer`              | Adds layout spacing between elements         |

### 🎨 Styling System

Flint UI introduces **style classes** for full layout and visual control, mirroring Flutter's intuitive APIs.

#### πŸ–ΌοΈ ImageStyle

const ImageStyle( opacity: 0.9, fit: ObjectFit.cover, filter: "grayscale(100%)", title: "Profile Picture", );

➑️ Converts to:

CodeBlock css
opacity: 0.9;
object-fit: cover;
filter: grayscale(100%);

#### πŸ“¦ BoxStyle

Includes `BoxBorder`, `BorderRadius`, `BoxShadow`, and `BoxConstraints`.

FlintContainer( style: BoxDecoration( gradient: Gradient.linear( stops: [ ColorStop("#FF5733", 0.0), ColorStop("#FFC300", 1.0), ], ), ), );

➑️ Generates:

CodeBlock css
background: linear-gradient(to bottom, #FF5733 0%, #FFC300 100%);

### πŸ“„ Output Formats

| Format      | Method                                           | Description |
| ----------- | ------------------------------------------------ | ----------- |
| `.toHtml()` | Returns HTML markup for emails and web           |             |
| `.toText()` | Returns text-only layout (for CLI or plain mail) |             |
| `.toJson()` | Returns serializable structure (for API UI sync) |             |

### πŸ’‘ Use Case Examples

#### Email Templates

final email = FlintContainer( child: FlintColumn(children: [ FlintText("Welcome to Flint!", style: TextStyle(fontSize: 24)), FlintButton(text: "Get Started", onClick: () {}), ]), );

Log.debug(email.toHtml());

Server-Side Rendering (SSR)

Use Flint UI widgets to generate HTML views for your backend routes.

CodeBlock dart
app.get('/welcome', (req, res) {
  final ui = FlintText("Welcome to Flint Server!");
  return res.html(ui.toHtml());
});

## 🧩 Database Enhancements

Flint Dart’s ORM and schema engine continue to mature with smarter migration logic and framework-level introspection.

### πŸ•“ Auto–Managed Timestamp Columns

Flint automatically injects `created_at` and `updated_at` columns into every table migration (if missing).

CREATE TABLE users ( id SERIAL PRIMARY KEY, name VARCHAR(255), createdat TIMESTAMP DEFAULT CURRENTTIMESTAMP, updatedat TIMESTAMP DEFAULT CURRENTTIMESTAMP );

βœ… Supported on MySQL and PostgreSQL.

πŸ” Auth Table Enhancements

When the table matches your .env AUTH_TABLE (e.g. users), Flint automatically adds:

| Column | Type | Purpose | | ------------- | ------------ | ------------------------------------- | | provider | VARCHAR(100) | Login provider (Google, GitHub, etc.) | | provider_id | VARCHAR(255) | Provider user ID |

Example .env:

AUTHTABLE=users AUTHPROVIDERCOLUMN=provider AUTHPROVIDERIDCOLUMN=provider_id

πŸ’‘ Non-auth tables skip these fields automatically.

πŸ“« Mail System Upgrade

🧠 Smarter Configuration via .env

Flint’s Mail system now reads all SMTP credentials directly from .env.

CodeBlock env
MAIL_PROVIDER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=youremail@gmail.com
MAIL_PASSWORD=yourpassword
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=youremail@gmail.com
MAIL_FROM_NAME=Eulogia Technologies

### βš™οΈ Automatic Setup

Initialize with:

await MailConfig.load();

βœ… Auto-detects provider βœ… Applies SSL/TLS βœ… Logs configuration status

Example output:

πŸ“§ Mail configured for provider: gmail (youremail@gmail.com)

🧰 Mail API Enhancements

  • .from() β†’ Custom sender via .env
  • .queue() β†’ Background mail sending with isolates
  • .sendMail() β†’ Automatic plain-text fallback
  • Unified configuration for all SMTP providers

Example:

CodeBlock dart
await Mail()
  .to("user@example.com")
  .subject("Welcome to Flint Dart!")
  .html("<h1>Hello!</h1>")
  .sendMail();

## πŸͺΆ Internal Framework Improvements

* Fixed MySQL syntax for index creation (`CREATE INDEX IF NOT EXISTS`).
* Improved migration resilience for missing columns.
* Added consistent JSON serializers for all UI classes.
* Flint CLI updates for better hot reload and DB sync logging.
* Framework-level integration between **Flint UI** and **Mail API** for generating email bodies via widgets.

## πŸ“š Documentation Updates

* Added **Flint UI Developer Guide**
* Added **Flint Mail Setup & .env Reference**
* Added **Database Schema Enhancements** section
* Added **UI JSON Output** specification for external integrations
* Updated **Framework Change Log** and migration system examples

> Built with ❀️ by **Eulogia Technologies**
> Empowering Dart developers to build **modern full-stack systems** β€” backend + UI β€” all in Dart.

v1.0.0+7

πŸš€ Flint Dart β€”

Flint Dart continues to evolve into a complete backend framework for Dart modern tooling, and now a powerful real-time WebSocket system.

CodeBlock `markdown

v1.0.0+6

πŸš€ Flint Dart β€”

Flint Dart continues to evolve into a complete backend framework for Dart developers β€” with Laravel-style syntax, modern tooling, and now a powerful real-time WebSocket system.

🧩 WebSocket System (Major Upgrade)

πŸ” Socket.IO–like API

Flint now ships with an easy-to-use WebSocket engine with event-based communication:

CodeBlock dart
app.ws('/chat', (socket, params) {
  socket.on('message', (data) {
    Log.debug('πŸ’¬ ${socket.id} says: $data');
    socket.broadcastToRoom('chat', {'event': 'message', 'data': data});
  });
});

Client-side:

final ws = FlintWebSocketClient("wss://api.example.com/chat"); ws.on('message', (data) => Log.debug("πŸ“© $data")); ws.emit('message', {'text': 'Hello World'});

πŸ’¬ Core Features

  • .emit(event, data) β†’ Send named events easily
  • .on(event, callback) β†’ Listen for specific events
  • .onMessage() and .onJsonMessage() remain supported for backward compatibility
  • .join(room) and .leave(room) for group messaging
  • .broadcast() and .broadcastToRoom() for real-time updates
  • Auto Reconnect on the client when connection drops
  • JWT Support using the same middleware chain as HTTP routes
  • Auth Middleware can now protect both HTTP and WebSocket connections

🧠 Middleware Enhancements

Middleware can now be used directly on WebSocket routes with the same .useMiddleware() API.

Example

CodeBlock dart
app.ws('/notifications', (socket, params) {
  socket.on('ping', (_) => socket.emit('pong', 'ok'));
}).useMiddleware(AuthMiddleware());

### WebSocket Auth Example

class AuthMiddleware extends Middleware { @override Handler handle(Handler next) { return (Request req, Response res) async { final token = req.bearerToken; if (token == null || token != "expected_token") { return res.status(401).send("Unauthorized"); } return await next(req, res); }; } }

πŸ“« Mail Integration

WebSocket events can now trigger Flint's Mail API, enabling instant notification workflows (e.g., send an email when a user joins a chat).

CodeBlock dart
socket.on('userJoined', (data) async {
  await Mail.to(data['email']).subject("Welcome!").send("Welcome to the chat!");
});

## 🧩 Developer Experience

* Unified `.emit()` and `.on()` API across both **server and client**
* Auto-room management for group messages
* Cleaner connection logs:

βœ… Client connected: <uuid> ❌ Client disconnected: <uuid>

CodeBlock code
* Consistent `app.ws()` route definition similar to `app.get()` and `app.post()`

## 🧰 CLI & Internal

* Stability improvements for CLI and WebSocket debugging
* Hot reload-safe connections for development
* No new CLI commands introduced in this version

## πŸ“š Documentation

* Added **WebSocket Usage Guide**:

  * Connecting with JWT
  * Using `.emit()` and `.on()`
  * Broadcasting
  * Room system
* Added **Middleware for WebSockets** section.
* Added example for mail integration within socket events.
* Updated Swagger documentation to include WebSocket annotations *(experimental)*

> Built with ❀️ by **Eulogia Technologies**
> Empowering Dart developers to build modern, scalable backends.

v1.0.0+5

Middleware

  • Added .useMiddleware() API for attaching middleware directly to routes, making route-level middleware usage cleaner and more expressive. Example:
CodeBlock dart
  app.get('/profile', controller.show).useMiddleware(AuthMiddleware());
Fixed bugs in middleware chaining to ensure multiple middlewares execute in the correct order.

Database
Minor internal bug fixes in query builder (stability improvements).

Response API
No changes.

Static Files
No changes.

Error Handling
Stability improvements when using custom middlewares with ExceptionMiddleware.

πŸ“„ Swagger Documentation
Flint Dart ships with best-in-class API documentation out of the box. Using Swagger-style annotations, you can describe your routes directly in code and automatically generate OpenAPI specifications with an interactive Swagger UI.

Annotating Routes
Add /// comments above each route to document summary, request body, responses, and security requirements.

dart
Copy code
import 'package:flint_dart/flint_dart.dart';
import 'package:sample/src/middlewares/auth_middleware.dart';
import '../controllers/user_controller.dart';

void registerUserRoutes(Flint app) {
  final controller = UserController();

  /// @summary List all users
  /// @server http://localhost:3000
  /// @server https://api.mydomain.com
  /// @prefix /users
  app.get("/", controller.index);

  /// @summary Get a user by ID
  /// @prefix /users
  app.get("/:id", controller.show);

  /// @prefix /users
  /// @summary Create a new user
  /// @response 200 User registered successfully
  /// @response 404 User not found
  /// @body {"email": "string", "password": "string"}
  app.post('/', controller.create);

  /// @prefix /users
  app.put('/:id', AuthMiddleware().handle(controller.update));

  /// @prefix /users
  /// @auth basicAuth
  app.delete('/:id', AuthMiddleware().handle(controller.delete));
}
Supported Annotations
@summary β†’ Short description of the endpoint.

@server β†’ Define server base URLs.

@prefix β†’ Path prefix for grouped routes.

@response [code] [description] β†’ Document response codes.

@body {} β†’ Example request body JSON.

@auth [scheme] β†’ Specify authentication (e.g., basicAuth, bearerAuth).

Generating Swagger UI
Flint Dart parses these annotations and serves Swagger docs at /docs or /swagger.
Developers can explore and test endpoints directly from the browser.

void main() {
  // Enable swagger docs
  final app = Flint(enableSwaggerDocs: true);

  // Register routes
  app.mount("/users", registerUserRoutes);

  app.listen(3000);
}
CLI Commands
Flint Dart also includes CLI tools to manage and export your API documentation.
This keeps docs in sync with your routes and is useful for CI/CD pipelines.

# Generate Swagger JSON from your routes
flint docs:generate
Example Swagger UI
After running your app, visit:
πŸ‘‰ http://localhost:3000/docs
to view the interactive API documentation generated from your annotations.

Docs
Updated middleware documentation with new .useMiddleware usage examples.

Added notes on bug fixes for route-level middleware chaining.

Added new section for Swagger docs integration with setup guide and usage examples.

v1.0.0+4

Database

  • Added whereIn query builder method for filtering by a list of values. Example:
CodeBlock dart
  await User.query().whereIn('id', [1, 2, 3]);
Added as alias support in query builder.
Example:

dart
Copy code
await User.query().select(['id', 'name.as(username)']).get();
PostgreSQL integration fully verified:

Auto-increment (primary key sequences) working correctly.

Migrations and schema syncing stable.

Middleware
ExceptionMiddleware now handles a wider range of errors globally:

FormatException

TimeoutException

ArgumentError

PgException

MySQLClientException

MySQLException

ForbiddenError

Generic Exception

Response API
No changes (see +3 for chaining improvements).

Static Files
No changes.

Error Handling
No changes (ExceptionMiddleware improvements listed above).

Docs
Added usage examples for whereIn and as in query builder section.

Updated middleware docs to reflect new exception handling coverage.

v1.0.0+3

  • Database: Added autoConnectDb flag to allow disabling automatic DB connection (app.listen(port, autoConnectDb: false)).

Middleware:

  • Added default ExceptionMiddleware (handles ValidationException and unexpected errors globally).
  • Added withDefaultMiddleware flag to let users disable auto-injected middlewares.

Response API:

  • All Response helpers (json, send, status, etc.) now return Response for consistent chaining.
  • Handler typedef: Updated to FutureOr<Response?> Function(Request, Response) for better type safety and chaining.

Static Files:

  • Fixed static file serving to always return a Response.

Error Handling:

  • Default 404 Not Found handler now returns a proper response.

Docs:

  • Improved docstrings for autoConnectDb, withDefaultMiddleware, and middleware behavior.

v1.0.0+2

  • Initial public release of Flint Dart.
  • Added Websocket.

v1.0.0+1

  • Initial public release of Flint Dart.
  • Added CLI commands: create, start, migrate, make:model.
  • Added MySQL and PostgreSQL ORM support.

v1.0.0

  • Bug fixes in migration system.
Flint Dart logo
Flint DartBackend framework and Dart UI docs

Build routes, controllers, APIs, docs, and browser UI from one Dart-shaped stack.

Controllers
OpenAPI
Flint UI
Copyright 2024 Flint Dart. Maintained by Eulogia Technologies.
v 1.2.2
MIT License
Built with Dart