duxt 0.2.1
duxt: ^0.2.1 copied to clipboard
A meta-framework for Jaspr with module-based architecture, file-based routing, layouts, and Rails-like scaffolding.
Changelog #
All notable changes to this project will be documented in this file.
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 Rails-like 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- Rails-like 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