how to make a personal single page application with cozy

19
a personal single page application with cozy

Upload: gelnior

Post on 05-Jul-2015

1.305 views

Category:

Technology


2 download

DESCRIPTION

This is a small tutorial explaining how to develop your application for Cozy Cloud in a painless way. https://cozycloud.cc Talk performed @ LyonJS Meetup, April 2013

TRANSCRIPT

Page 1: How to make a Personal Single Page Application with Cozy

a personal single page application with cozy

Page 2: How to make a Personal Single Page Application with Cozy

Part I

under the hood

Page 3: How to make a Personal Single Page Application with Cozy

technos involved

Language:   coffeescriptFrontend:   backbone, stylus, brunchBackend:  compound, jugglingdb

Page 4: How to make a Personal Single Page Application with Cozy

prerequisite

Node.jsNpmVagrant 1.0.7Virtualbox

Page 5: How to make a Personal Single Page Application with Cozy

dev environment in a virtual machine

To set up a development you have to start the official Cozy Cloud virtual machine, a

Vagrant boxNB: Vagrant is a tool for developers to  simulate a production environment.

Page 6: How to make a Personal Single Page Application with Cozy

required modules (all in the vm)

CouchDb (Document Database)Whoosh Server (data indexer)Redis (Key Value Store)Cozy stack (controller, data-system, home, proxy)

Page 7: How to make a Personal Single Page Application with Cozy

cozy data system

Proxy for persistence and indexationManages app permissionsPublishes changes through Redis

Page 8: How to make a Personal Single Page Application with Cozy

cozy controller

Spawn and stop appsBased on Haibu augmented with: - App directory configurable- Brunch build after deployment- Light update (git pull + npm install)- Later: python support - Later: client only application support 

Page 9: How to make a Personal Single Page Application with Cozy

cozy home and proxy

Home is the UI for the ControllerProxy manages authentication and routing

Page 10: How to make a Personal Single Page Application with Cozy
Page 11: How to make a Personal Single Page Application with Cozy

Part II

tutorial

Page 12: How to make a Personal Single Page Application with Cozy

init dev environment

npm install cozy -g

cozy dev:init cozy dev:start

Page 13: How to make a Personal Single Page Application with Cozy

init your app

cozy new my-app --github me

Page 14: How to make a Personal Single Page Application with Cozy

answer questions

Create repo my-app for user me...Github password:Cozy Url:https://me.cozycloud.cc/

Creating the project structure...Cloning into 'my-app'...

Page 15: How to make a Personal Single Page Application with Cozy

Hack...

# first terminal: build clientcd my-app/clientbrunch w

# second terminal: run servercoffee server.coffee

Page 16: How to make a Personal Single Page Application with Cozy

then deploy!

cozy deploy

Page 17: How to make a Personal Single Page Application with Cozy

Need assistance?

We'll be glad to help: IRC: #cozycloud (freenode.net) 

https://[email protected]

Page 18: How to make a Personal Single Page Application with Cozy

Part III

demo

Page 19: How to make a Personal Single Page Application with Cozy

[email protected]://blog.cozycloud.cchttps://twitter.com/mycozycloud

Crédits photos Flickr: alexbrn, tdm911

License Creative Commons by-3.0

a talk by...