Giter Site home page Giter Site logo

lessthan3 / dobi Goto Github PK

View Code? Open in Web Editor NEW
9.0 9.0 5.0 2.21 MB

Dobi.io, an easy-to-use, database-everywhere, fully hosted, scalable, data-on-the-wire, pure-CoffeeScript web framework designed with realtime apps in mind. http://www.dobi.io

License: Apache License 2.0

JavaScript 97.43% CoffeeScript 2.44% Shell 0.13%

dobi's Introduction

Dobi will be available for use in the near future. If you'd like to play around before then, contact us at [email protected].

Dobi.io

Dobi is an ultra-simple environment for building scalable, real-time web applications.

With Dobi you write apps...

  • in Coffee-Script (or javascript, but please don't)
  • with client-side rendering (only send data over the wire)
  • with real-time functionality by simply referencing variables
  • build schemas with simple json objects (no more complicated ORMs)
  • that scale to 100k+ users without hosting your own servers
  • on Linux, Mac, or Windows
  • in any editing environment you prefer

Documentation is available at http://www.dobi.io

Quick Start

Prerequisites:

Install Dobi:

npm install -g dobi

Setup a dobi workspace

cd ~ ; mkdir workspace ; cd workspace
dobi init

Login:

dobi login

Create a new app:

dobi create [email protected]

Create a website using your app:

dobi install [email protected] site-slug

Deploy it to the world:

dobi deploy my-app

View your site, running your new app:

dobi open site-slug

Examples

dobi's People

Contributors

ebaker avatar eso001 avatar jasongornall avatar joshsprague avatar scien avatar sjanderson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

dobi's Issues

Better error message for if you already have another server running

events.js:71
throw arguments[1]; // Unhandled 'error' event
^
Error: listen EADDRINUSE
at errnoException (net.js:770:11)
at Server._listen2 (net.js:910:14)
at listen (net.js:937:10)
at Server.listen (net.js:986:5)
at Function.app.listen (/usr/local/lib/node_modules/lessthan3/node_modules/express/lib/application.js:534:24)
at runDevServer (/usr/local/lib/node_modules/lessthan3/bin/lt3.coffee:101:9)
at main (/usr/local/lib/node_modules/lessthan3/bin/lt3.coffee:146:16)
at Object. (/usr/local/lib/node_modules/lessthan3/bin/lt3.coffee:154:3)
at Object. (/usr/local/lib/node_modules/lessthan3/bin/lt3.coffee:156:4)
at Module._compile (module.js:449:26)
at Object.exports.run (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/coffee-script.js:83:25)
at compileScript (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/command.js:177:29)
at fs.stat.notSources.(anonymous function) (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/command.js:152:18)
at fs.readFile

use asset-wrap's new pre-processing to simplify .exports

right now styles needs .app.exports .page.tour instead of just .exports

right now classes need class exports.Page extends lt3.Page instead of just class exports.Page

as always, need to make sure to remain backwards compatible, so previous format should still work as expected

Pair Programming: Design Discussion

Currently, the LT3 development kit can update your browser view when code is updated. This is great for when a developer is working on issues alone, but it'd be great to allow developers to pair program remotely.

This ticket is meant to be a discussion on how to implement this feature. It would involved using firebase in a similar way to sync code between two consenting users.

Topics for discussion include

how the two users connect to each other behind the scenes
how to store the data in firebase
what the UI should look like for connecting
what does the full process look like? if one developer makes a change, does it just update the UI of the other programmer, or does it also update the other programmer's source code?
could we make a model work where n number of users could connect together? what makes sense?

dfs (fobi fs)

dobifs /dobi
cd /dobi
ls
/db
  /media
    /:_id
  /objects
    /:_id
  /sites
    /:_id
  /site_users
    /:_id
  /users
    /:_id
/home
    /:site-slug
      /.config (link to /sites/:id)
      /page-slug.json (link to /objects/:id)
      /artists/artist-slug.json (link to /objects/:id)

cloning a site

cd /dobi/home
cp -r ultra-miami ultra-miami2

copying a page

cd /dobi/home/ultra-miami
cp tickets.json ticket2.json

deleting a page

cd /dobi/home/ultra-miami
rm tickets2.json

new page

cd /dobi/home/ultra-miami
vim my-new-page.json

@jasongornall - comment with any other ideas

Strange caching issues present when doing sets

example call:
db.sites.find({_id:"532b9cea5bf249e601fe5aa8"})[0].get("created").set("w") works

result:
creates is not update... wait some amount of time and see it updated. maybe a caching issue?

expected:
cache is broken and results are updated

make an lt3 shell

would be useful to be able to run database commands quickly from the console

cache bust not working correctly

getting some duplicate key errors, which means cache bust on query isn't working as expected

[dobi] deploying [email protected]
[dobi] loading files
[dobi] authenticating user
[dobi] connect to database
[dobi] connected
[dobi] loading package config
[dobi] creating new package
[dobi] package created
[dobi] checking for previous conflicting versions
[dobi] package [email protected] deployed
[dobi] deploying [email protected]
[dobi] loading files
[dobi] authenticating user
[dobi] connect to database
[dobi] connected
[dobi] loading package config
[dobi] creating new package
[dobi] MongoError: E11000 duplicate key error index: lessthan3.packages_config.$id_1  dup key: { : "backbone" }

super deploy: error on chosen

[dobi] deploying [email protected]
[dobi] loading files
[dobi] authenticating user
[dobi] connect to database
[dobi] connected
[dobi] loading package config
[dobi] creating new package
[dobi] package created
[dobi] checking for previous conflicting versions

Error: Firebase.set failed: First argument contains a function in property 'collection.database.firebase.n.u.e' with contents: function (){Ub(a,arguments)}
    at Error (<anonymous>)
    at Ba (/usr/local/lib/node_modules/dobi/node_modules/firebase/lib/firebase-node.js:9:107)
    at Ba (/usr/local/lib/node_modules/dobi/node_modules/firebase/lib/firebase-node.js:10:207)
    at Ba (/usr/local/lib/node_modules/dobi/node_modules/firebase/lib/firebase-node.js:10:207)
    at Ba (/usr/local/lib/node_modules/dobi/node_modules/firebase/lib/firebase-node.js:10:207)
    at Ba (/usr/local/lib/node_modules/dobi/node_modules/firebase/lib/firebase-node.js:10:207)
    at Ba (/usr/local/lib/node_modules/dobi/node_modules/firebase/lib/firebase-node.js:10:207)
    at Ba (/usr/local/lib/node_modules/dobi/node_modules/firebase/lib/firebase-node.js:10:207)
    at Aa (/usr/local/lib/node_modules/dobi/node_modules/firebase/lib/firebase-node.js:8:462)
    at H.J.set (/usr/local/lib/node_modules/dobi/node_modules/firebase/lib/firebase-node.js:146:98)
    at Object.next (/usr/local/lib/node_modules/dobi/node_modules/mongofb/lib/client.coffee:333:20)
    at Request._callback (/usr/local/lib/node_modules/dobi/node_modules/mongofb/lib/client.coffee:74:21)
    at Request.self.callback (/usr/local/lib/node_modules/dobi/node_modules/mongofb/node_modules/request/request.js:122:22)
    at Request.EventEmitter.emit (events.js:98:17)
    at Request.<anonymous> (/usr/local/lib/node_modules/dobi/node_modules/mongofb/node_modules/request/request.js:888:14)
    at Request.EventEmitter.emit (events.js:117:20)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/dobi/node_modules/mongofb/node_modules/request/request.js:839:12)
    at IncomingMessage.EventEmitter.emit (events.js:117:20)
    at _stream_readable.js:920:16
    at process._tickCallback (node.js:415:13)

