duxt 0.2.8
duxt: ^0.2.8 copied to clipboard
A meta-framework for Jaspr with module-based architecture, file-based routing, layouts, and scaffold generators.
Changelog #
All notable changes to this project will be documented in this file.
0.2.3 - 2026-01-29 #
Changed #
- Rewrite composables to use actual Jaspr router APIs
useRouter(context)returnsRouterStatefrom jaspr_router- Added
DuxtNavigationextension onBuildContextforcontext.push(),context.back(), etc. - Added
AsyncData<T>class for standalone async state management - Added route param helpers:
requireParam,paramOr,queryParam,queryParamOr - Removed placeholder
UseFetch,UseAsyncData,UseState,UseRoute,UseRouterclasses - Updated URLs to duxt.dev and duxt-base/duxt
0.2.2 - 2026-01-28 #
Changed #
- Fixed
DuxtState- changed from mixin to abstract class for better generics support - Fixed form templates to use proper jaspr
input()andbutton()API - Added
jaspr/dom.dartimport to all generated files for HTML elements - Removed all third-party trademark references
- Updated GitHub URLs to base-al/duxt
Fixed #
input()now usestype: InputType.textandname:parameters correctlybutton()now usestype: ButtonType.submitcorrectly- Build errors from incorrect jaspr imports
0.2.1 - 2026-01-28 #
Changed #
- Removed third-party trademark references from documentation
- Updated README with new module-based structure examples
0.2.0 - 2026-01-28 #
Changed #
- Module-based architecture - Opinionated structure
lib/ ├── posts/ # Module │ ├── pages/ # Routes: /posts, /posts/:id │ ├── components/ # Module components │ ├── model.dart # Data model │ └── api.dart # API calls ├── shared/ # Cross-module │ └── layouts/ └── app.dart
Added #
Apiclass - Simple static HTTP clientfinal posts = await Api.get('/posts'); await Api.post('/posts', body: {'title': 'Hello'});DuxtStatemixin - SPA data loading with loading/error statesDuxtMultiStatemixin - Multiple data sourcesduxt g module <name>- Generate new moduleduxt g layout <name>- Generate layoutduxt --version- Show version- Grouped help output
Removed #
duxt addcommand (merged intoduxt g)- Old flat structure (
lib/pages/,lib/components/, etc.)
Fixed #
- Router generator now scans module-based structure
- Scaffold generates proper module structure
0.1.0 - 2026-01-28 #
Added #
-
Initial release
-
CLI Commands
duxt create- Create new Duxt projectduxt dev- Start development server with hot reloadduxt start- Start production server (auto-finds free port)duxt build- Build for productionduxt generate- Generate static siteduxt g- Generate files with fields (model, page, component, api, middleware, composable)duxt add- Add files without fieldsduxt scaffold- Full CRUD generation
-
Project Structure
- File-based routing from
lib/pages/ - Layouts system in
lib/layouts/ - Components in
lib/components/ - Models in
lib/models/ - API routes in
server/api/ - Middleware in
middleware/ - Composables in
composables/
- File-based routing from
-
Runtime Features
DuxtPage- Base page class with layout, middleware, metaDuxtLayout- Base layout classDuxtMiddleware- Route middleware supportDuxtContext- Context for asyncData and middleware- Composables:
UseState,UseFetch,UseAsyncData,UseRoute,UseRouter
-
API Handler
ApiHandler- Base class for API routesApiRequest/ApiResponse- Request/response handlingdefineEventHandler- event handler- Helper functions:
readBody,getQuery,sendRedirect, etc.
-
Integrations
- Jaspr ^0.22.1
- Jaspr Router ^0.8.1
- Tailwind CSS via jaspr_tailwind