Tooploox Hackathon: Timeploox, Slack bot for time tracking
At Tooploox, we work with our partners on a time and material basis, as this model allows us to fully embrace agile development methodologies. Over the years we experimented with various Open Source and commercial tools designed to ease the burden and overall overhead associated with logging time, visualizing progress and generating reports. Unfortunately not even the current service we settled on (Freshbooks) satisfies all of our requirements like being easily accessible, having speedy workflow and generally being fun to use.
Before the hackathon started, we had quite a few ideas how to solve this pain for the whole Tooploox team. In the end we settled on one particular concept that fits nicely into our daily routines — a fully-fledged (that’s the goal) time tracking and reporting bot for Slack, our main communication tool. Over the course of the few hours we had for development, the bot “learned” how to interpret and respond in a rich way to simple commands issued from any Slack channel.
For instance, to log time, you can issue
and, in response, you get a short summary of time logged:
It is possible to view and delete entries at any given point in time via
/log view command:
which results in:
Our team also managed to build a companion iOS app meant, at least in the scope of the hackathon, for viewing reports of time logged by various Slack users:
Technology-wise, we decided to use tools and platforms that allow for fast development and deployment of each iteration of the prototype. On the back-end we went for Node.js (ES6, Express.js, Mongoose), Heroku, MongoDB (via add-on) and Slack API, while the mobile app was written in Swift using storyboards (for fast UI prototyping) and few open source frameworks, like Alamofire and Charts.
Building the API for the iOS app and the bot itself was generally pretty straightforward and fun, albeit bumpy at times. We ran into issues with MongoDB add-on and had to deal with some weird message format choices on the Slack part, like JSON content encoded as raw string within parent JSON structure.
Since hackathon was only two days long, we had to choose only the most important features for our iOS companion app. We came to conclusion that the main purpose of using this app would be to check our or our colleagues entries. So, with help of guys from product design team, we prepared designs for summary view and then we got down to work. You can see the results on the screenshot above. The view is rather simple, the most difficult thing, the calendar view, we got for free — we used great FSCalendar control.
Last but not least, the team. We got lucky and managed to form a squad consisting of product designers, full-stack & iOS engineers. This meant we had more than enough raw horse power to tackle the pain we wanted to solve in a reasonable time.
The bot, as it is now, is a good foundation for something bigger and hopefully will be taken to the next level relatively soon. All in all, hacking the project together and working out various quirks was a lot of fun!
Written by Krzysztof Tarnowski and Karol Wieczorek.
Originally published at Tooploox.