Dobi: whoami and login not working

/usr/local/lib/node_modules/dobi/lib/cli.coffee:865
          exit(JSON.stringify(user, null, 2));
                              ^
ReferenceError: user is not defined
  at /usr/local/lib/node_modules/dobi/lib/cli.coffee:698:27
  at /usr/local/lib/node_modules/dobi/lib/cli.coffee:107:7
  at /usr/local/lib/node_modules/dobi/lib/cli.coffee:132:9
  at fs.js:266:14
  at Object.oncomplete (fs.js:107:15)

dobi 2.0.0

get rid of workspace model and take a more npm-esque approach

  • dobi init will be used to create a new package anywhere you want.
  • dobi install will pull in external dependencies into local dobi_packages directory

todo before this can happen

  • add ?version= parameter to override the live version of a site
  • get production to load packages from database instead of disk
  • dev compiler will need to be able to compile local files, and then load dependencies from dobi_packages instead of assuming everything is in a workspace "pkg" directory

Add package types to lpm init

Allow user to specify "theme", "app", or "library" when initializing a new package and set up new package files and config accordingly.

add /packages section to the site

should query packages_config collection

> db.packages_config.findOne({}, {'files.data': 0})
{
    "_id" : ObjectId("537fe79323fcbdcbdb452cfb"),
    "author" : {
        "contact" : "[email protected]",
        "name" : "Bryant Williams"
    },
    "category" : "default",
    "description" : "This application is for ultra contract management",
    "developers" : {
        "facebook-428968" : "admin"
    },
    "files" : [
        {
            "ext" : "md",
            "md5" : "5f10ddd49e46ec344aed20db6c4d6904",
            "name" : "CHANGELOG.md",
            "path" : "CHANGELOG.md",
            "size" : 49
        },
        {
            "ext" : "coffee",
            "md5" : "414ce3d32f0ece0359ac3a5e8c7514d3",
            "name" : "app.coffee",
            "path" : "app.coffee",
            "size" : 106
        },
        {
            "ext" : "cson",
            "md5" : "3879c9ff8422c02aa30369ade292ef22",
            "name" : "config.cson",
            "path" : "config.cson",
            "size" : 371
        },
        {
            "ext" : "js",
            "md5" : "a8d99af47823d231109163a2f10186b9",
            "name" : "filer.js",
            "path" : "deps/filer.js",
            "size" : 27914
        },
        {
            "ext" : "coffee",
            "md5" : "2ef7d2119bbba05f028bf0438839393d",
            "name" : "index.coffee",
            "path" : "pages/index.coffee",
            "size" : 4851
        },
        {
            "ext" : "styl",
            "md5" : "0f931236b4e0f2f9d97e183e770dbe82",
            "name" : "style.styl",
            "path" : "style.styl",
            "size" : 1431
        }
    ],
    "id" : "ultra-contracts",
    "md5" : "60e0c129e22aaf35a162964a49c625ca",
    "name" : "Ultra Contacts",
    "pages" : {
        "index" : {
            "name" : {
                "hidden" : "true",
                "type" : "string"
            }
        }
    },
    "private" : false,
    "public" : false,
    "type" : "app",
    "version" : "0.1.0",
    "last_modified" : 1400891283539
}

#48

OSX: preventing crashes on local development

"lt3 dev" server sometimes crashes on OSX with node 0.8.x on an Abort 6 error. Updating to 0.10.x may prevent some of that as there have been updates to watch for errors like this in some core libraries. The main issue is that the server should restart in the case of a crash like this.

Let's research/discuss the best way to handle this.

one option is to use the built-in cluster to listen for failure and spawn a new process. I haven't tested cluster out on windows, so not sure if we'd run into issues there.

Another point of discussion would be how to re-auth the user after a crash. Right now authentication happens when connecting in the browser, maybe we should consider using the local auth token stored in .lt3_config on server startup.

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.