Giter Site home page Giter Site logo

theyakka / cumulus Goto Github PK

View Code? Open in Web Editor NEW
14.0 3.0 1.0 18 KB

Cumulus is a high-level Dart framework that makes developing application logic on top of Firebase quick and simple.

Home Page: https://theyakka.com

License: Other

Dart 100.00%
dart firebase firebase-functions routing

cumulus's Introduction

Cumulus is a high-level framework that makes developing application logic on top of Firebase quick and simple.

Build Status Dart Version

Features

Cumulus has the following bonza features:

  • Simple, straightforward configuration of function endpoints
  • Routable endpoints
  • Common interface for routable and non-routable endpoints
  • Named parameters for routable endpoints (e.g.: /users/:id)
  • Querystring parameter parsing

Installing

Cumulus requires Dart 2.0+.. Cumulus requires the new build_runner system to compile with dart2js/dartdevc and these are not available in the Dart 1.x toolchain. You should add the following to your pubspec:

environment:
  sdk: '>= 2.0.0-dev <3.0.0'

To install, add the following line to the dependencies section of your pubspec.yaml file:

dependencies:
  ...
  cumulus: ^1.0.0

You can then import cumulus using:

import 'package:cumulus/cumulus.dart';

Getting started

TBD - how to set up a project using dart

Next, we need to create an instance of a CumulusApp in the main function of your index.dart file. Something like:

void main() {
  CumulusApp app = new CumulusApp.appWithDefaults();
  app.addHandler("/welcome", handler: welcomeHandler);
}

Once this is done, you can define your handlers. For now we will add it to the index.dart file directly. Our handler looks like:

welcomeHandler(HandlerContext context, Parameters parameters) {
  final res = context.response;
  res.statusCode = 200;
  res.headers.contentType = ContentType.JSON;
  res.write(json.encode({
    "message": "HELLO!!!!",
  }));
  res.close();
}

At this point you can run the build and then deploy your function.

FAQ

Why should I use this and not ____?

We prefer you use whatever you want. Cumulus is, most likely, no better or worse than the alternatives.

Cumulus was designed and developed because of an actual need to make working with Firebase Functions easier and faster. Developing apps should be fun, not tedious boilerplate and confusing templates. Hopefully Cumulus works for you personally.

Give it a try and if you like it, let us know! Either way, we love feedback.

Has it been tested in production? Can I use it in production?

The code here is built on top of (mostly) two other libraries:

The Yakka website uses this code in production and Yakka uses it for both internal and external clients as well. That said, code is always evolving. We plan to keep on using it in production but we also plan to keep on improving it. If you find a bug, let us know!

Who the f*ck is Yakka?

Yakka is the premier Flutter agency and a kick-ass product company. We focus on the work. Our stuff is at http://theyakka.com. Go check it out.

Outro

Credits

Again, without the firebase-functions-interop library by Anatoly Pulyaevskiy none of this would be possible. Go and star the project!

Cumulus is sponsored, owned and maintained by Yakka LLC. Feel free to reach out with suggestions, ideas or to say hey.

Security

If you believe you have identified a serious security vulnerability or issue with Cumulus, please report it as soon as possible to [email protected]. Please refrain from posting it to the public issue tracker so that we have a chance to address it and notify everyone accordingly.

License

Cumulus is released under a modified MIT license. See LICENSE for details.

cumulus's People

Contributors

efortuna avatar kevmoo avatar lukef avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

efortuna

cumulus's Issues

Clarify Dart 1 vs Dart 2

This sentence from the readme:

Cumulus will probably require Dart 2.0+. Cumulus was developed on the 2.0 (pre-release) version of Dart but, for now, it probably works fine on 1.X as well.

AFAIK, it would be safe to say that Dart 2 is required at this point.firebase_functions_interop and other packages it depends on use the new build_runner system to compile with dart2js/dartdevc. build_runner is effectively replacing pub build and pub serve in Dart 2 (those commands were just removed from Dart 2 SDK) and explicitly states dependency on Dart 2 in its pubspec.yaml.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.