Dart web - Experimental web framework for Dart. Supports SPA and SSR

Related tags

Desktop dart_web
Overview

dart_web

Experimental web framework for Dart. Supports SPA and SSR. Relies on package:domino and its incremental dom rendering approach for dynamic updates.

Features:

  • Server Side Rendering
  • Component model similar to Flutter
  • Automatic hydration of component data in client

Get Started

To get started create a new dart web app using the web-simple template with the dart create tool:

dart create -t web-simple my_web_app
cd my_web_app

Next you need to activate webdev which handles the general serving and building of the web app, and also add dart_web as a dependency:

dart pub global activate webdev
dart pub add dart_web --git-url=https://github.com/schultek/dart_web

Now it is time to create your main component, which will be the starting point of your app. Place the following code in lib/components/app.dart:

import 'package:dart_web/dart_web.dart';

class App extends StatelessComponent {
  @override
  Iterable<Component> build(BuildContext context) sync* {
    yield DomComponent(
      tag: 'p',
      child: Text('Hello World'),
    );
  }
}

This will later render a single paragraph element with the content Hello World.

Now you need to use this component by passing it to the runApp method that is available through dart_web. Since we are effectively building two apps - one in the browser and one on the server - we need separate entry points for this.

  1. For the browser app there is already a main.dart inside the web/ folder. Change its content to the following:
import 'package:dart_web/dart_web.dart';
import 'package:my_web_app/components/app.dart';

void main() {
  runApp(App(), id: 'output');
}

This will import the App component and pass it to runApp, together with the id of the root element of our app. Notice that this is the id of the generated

in the index.html file. You can change the id as you like but it must match in both files.

  1. For the server app create a new main.dart file inside the lib/ folder and insert the following:
import 'package:dart_web/dart_web.dart';
import 'components/app.dart';

void main() {
  runApp(App(), id: 'output');
}

You will notice it is pretty much the same for both entrypoints, and this is by design. However you still want to keep them separate for later, when you need to add platform specific code.

Finally, run the development server using the following command:

dart run dart_web serve

This will spin up a server at localhost:8080. You can now start developing your web app. Also observe that the browser automatically refreshes the page when you change something in your code, like the Hello World text.

Components

dart_web uses a similar structure to Flutter in building applications. You can define custom stateless or stateful components (not widgets) by overriding its build() method.

Since html rendering works different to flutters painting approach, here are the core aspects and differences of the component model:

  1. The build() method returns an Iterable instead of a single component. This is because a html node can always have multiple child nodes. The recommended way of using this is with a synchronous generator. Simply use the sync* keyword in the method definition and yield one or multiple components.

  2. There are only two existing components that you can use: DomComponent and Text.

  • DomComponent renders a html element with the given tag. You can also set an id, attributes and events. It also takes a child component.
  • Text renders some raw html text. It receives only a string and nothing else. Style it through the parent element(s), as you normally would in html and css.
  1. The State of a StatefulComponent supports preloading some data on the server. To use this feature, override the FutureOr preloadData() method. See Preloading Data.

Preloading Data

When using server side rendering, you have the ability to preload data for your components before rendering the html. Also when initializing the app on the client, we need access to this data to keep the rendering consistent.

With dart_web this is build into the package and easy to do.

First, when defining your State class for a StatefulComponent, it takes an additional type argument referring to the data type that you want to load: class MyState extends State . Note that this type must be json serializable.

To load your data, override the FutureOr preloadData() method. This will only be executed on the server and can return a future.

Now when overriding initState(T? data) you receive an additional parameter containing the loaded data, both on the server and on the client.

Building

You can build your application using the following command:

dart run dart_web build

This will build the app inside the build directory. You can choose whether to build a standalone executable or an aot or jit snapshot with the --target option.

To run your built application do:

