Skip to content

majodev/5perpix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

5perpix

5perpix is a prototype I made to demonstrate, that it's possible to build a data-driven collaborative drawing webapp purely in js. It's powered by the giant meteor.js and some d3.js magic.

The application is currently live at 5perpix.majodev.meteor.com.

Features

* Drawing: Both a SVG and a Canvas representation of a picture consisting of many rectangles ("big pixels") are rendered. Please take a look at the wonderful d3.js. All successful changes to the color of a "big pixel" are pushed to subscribed clients immediately. This is the basis for collaborative drawing. * Chatting: You can add messages to any picture. Inserts are immediately pushed to subscribed clients. Internally, messages are linked to a referencecollection, that links to other objects (this example currently links messages over a messagereference to pictures only.) * User-authentication: You have to be signed in to make ANY changes (submitting messages or updating pixels is else denied). Please hop to the meteor docs for an overview of the smart packages accounts-ui and accounts-password.

Structure

I tried to structure the whole project according to the unofficial meteor FAQ. My background is in ActionScript3 and Java, so you might encounter some uncommon patterns (in the javascript world). Please, let me know if you find anything that doesn't make sense or is considered a bad practise!

Installation

* Install node.js, meteor and meteorite (mrt). * Clone 5perpix, cd into it and use mrt to run this application (will also automatically resolve any dependencies).
git clone https://github.com/majodev/5perpix.git 5perpix
cd 5perpix
mrt

5perpix uses custom publish and subscribe rules. Hence, make sure to remove the autopublish meteor smart package!

mrt remove autopublish

The app uses Methor.methods to define allowed client interactions. These methods are declared in lib/methods.js. All direct transactions from the client to the database (inserting, updating and removing) should be denied. To enforce this behaviour, make sure to remove the smart package insecure!

mrt remove insecure

Copyright

MIT license - see LICENSE.md for further information - (c) 2013 Mario Ranftl (majodev).

About

5perpix is a meteor.js prototype to demonstrate drawing SVGs with d3.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published