Your privacy matters

How many accounts you have out there on the Internet? Probably the very first things that come to your mind is Facebook, Twitter, LinkedIn etc. I bet that you also have many accounts being forgotten long time ago, legacy of forums era. That’s heck of information about you, and if you’re reading this, probably you’re kind of person that’s concerned about it.

Of course there are privacy settings in almost every account editor. But they are usually of type “all or nothing” or quite complicated to realize what’s going on with them without proper knowledge about portal. In Greenius we realized that it could be simplified.

Many components of your account depend on others. E.g. Information about sports you like is part of your interests in general. So what point is it to set privacy for sports if you blocked access to your interests?

In Greenius we give users the opportunity to adjust privacy settings to everything related to their account. Just on user’s home only there are many settings that one could possibly want to adjust:

          1 – Cover photo
          2 – Profile picture
          3 – Location
          4 – Bio
          5 – Plot
          6 – Section containing products one grows
          7 – Section containing users one follows
          8 – Section containing users that follow one
          9 – Section containing shop products and posts that one likes
          10 – Posts written by one


Of course to allow user to adjust those settings we could simply create a list of questions like:

        - Who can see your bio?
        - Who can see your plot?
        – Who can see your ‘growing’ section?

And so on… But we find it highly inelegant and wanted to create visually appealing and clear solution for that. We came up with an idea to leverage those dependencies I mentioned before and display those settings in a tree diagram.

Every node of the tree, being single privacy setting, can be set to four level of tolerance:


global-tile global; everyone will be able to see this

id-tile logged in users only

followees-tile only users being followed by owner

private-tile private; only owner will see this

Also, we said that some settings have no point under some circumstances. In my opinion, tree layout gives better understanding of this, as then it’s quite simple – children node cannot be of bigger tolerance than it’s parent.



This also allows us to conveniently set preferences for user. If one decides to change privacy of his map marker position to global, then according to image above, location setting needs to be global as well. But he is not obliged to do it manually. We do it recursively for every parent as long, as any change is needed.

To implement that we decided to tackle D3. We already had some experience with it by doing data visualization for our recommender system. Main factor for this decision was ease of creating tree layout, and D3 allows that with almost no effort. Besides, it’s always great to learn new tools!

Greenius ClojureScript integration and roadmap

There are three basic ingredients to take care of our brains: exercise (walking is enough), social contact (we are humans by the relationship with others) and intellectual exercise, to do something challenging, different. Certainly the adoption of the Clojure stack forces us to stay sharp – simplicity demands to think.

ClojureScript integration in plot editing tool

As you already know, our back-end code is entirely built with Clojure and Datomic and now, thanks to Jonas Enlund, we have our first ClojureScript + OM component. Since last week Greenius users have an improved Plot edition tool, with new features like undo/redo, zoom and -coming very soon- multi-plot option.

Jonas has used the Flux pattern to build the architecture and these libraries:

:client {:dependencies [[org.clojure/clojurescript "0.0-2498"]
[org.clojure/core.async "0.1.346.0-17112a-alpha"]
[org.clojure/tools.reader "0.8.13"]
[ "0.8.0"]
[prismatic/om-tools "0.3.10"]
[cljs-ajax "0.3.3"]]



The new plot has been smoothly embbeded in our Enyo based UI via iframe in an Enyo component.


The result is a powerful grid edition tool for our users, and for us, the foundation for the next Clojurescript based component in our Roadmap: an integration with plant sensor Koubachi where we will display real-time visualization of data in charts/graphs.



Greenius Roadmap

We are currently working on designing and developing some very exciting new features for Greenius:

Plot edition

Just released in the beginning of February, it’s a huge improvement on the plot editing functionality. This new development opens the door for the multi-plot feature in the future.


We will add a curated shop to the platform, with selected products from independent retailers. We hope to publish it by the end of February 2015.


Our first sensor integration! We will make it possible to connect your Koubachi plant sensor to our platform offering real-time and historic data visualization as well as customized plant-care suggestions.

Follow topics and interests

This feature will enable users to follow gardening and green lifestyle topics of their interests, complementing the capability of following other gardeners and specific plants.




Lots of exciting work ahead to build a useful and meaningful platform that will contribute to create a greener future and in the way, help us keep a healthy and sharpened brain with the Clojure stack!


GIS for gardening: building maps for Greenius

I don’t know about you, but we in Greenius love a good old map: informative and aesthetically appealing, what’s not to like?


This post will recount the process we have followed to add a multi-layered map with the location of the gardeners in Greenius:

Greenius Climate Map


This map is made up of a base layer, a climate layer and the location of the Greenius growers. When clicking on a marker, a pop up is displayed with the username and profile picture linked to the user home of the Greenius grower.


Greenius Map Marker


This way, you can find other gardeners in your area (or across the globe) to get connected to.

Read More

Greenius: Our tech roots.

One of the most fascinating things one can do in life is to build things: friendships, a family, a backyard garden, a company or a software. This post explains how we came up with the software we have built with our hands and tools in Greenius.


A year back when we came up with the Greenius idea Iván showed me the potential of the Clojure stack. First, I was overwhelmed due to my heavy investment in OO approach and technologies during my career. Secondly, suspicious about a LISP dialect which I thought was not pragmatic enough for our startup; and finally, I felt somewhat sluggish about learning a completely new functional language. Iván, with sensible patience as always, kept sending me information about Rich Hickey’s creature and after a few days I was hooked. We decided to join the Clojure gang.


In this post I will layout the basic architecture, the ingredients we have used and the main reasons I am glad we chose these tools.


Greenius consists of three main technologies: on the client side a JS framework called Enyo that produces HTML5 code behind the scenes and, on the server side, the Clojure stack: Clojure language and the Datomic database. The following diagram shows the different components of Greenius’ technology stack:


Greenius technology stack

Enyo helps us create a rich client -interactive- web application and we have mixed it with Pure CSS to easily design responsive layouts (this mix has caused cross-platform compatibility problems in some mobile devices that we are investigating as we speak).


HTML5 apps have considerably improved performance lately and Enyo allows us to write a single app for all devices and -modern- browsers. For Greenius we wanted a simple and clean design so we have used LESS to build the theme for the UI.


Maybe you are thinking why after my passionate words about Clojure we haven’t chosen ClojureScript to build the front-end. The quick answer is that we think that we will eventually migrate to it, but our own timing plus Enyo’s compelling value proposition (open source, cross-platform, extensible, fast, lightweight,…) made us take this decision.


Greenius’ true power resides on the server. Iván, after several days figuring out the Datomic API, designed a software (influenced in large part by Amit Rathore’s design) with just immutable data structures and pure functions (with much less code than traditional OO languages) allowing us to focus on our core business requirements rather than inherent technological problems. Simple but not simpler.


We are at the moment using the Free version of Datomic as we have just launched (no problems so far!), but we plan to upgrade to Datomic Pro Starter as soon as it is necessary.


API, Service, Domain, etc. are namespaces that contain small functions that do one thing and always return the same answer given the same arguments, so no debugging is needed (phew! – we can’t anyway). Functions are run and tested on the REPL (our IDE is Eclipse + counterclockwise. That’s right, we’re not using Emacs).


Finally, communication between client and server is an exchange of these data structures using JSON format. In Enyo we submit web requests with Ajax and in Clojure we use Ring for request and response plumbing and Compojure for routing.


Greenius is a work in progress and as anything worthwhile, will remain so. We continue to improve it but, unlike most of the software that I have developed and maintained in the past, Greenius continues and will continue to be manageable thanks to Clojure. This will consolidate and guarantee Greenius’ evolution and scalability. Not bad considering that we are using functions that just perform data manipulation.


If this stack has caught your imagination and want to know more here are some links to feed your brain:








Pure CSS