Our team had the experience of hacking on several projects together before setting out to build Close.io sales communication software, but when starting on this app we took some time to carefully choose our tech stack (and the startups & services) to build upon.
We needed a very fast user interface (our #1 goal was to create happy users), and a scalable backend (our customers sometimes commonly import 10k or 100k new sales leads as they start using the system). Here’s how we’ve built it…
At its technical core, Close.io is a web app wrapped in Native Mac/Windows applications in order to provide a desktop experience and high quality calling functionality.
The frontend is written in JavaScript using Backbone.js, and it interacts entirely with our public API built in Python using Flask, MongoDB, and ElasticSearch.

Probably the single best architectural decision we made early on is strictly enforcing that our internal app’s functionality will use the same public-facing RESTful API. This has a few benefits:
Close.io is a single-page Backbone.js app with a few notable goals:
The UI frontend (even for our desktop apps) is written in HTML5. We use Handlebar.js for client-side templating, precompiled for optimal performance in production.
The visual design is sometimes done in Photoshop first (we Dribbble a little), though often is done directly in code.
We write LESS as a CSS preprocessor (using mixins provided by Bootstrap and CSSMixins to keep the code clean). We use Bootstrap as a foundation though we try to keep our style from looking too Bootstrap-ey.
With Backbone.js we use RequireJS, Underscore.js, and jQuery.
We use two dozen little JS components (Backbone.js plugins, jQuery libraries, Bootstrap JavaScript, Date libraries, etc.). Grunt is used to run a series of compilation steps to prepare everything to be super fast in production.
Our JavaScript unit tests written in QUnit with Sinon.JS. They get run automatically via Grunt & PhantomJS on every code push (along with our Python tests) to make sure we haven’t accidentally broken anything.
We’ve also been able to contribute back to the JavaScript (especially Backbone.js) community, which has been awesome.
Stay tuned for another post about how our Backbone.js app is structured, in detail, and the things we’ve learned.
The core of our application is built around search. We’ve invented a “lead search language” that helps sales people instantly build a lead list fitting almost any possible criteria. For example a search of:
status:cold called:never email_opened < “3 days ago”
will instantly show the user “cold” leads that have never been called, but that opened your email within the last 3 days. You can save a query as a “Smart View” to get back to it in 1 click.
To build this we use ElasticSearch to power the search backend (and not only because of its name), and pyparsing to parse the query syntax.
We use MongoDB (hosted on MongoHQ) for its flexible schemas and quick performance. Mongoengine makes it nice to work with.
Our Python app is run by Gunicorn, gevent, and Supervisor. We chose Flask (even though we all had Django experience) because of its simplicity and light weight, and because with a client-heavy / API-only application built upon MongoDB, Django didn’t make as much sense.
We run Ubuntu on AWS. Multiple EC2 app servers run in different availability zones behind ELB.
We wrap up our web app into a desktop app for telephony. Rather than using a Flash-based phone client (which is known for poor call quality) or WebRTC (which has limited browser support and isn’t very mature yet), we’re doing native SIP calling through pjsip. GreenJ provides a bridge between the SIP functionality and JavaScript, so we can write all our client application logic and phone UI in JavaScript.
On the Mac we use XCode to create the project, and a standard Cocoa WebView to render the UI. Sparkle is used for auto-updates. On Windows we use Visual Studio to build a mostly-shared codebase, but use chromiumembedded (CEF) to render the UI.
—-
If you haven’t given Close.io a shot, check it out or send the link to someone you know who works in sales.
Tech stack sound interesting? We’re always looking for great designers & developers to join us.
Hit me up on Twitter with any questions/comments.
-by Phil Freo (@philfreo)