cd build
./app
Comments
  • Jaspr UI components

    Jaspr UI components

    Hello @schultek thank you a lot for Jaspr web framework. It is very nice and I believe it can be very popular in the future :-)

    Now I have an idea to create some small simple components for better, beautiful and faster development with Jaspr.

    I added another jaspr_ui package into your Jaspr project with some basic HTML elements, CSS Styles and Bootstrap component. This is only simple kickoff for see how it can look and I plan to add more in the future. In examples you can see 4 small examples and in ROADMAP.md is simple TODO list about what is done and what I plan to do.

    A lot of work is here yet and I would like to ask you if you are opened to add jaspr_ui into your project when I will develop and maintain this part of Jaspr. I believe it can be very useful for many people similar like Material or Cupertino widgets in Flutter. And you will have also one more contributor in this project ;-)

    Let me know what do you think about it. Martin

    opened by mjablecnik 10
  • Bug in HTML Entity characters

    Bug in HTML Entity characters

    I want to add into my page some &nbsp; or other HTML entity characters.

    I have this code:

    import 'package:jaspr/components.dart';
    import 'package:jaspr/jaspr.dart';
    import 'package:jaspr/styles.dart';
    
    class BasicApp extends StatelessComponent {
      @override
      Iterable<Component> build(BuildContext context) sync* {
        yield Header(text: 'Hello World', size: HeaderSize.h2);
    
        yield RichText(children: [
          TextSpan(
            text: "Don't have an account?",
            styles: Styles.text(
              color: Color.named('black'),
              fontWeight: FontWeight.w500,
              fontSize: 14.pt,
            ),
          ),
          Text("&nbsp;", rawHtml: false),
          TextSpan(
            text: "Sign up",
            styles: Styles.text(
              color: Color.named('blue'),
              fontWeight: FontWeight.w500,
              fontSize: 14.pt,
            ),
          )
        ]);
      }
    }
    

    And after build I see this: image

    When I set rawHtml to true: image so I don't see my previous component there: image

    Is some bug in builder?

    Code of new jaspr components which I am using in example above is here: https://github.com/mjablecnik/jaspr/tree/jaspr-components/packages/jaspr/lib/src/ui/components

    opened by mjablecnik 8
  • Observer component and MobX Hooks integration example app

    Observer component and MobX Hooks integration example app

    Closes https://github.com/schultek/jaspr/issues/26

    Hi,

    As discussed in the issue, this PR implements an ObserverComponent within the framework. The code is similar to some of the sections for InheritedComponents, there is a _updateObservers that assigns the _observerElements from the parent and registers the element if it itself is an ObserverElement. The ObserverElement methods willRebuildElement, didRebuildElement and didUnmountElement are already executed in the build process. At the moment, they are required to be implemented (do not have a default implementation). However, it could be best to leave an empty function implemented?

    I created a mobx_hooks_experimental app within the experimental folder. It contains the same logic as before for hooks and mobx tracking, but using the new ObserverComponent infrastructure. The MobXHooksObserverComponent is used only once at the top of the component tree in main.dart and all child elements are being tracked (they can use hooks and they subscribe automatically to observables).

    I think I would like to make some tests for the framework and for the mobx_hooks part too. What do you think we should do about the MobX and Hooks integration? At the moment it is some kind of example app, however, it could be a complete package.

    Thanks!

    opened by juancastillo0 7
  • Error when trying the create jaspr project command.

    Error when trying the create jaspr project command.

    `C:\Users\saifk\AppData\Local\Pub\Cache\bin>jaspr create jasp_web_app Creating jasp_web_app using template web-simple...

    .gitignore analysis_options.yaml CHANGELOG.md pubspec.yaml README.md web\index.html web\main.dart web\styles.css

    lib/app.dart lib/app.dart

    Resolving dependencies... Null check operator used on a null value package:pub/src/entrypoint.dart 157:60 Entrypoint.lockFilePath package:pub/src/entrypoint.dart 100:21 Entrypoint._loadLockFile package:pub/src/entrypoint.dart 97:42 Entrypoint.lockFile package:pub/src/entrypoint.dart 286:21 Entrypoint.acquireDependencies. package:pub/src/entrypoint.dart 280:68 Entrypoint.acquireDependencies. package:pub/src/log.dart 428:18 progress package:pub/src/entrypoint.dart 280:26 Entrypoint.acquireDependencies package:pub/src/command/get.dart 52:22 GetCommand.runProtected package:pub/src/command.dart 183:45 PubCommand.run. package:pub/src/command.dart 183:33 PubCommand.run. dart:async new Future.sync package:pub/src/utils.dart 109:12 captureErrors.wrappedCallback dart:async runZonedGuarded package:pub/src/utils.dart 126:5 captureErrors package:pub/src/command.dart 183:13 PubCommand.run package:args/command_runner.dart 209:27 CommandRunner.runCommand package:dartdev/dartdev.dart 231:30 DartdevRunner.runCommand package:args/command_runner.dart 119:25 CommandRunner.run. dart:async new Future.sync package:args/command_runner.dart 119:14 CommandRunner.run package:dartdev/dartdev.dart 66:29 runDartdev C:\b\s\w\ir\cache\builder\sdk\pkg\dartdev\bin\dartdev.dart 11:9 main This is an unexpected error. The full log and other details are collected in:

    C:\Users\saifk\AppData\Local\Pub\Cache\log\pub_log.txt
    

    Consider creating an issue on https://github.com/dart-lang/pub/issues/new and attaching the relevant parts of that log file. Null check operator used on a null value #0 Entrypoint.lockFilePath (package:pub/src/entrypoint.dart:157:60) #1 dumpTranscriptToFile (package:pub/src/log.dart:375:50) #2 PubCommand.run (package:pub/src/command.dart:225:13) #3 CommandRunner.runCommand (package:args/command_runner.dart:209:13) #4 DartdevRunner.runCommand (package:dartdev/dartdev.dart:231:18) #5 runDartdev (package:dartdev/dartdev.dart:66:16) #6 main (file:///C:/b/s/w/ir/cache/builder/sdk/pkg/dartdev/bin/dartdev.dart:11:3) `

    opened by hippedorange22 6
  • Cannot run jaspr in Linux Mint

    Cannot run jaspr in Linux Mint

    Hello I am trying run in Linux Mint command: dart run jaspr serve -v

    But it return me:

    martin at probook-pc my_web_app >>> dart run jaspr serve -v
    Building package executable...
    Built jaspr:jaspr.
    Starting jaspr development server...
    Failed to build webdev:webdev:
    /home/martin/.pub-cache/hosted/pub.dartlang.org/dwds-12.1.1/lib/src/services/chrome_proxy_service.dart:540:24: Error: The method 'ChromeProxyService.getSourceReport' has fewer named arguments than those of overridden method 'VmServiceInterface.getSourceReport'.
      Future<SourceReport> getSourceReport(String isolateId, List<String> reports,
                           ^
    /home/martin/.pub-cache/hosted/pub.dartlang.org/vm_service-8.3.0/lib/src/vm_service.dart:846:24: Context: This is the overridden method ('getSourceReport').
      Future<SourceReport> getSourceReport(
                           ^
    /home/martin/.pub-cache/hosted/pub.dartlang.org/dwds-12.1.1/lib/src/services/chrome_proxy_service.dart:540:24: Error: The method 'ChromeProxyService.getSourceReport' doesn't have the named parameter 'libraryFilters' of overridden method 'VmServiceInterface.getSourceReport'.
      Future<SourceReport> getSourceReport(String isolateId, List<String> reports,
                           ^
    /home/martin/.pub-cache/hosted/pub.dartlang.org/vm_service-8.3.0/lib/src/vm_service.dart:846:24: Context: This is the overridden method ('getSourceReport').
      Future<SourceReport> getSourceReport(
                           ^
    Failed to build webdev:webdev:
    /home/martin/.pub-cache/hosted/pub.dartlang.org/dwds-12.1.1/lib/src/services/chrome_proxy_service.dart:540:24: Error: The method 'ChromeProxyService.getSourceReport' has fewer named arguments than those of overridden method 'VmServiceInterface.getSourceReport'.
      Future<SourceReport> getSourceReport(String isolateId, List<String> reports,
                           ^
    /home/martin/.pub-cache/hosted/pub.dartlang.org/vm_service-8.3.0/lib/src/vm_service.dart:846:24: Context: This is the overridden method ('getSourceReport').
      Future<SourceReport> getSourceReport(
                           ^
    /home/martin/.pub-cache/hosted/pub.dartlang.org/dwds-12.1.1/lib/src/services/chrome_proxy_service.dart:540:24: Error: The method 'ChromeProxyService.getSourceReport' doesn't have the named parameter 'libraryFilters' of overridden method 'VmServiceInterface.getSourceReport'.
      Future<SourceReport> getSourceReport(String isolateId, List<String> reports,
                           ^
    /home/martin/.pub-cache/hosted/pub.dartlang.org/vm_service-8.3.0/lib/src/vm_service.dart:846:24: Context: This is the overridden method ('getSourceReport').
      Future<SourceReport> getSourceReport(
                           ^
    

    How can I fix it?

    My Dart version is:

    Dart SDK version: 2.16.1 (stable) (Tue Feb 8 12:02:33 2022 +0100) on "linux_x64"
    

    And linux version:

    Distributor ID: LinuxMint
    Description:    Linux Mint 19.3 Tricia
    Release:        19.3
    Codename:       tricia
    

    And here are my dependencies:

    martin at probook-pc my_web_app >>> dart pub upgrade
    Resolving dependencies... (2.4s)
      _fe_analyzer_shared 34.0.0 (40.0.0 available)
      analyzer 3.2.0 (4.1.0 available)
      archive 3.3.0
      args 2.3.1
      async 2.9.0
      bazel_worker 1.0.1
      binary_codec 2.0.3
      browser_launcher 1.1.0
      build 2.3.0
      build_config 1.0.0
      build_daemon 3.1.0
      build_modules 4.0.4 (4.0.5 available)
      build_resolvers 2.0.6 (2.0.9 available)
      build_runner 2.1.11
      build_runner_core 7.2.3
      build_web_compilers 3.2.3
      built_collection 5.1.1
      built_value 8.3.2
      checked_yaml 2.0.1
      cli_util 0.3.5
      code_builder 4.1.0
      collection 1.16.0
      convert 3.0.2
      crypto 3.0.2
      csslib 0.17.2
      dart_style 2.2.1 (2.2.3 available)
      dds 2.2.1
      dds_service_extensions 1.3.0
      devtools_shared 2.13.1 (2.14.0 available)
      domino 0.8.3
      dwds 12.1.1 (14.0.3 available)
      file 6.1.2
      fixnum 1.0.1
      frontend_server_client 2.1.3
      glob 2.0.2
      graphs 2.1.0
      hotreloader 3.0.4
      html 0.15.0
      http 0.13.4
      http_multi_server 3.2.0
      http_parser 4.0.1
      io 1.0.3
      jaspr 0.1.3
      js 0.6.4
      json_annotation 4.5.0
      json_rpc_2 3.0.1
      lints 1.0.1 (2.0.0 available)
      logging 1.0.2
      matcher 0.12.11
      meta 1.8.0
      mime 1.0.2
      package_config 2.0.2
      path 1.8.2
      pedantic 1.11.1
      pool 1.5.0
      protobuf 2.0.1
      pub_semver 2.1.1
      pubspec_parse 1.2.0
      scratch_space 1.0.1
      shelf 1.3.0
      shelf_packages_handler 3.0.0
      shelf_proxy 1.0.1
      shelf_static 1.1.0
      shelf_web_socket 1.0.1
      source_maps 0.10.10
      source_span 1.9.0
      sse 4.1.0
      stack_trace 1.10.0
      stream_channel 2.1.0
      stream_transform 2.0.0
      string_scanner 1.1.1
      term_glyph 1.2.0
      timing 1.0.0
      typed_data 1.3.1
      usage 4.0.2
      uuid 3.0.6
      vm_service 8.3.0
      watcher 1.0.1
      web_socket_channel 2.2.0
      webdev 2.7.8 (2.7.9 available)
      webkit_inspection_protocol 1.1.0
      yaml 3.1.1
    No dependencies changed.
    9 packages have newer versions incompatible with dependency constraints.
    Try `dart pub outdated` for more information.
    
    opened by mjablecnik 6
  • Invalid argument(s): A directory corresponding to fileSystemPath

    Invalid argument(s): A directory corresponding to fileSystemPath "...jaspr/experiments/minimal_app/lib/web" could not be found

    I've checked out wip/v0.2 branch and whenever trying to run main.dart within the lib folder I end up seeing the following error.

    Unhandled exception:
    Invalid argument(s): A directory corresponding to fileSystemPath ".../jaspr/experiments/minimal_app/lib/web" could not be found
    #0      createStaticHandler (package:shelf_static/src/static_handler.dart:50:5)
    #1      staticFileHandler (package:jaspr/src/server/server_app.dart:273:7)
    #2      staticFileHandler (package:jaspr/src/server/server_app.dart)
    #3      _createHandler (package:jaspr/src/server/server_app.dart:278:38)
    #4      ServerApp._run.<anonymous closure> (package:jaspr/src/server/server_app.dart:120:21)
    #5      ServerApp._run.<anonymous closure> (package:jaspr/src/server/server_app.dart:117:22)
    #6      new Future.microtask.<anonymous closure> (dart:async/future.dart:276:37)
    #7      _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
    #8      _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
    #9      _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:122:13)
    #10     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:193:5)
    

    I've noticed this same issue on master branch and have moved the main.dart file up 1 directory so it is located at ...jaspr/experiments/minimal_app/main.dart instead of ...jaspr/experiments/minimal_app/lib/main.dart which lets me run the project although I'm not sure if there's a reason not to do this

    v0.2 
    opened by MarkOSullivan94 5
  • `build` method middleware or wrappers to support MobX, hooks, Pods and other framework-wide functionalities

    `build` method middleware or wrappers to support MobX, hooks, Pods and other framework-wide functionalities

    Hi, thanks for your work!

    This may be a weird feature request which will make the package a bit different from Flutter and there may be performance considerations. However, the usability improvements would be great, in my opinion.

    The idea is to provide a middleware for rendering Components, a function that wraps the executions of all build methods, to do various things.

    For example, for registering and tracking dependencies that rebuild the Widget when they change. I believe the javascript framework https://www.solidjs.com/ is based on this concept, similar to MobX's tracking of dependencies. Through testing the package I have implemented some MobX and hooks bindings for Components. In this file you can see the main hooks logic and also the tracking of dependencies within build methods of StatelessObserverComponent similar to the one in package:flutter_mobx, however this one also supports hooks. In Flutter this is a problem it's difficult to use package:flutter_mobx and package:flutter_hooks (two packages implementing Elements) without nesting that the composing of middleware or multiple wrappers can solve. There are no automatic test, but I have tested them manually and you can try the deployed html in gh-pages. More hooks, using the same infrastructure, are implemented in this hooks file.

    This is similar to some work I did in a package:deact fork. However, in that fork a kind of middleware or wrapper is implemented for all build methods, not only for those in StatelessObserverWidget. Which is nicer, since one does not worry about using the appropriate Widget (every build method is being tracked). You would not have to worry where to place them, one would register the middleware for the whole app (or a section) and use observables (or hooks) that are tracked by the middleware. They would all be tracked and rebuild the widgets in the places where the observables are used. There are perhaps some performance implications. Maybe some kind of similar middleware or wrapper for build functions could be provided as API. In this case, all that is needed is a value that saves state in the element and can be disposed (HookCtx), the markNeedsBuild method and a function that executes the build method. As shown in this code:

    List<Component> _mobxHooksWrapper(
      HookCtx ctx,
      void Function() markNeedsBuild,
      List<Component> Function() next,
    ) {
      final previousCtx = _ctx;
      _ctx = ctx;
      final List<Component> children = useTrack(
        next,
        markNeedsBuild,
        name: ctx.hashCode.toString(),
      );
      _ctx = previousCtx;
      return children;
    }
    

    _mobxHooksWrapper is executed on every build and provides MobX tracking with useTrack and hooks support with the HookCtx that is saved in the ComponentElement.

    I the repo, I am always using the implemented StatelessObserverComponent or StatefulObserverComponent since they provide hooks and MobX tracking. To make sure I use them I import package:jaspr though a prelude.dart file that overrides StatelessComponent to StatelessObserverComponent.

    Other use cases may include some kind of profiling, however there are probably other ways to do it too. Maybe some kind of dynamic (can be turned on and off) profiling of certain parts of the Widget tree though similar middleware.

    Maybe unrelated, but maybe some API for dependency injection can be explored though a middleware also. Within the repo there is also an implementation of dependency injection, similar to package:riverpod. For watching, I am relying on MobX's dependency tracking, the pod's value in a pod scope is immutable. However, their properties may be mutable and, if they are MobX observables, everywhere they are used, they are being tracked (provided one uses StatelessObserverComponent). For disposing, the values are disposed when the scope is disposed which is created using the _InheritedPodScope InheritedWidget. One could also create scopes outside of jaspr, but within jasper one reads the pod values with an extension over BuildContext that implements a T pod<T>(Pod<T> pod) method that reads the closest _InheritedPodScope and retrieves the value. Pods can be global or scoped. If they are global a single instance will be created for all scopes within the tree and will be disposed when the whole tree is disposed. If it's not global, then it will be created within a subtree, all children of the scope will be have access to the same instance, but there could be other instances in other scopes (subtrees).

    In this case maybe a middleware could be implemented to support the autoDispose feature in riverpod, where the dependencies are saved within the element and when the Pod's Element dependencies are disposed, then the Pod is disposed.

    In general, this would allow for the framework to be extensible and to test or evaluate framework-wide functionalities that may be implemented natively by the framework in the future, or maybe just leave them as separate packages.

    Thanks!

    opened by juancastillo0 3
  • v0.2: jaspr ui: components + html + styling

    v0.2: jaspr ui: components + html + styling

    This is to keep track of the changes made to the wip/v0.2 branch.

    resolves #16, resolves #18

    TODOs:

    • [x] add html utility components
    • [x] update rendering implementation
    • [x] run as shelf middleware
    • [x] run multiple apps on client
    • [x] finish islands architecture implementation
    • [x] implement document component
    • [x] add benchmarks
    • [x] implement typed styles
    • [ ] experiment with inherited styles
    • [ ] implement common ui components
    • [ ] add jaspr config in pubspec (execution mode)
    • [ ] bump test coverage
    • [ ] new router implementation

    Note to myself: These are getting out of hand, maybe split into two updates.😅

    opened by schultek 3
  • Jaspr Community on Discord

    Jaspr Community on Discord

    Hello @schultek, @snehmehta and others, For better communication during contributing I created Discord server here: https://discord.gg/G8pH8X4u Where you can join and we can communicate on next progress. ;-)

    opened by mjablecnik 3
  • Unable to build on windows

    Unable to build on windows

    PS C:\Users\andre\Desktop> jaspr create try_jaspr
    Creating try_jaspr using template web-simple...
    
      .gitignore
      analysis_options.yaml
      CHANGELOG.md
      pubspec.yaml
      README.md
      web\index.html
      web\main.dart
      web\styles.css
    
      lib/app.dart
      lib/app.dart
    
    Resolving dependencies...
    Changed 81 dependencies!
    
    Created project try_jaspr in try_jaspr! In order to get started, run the following commands:
    
      cd try_jaspr
      jaspr serve
    
    PS C:\Users\andre\Desktop> cd try_jaspr
    PS C:\Users\andre\Desktop\try_jaspr> jaspr build
    Unhandled exception:
    Unsupported operation: Cannot extract a file path from a c URI
    #0      _Uri.toFilePath (dart:core/uri.dart:2825:7)
    #1      new Directory.fromUri (dart:io/directory.dart:129:59)
    #2      BuildCommand.run (file:///C:/Users/andre/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/jaspr-0.1.2/bin/jaspr.dart:237:25)
    #3      CommandRunner.runCommand (package:args/command_runner.dart:209:27)
    #4      CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:119:25)
    #5      new Future.sync (dart:async/future.dart:301:31)
    #6      CommandRunner.run (package:args/command_runner.dart:119:14)
    #7      main (file:///C:/Users/andre/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/jaspr-0.1.2/bin/jaspr.dart:23:31)
    #8      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:32)
    #9      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)
    Unhandled exception:
    Unsupported operation: Cannot extract a file path from a c URI
    #0      _Uri.toFilePath (dart:core/uri.dart:2825:7)
    #1      new Directory.fromUri (dart:io/directory.dart:129:59)
    #2      BuildCommand.run (file:///C:/Users/andre/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/jaspr-0.1.2/bin/jaspr.dart:237:25)
    #3      CommandRunner.runCommand (package:args/command_runner.dart:209:27)
    #4      CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:119:25)
    #5      new Future.sync (dart:async/future.dart:301:31)
    #6      CommandRunner.run (package:args/command_runner.dart:119:14)
    #7      main (file:///C:/Users/andre/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/jaspr-0.1.2/bin/jaspr.dart:23:31)
    #8      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:32)
    #9      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)
    PS C:\Users\andre\Desktop\try_jaspr>
    
    opened by SuperPenguin 3
  • How to generate static website?

    How to generate static website?

    Hi schultek, is it appropriate to use jaspr to generate static pages, like hugo or jekyll did?

    Using StatelessComponent to build gui, and using dart to do interaction, and data was injected through InheritageComponent, and also it could handle raw html for final page generation, e.g. the raw html generated by markdown files. Seems we need templatize dart page files?

    It would be a marvelous feature if it could be implemented.

    opened by lindeer 2
  • Add example for client-side spa with static hosting

    Add example for client-side spa with static hosting

    A purely client-side jaspr app that can be deployed to any static hosting provider.

    Can be done together with some other feature or use-case.

    This may include:

    • setup and dev instructions for running a client-side jaspr app
    • building and deployment instructions (e.g. in README) for any general static hosting provider
    • deployment instructions (e.g. in README) for firebase hosting
    opened by schultek 0
  • Add example using aws lambda

    Add example using aws lambda

    A jaspr app that can be deployed to aws lambda using their dart runtime.

    Can be done together with some other feature or use-case.

    This may include:

    • any sort of setup needed to run on aws lambda
    • building and deployment instructions (e.g. in README) for aws lambda
    • (optionally) integrating with some other aws product on the server (e.g. database)
    opened by schultek 0
  • Add example for using docker and cloud run

    Add example for using docker and cloud run

    A dockerized jaspr app that can be deployed to google cloud run.

    Can be done together with some other feature or use-case.

    This may include:

    • a comprehensive docker file
    • building and deployment instructions (e.g. in README) for cloud run
    • (optionally) integrating with some other gcloud product on the server (e.g. database)
    opened by schultek 0
  • Add example for data fetching and synchronization

    Add example for data fetching and synchronization

    Data fetching and sync is an important aspect for most websites and we should have a well-documented example for this.

    Can be done together with some other feature or use-case.

    This may include:

    • separating code between server and client (the import problem)
    • fetching data on the server (e.g. from an api or database)
    • syncing this data with the client
    • optionally modifying or writing data back to the server (crud style)
    • using non-trivial models with serialization to json (best using dart_mappable package)
    opened by schultek 0
  • Use webdev as package

    Use webdev as package

    The jaspr cli currently uses webdev as a separate child process. However we want to switch to using webdev directly as a package by directly calling its implementation in the dart code.

    This hopefully also fixes #17

    opened by schultek 0
  • Improve code documentation

    Improve code documentation

    There is still a lot of undocumented code in the core package. At least all important classes and methods should be documented using doc comments.

    We should also further customize the generated api docs and add topics for organization using a dartdoc_options.yaml file. See here for documentation and here for an example.

    documentation 
    opened by schultek 0
Owner
Kilian Schulte
Computer Science Student & Flutter Freelancer
Kilian Schulte
Experimental embedder for Flutter

NativeShell (Experimental embedder for Flutter) Features Leverages existing Flutter desktop embedder on each platform Unlike Flutter desktop embedders

NativeShell 551 Dec 28, 2022
Experimental plugins for Flutter for Desktop

Desktop Embedding for Flutter This project was originally created to develop Windows, macOS, and Linux embeddings of Flutter. That work has since beco

Google 7.1k Jan 7, 2023
Binder is a web framework that can be used to create web apps and APIs .

Binder Framework Binder is a web framework that can be used to create web apps and APIs . It's like React + Express or any combination of front-end fr

Kab Agouda 8 Sep 13, 2022
A Flutter plugin to read 🔖 metadata of 🎵 media files. Supports Windows, Linux & Android.

flutter_media_metadata A Flutter plugin to read metadata of media files. A part of Harmonoid open source project ?? Install Add in your pubspec.yaml.

Harmonoid 60 Dec 2, 2022
An 🎵 audio playback library for Flutter Desktop. Supports Windows & Linux. Based on miniaudio.

✒ libwinmedia is sequel to this project. It provides network playback, better format support, control & features. An audio playback library for Flutte

Hitesh Kumar Saini 50 Oct 31, 2022
Serverpod is a next-generation app and web server, explicitly built for the Flutter and Dart ecosystem.

Serverpod Serverpod is a next-generation app and web server, explicitly built for the Flutter and Dart ecosystem. It allows you to write your server-s

Serverpod 1k Jan 8, 2023
Pure Dart Argon2 algorithm (the winner of the Password Hash Competition 2015) for all Dart platforms (JS/Web, Flutter, VM/Native).

argon2 Pure Dart Argon2 algorithm (the winner of the Password Hash Competition 2015) for all Dart platforms (JS/Web, Flutter, VM/Native). Based on the

Graciliano Monteiro Passos 8 Dec 22, 2021
A web dashboard that allows you to monitor your Chia farm and sends notifications when blocks are found and new plots are completed through a discord bot. It can link multiple farmers/harvesters to your account.

farmr A web dashboard that allows you to monitor your Chia farm and sends notifications when blocks are found and new plots are completed through a di

Gil Nobrega 261 Nov 10, 2022
A project that makes use of a Typescript back end and a Flutter web front end to consume the Jira API in order to visualize and interact with issues.

A project that makes use of a Typescript back end and a Flutter web front end to consume the Jira API in order to visualize and interact with issues.

Lucas Coelho 1 Mar 20, 2022
Dawn - a Dart web package for developing UIs in a pattern similar to Flutter.

dawn Description Dawn is a Dart web package for developing UIs in a pattern similar to Flutter. Links GitHub Repository Pub Page Documentation An Exam

Hamed Aarab 45 Jan 6, 2023
A cross-platform app ecosystem, bringing iMessage to Android, PC (Windows, Linux, & even macOS), and Web!

BlueBubbles Android App BlueBubbles is an open-source and cross-platform ecosystem of apps aimed to bring iMessage to Android, Windows, Linux, and mor

BlueBubbles 318 Jan 8, 2023
A platform adaptive Flutter app for desktop, mobile and web.

Flutter Folio A demo app showcasing how Flutter can deliver a great multi-platform experience, targeting iOS, Android, MacOS, Windows, Linux, and web.

gskinner team 3.5k Jan 2, 2023
An eventual FIBS client written in Flutter and hosted on the web

fibscli An eventual FIBS client written in Flutter and hosted on the web. status Currently, the app works as a stand-alone backgammon game w/o connect

Chris Sells 10 Oct 26, 2022
Fluttern is a web app made with Flutter to list Flutter internships/jobs for the community.

Fluttern Fluttern is a web app made with Flutter to list Flutter internships/jobs for the community. It uses Google Sheet as a backend, simplifying th

Aditya Thakur 3 Jan 5, 2022
A Portfolio Website - Flutter Web

A Portfolio Website - Flutter Web Watch it on YouTube This UI is not Responsive A nice clean Portfolio Website for Designer or developers. Which inclu

Abu Anwar 355 Dec 31, 2022
A Flutter Web Plugin to display Text Widget as Html for SEO purpose

SEO Renderer A flutter plugin (under development) to render text widgets as html elements for SEO purpose. Created specifically for issue https://gith

Sahdeep Singh 103 Nov 21, 2022
File picker plugin for Flutter, compatible with mobile (iOS & Android), Web, Desktop (Mac, Linux, Windows) platforms with Flutter Go support.

A package that allows you to use the native file explorer to pick single or multiple files, with extensions filtering support.

Miguel Ruivo 987 Jan 6, 2023
Biyi (比译) is a convenient translation and dictionary app written in dart / Flutter.

biyi_app Biyi is a convenient translation and dictionary app written in dart / Flutter. View document "Biyi" (比译) is the Chinese word for "Comparison

biyidev 894 Jan 1, 2023
Use Dart to call Shell, complete the work of compiling Golang CGO code into a so, dll, a, WASM, and etc.

Use Dart to call Shell, complete the work of compiling Golang CGO code into a so, dll, a, WASM, and etc. And place it in the corresponding source file directory of each Flutter platform.

Dorain Gray 30 Dec 30, 2022