a Personal PaaS
Le cloud c'est bien mais...
nos donnéessont mal exploitées
plusdevie privée
Difficile d'y faire de nouvelles choses
Cozy est un espace pour vos web applications et vos données
+App
Collaboration
backup et synchronisationfaciles
un seul langageperformant
proxy
• Authentification• Routage• Ecrans de
login/enregistrements
# exemple
https://your-cozy.you.net/apps/notes
Reroute vers (dans la machine):=> http://localhost:9202
home
• Front-end pour la gestion des applications
• État des applications• Market place• Synchro proxy
data-system
• API Rest• Documents JSON• Indexes• fichiers• Droit d'accès• Publication/Souscription
pub/sub
Basé sur axon (zmq-like)Wrappé dans une lib maison:
realtime adapter
Transmission au browser via websocket
# ODM classiqueNote.create data, (err, note) -> console.log id
# Indexationnote.index ["title", "content"], callbackNote.search "dragons", (err, notes) ...→
# Fichiersnote.attachFile file.path, {name: file.name}, callbackfileStream = note.getFile name, callback
# EmailsCozyAdapter = require 'juggling-cozy-adapter'data = to: "[email protected]" from: "Cozy-test <[email protected]>" subject: "Test jugglingdb" content: "Content of mail"CozyAdapter.sendMail data, callback
# Pub/Subrealtime = RealtimeAdapter app, ['note.*']realtime.on 'note.update', (event, id) → # do something...
controller
• Démarrage / arrêt des apps• Installation / suppression• Mises à jour• Déploie aussi le proxy, la
home et le Data System• CLI: cozy-monitor
conditions
Un fichier server.js ou server.coffee à la racine
+Manifeste NodeJS (package.json)
+Paramètres Cozy (permissions, widgets)
{ "name": "KYou", "description": "With KYou, have a better knowledge of yourself.", "keywords": [ "quantifiedself" ], "licenses": [{ "type": "AGPL v3.0", "url": "http://www.gnu.org/licenses/agpl-3.0.html" }], "version": "0.1.3", "homepage": "http://frankrousseau.github.io/kyou", "author": "Frank <[email protected]>", "contributors": ["Frank <[email protected]>"], "engines": { "node": "*" }, "main": "server.js", "scripts": { "start": "node server.js" }, "dependencies": { "americano": "0.2.5", "americano-cozy": "0.1.2" }, "devDependencies": {}, "repository": { "type": "git", "url": "git://github.com/frankrousseau/kyou" }, "optionalDependencies": {}, "cozy-permissions": { "Mail": { "description": "Track the number of mails you receive each day." }, "Task": { "description": "Track the number of tasks you achieve each day." } }}
comment le controller déploie
Création d'un utilisateur Unix git clone
npm installIl enregistre les informations de l'application
Painless Web Developmentmanifesto
1. Use template2. Isolate your environments3. Deploy fast4. Make front-end dev easy
$ npm install cozy -g$ npm install brunch -g
1. Use template
2. Isolate your environements
$ cozy new yourapp
$ cozy dev:init && cozy dev:start
3. Deploy fast
4. Make front-end dev easy
$ cozy deploy
$ cd client && brunch w
write your app for cozyhttp://cozy.io/hack
Crédits photos : blaster_e11 Licences Creative Commons