Sparta - The private way to keep track of exercises

By Jacob Alzén

Elevator Pitch

Sports and activities are a necessity for a healthy lifestyle, but keeping track of it need to happen at the expense of privacy? No, with Sparta you get an entirely encrypted logbook for keeping track of exercises, comparing lap times, saving gym workouts among with many other possibilities.

Description

Tiered of saving your sport activities and exercises online outside of your control? Sparta is the all new private and encrypted way to save and keep track of sport activities or exercises. Written in Go and using the Fyne toolkit while leveraging AES-256 encryption and Argon2 key derivation, it is a modern and secure alternative to other solutions out there. The goal of this talk is to show of how Fyne played a part in creating the application, how it came to be, how it has progressed, where we are now and last but not least, what the future holds for it.

Notes

Transcript:

Hello everyone! Firstly, I want to thank the Fyne team for their great work on this amazing toolkit, but also for letting me showcase the application that I have been building with it. My name is Jacob Alzén and I am a Swedish student, Go programmer, privacy advocate and runner. I got into privacy and open source software a couple years ago and got started contributing documentation to various projects. A bit later down the line I started using Linux and then I went down the rabbit hole of programming about one and a half years back. It was around one year ago that I started Go programming and now I am here to talk to you about my Sparta program and how Fyne has played a role in developing it. I have lots of exciting stuff to share with you, so let us jump right in. I want that exercising being fun way to keep healthy. To keep myself going, I want the competitive aspect of trying to improve my time and speed. I mean, it is a bit hard to not take any time and hope that it was faster, In order to be able to do that, I need a way of keeping track of my exercises, but at the same time, I would not want to share every little piece of my exercises with the rest of the world. Every solution for giving me the option of saving activities seems to be proprietary with long privacy policies that no one can bother to read through. That is where Sparta comes in, as a Fyne project that I have been developing since latest December last year. Let us start from the beginning with how Sparta came to be and what it is. It all began when my school us to log activities and exercises for them to keep track of how we were using the gym card. I was a bit reluctant to the idea and the site that we were using, but I liked the ability of trying to improve my times in the swimming pool. The site that we were using was called “funbeat” and it was an old piece of software that looked like it didn’t take privacy or GDPR very seriously (the service is closed down and unavailable now). I complained a bit about it and one of my mates said to me that I should stop complaining and make something better instead. So that was exactly what I started doing and how Sparta came to light. Now you must be wondering why it is called Sparta, right? I was reading about ancient Roman society at the time and Sparta sounded like a good application name. I decided at the time that it also would stand for “Sport and rehearsal tracking application”. As someone that, at the time, had a little bit less than a year of programming experience, Fyne was a great choice for starting my application development. I wanted it to be a native application with locally encrypted and saved data to keep internet and tracking away as much as possible. I think that Fyne is easy to use and it meant that I could do rapid prototype development without much effort. The first versions were basic, without a backend for saving data, it was all just in memory. Within days I had a very basic proof-of-concept showing roughly what I had imagined Sparta to be. Without all the fancy encryption and privacy protective measures of course, but it was a start that I was proud of. [Show the very early version of Sparta] Next up came the addition of AES-256 encryption (generally touted as military standard in encryption in the industry), a login screen and filesystem access to save and load data between closing the application. This was by far the hardest part in the development up until this point. The implementation of login and encryption was just a simple proof-of-concept and needed a large rework down the line. The next big step in the application development was to move over to a more user-friendly interface. Data needed to be arranged in a way that could make it look better and at the same time be more understandable by the user. I decided on using tabs with icons for clarification. This was easy to do with all the material design icons that are present in Fyne’s theme package. [Show the initial tabbed implementation] A bit later down the line, I realized that it needed a way of sharing exercises between devices on the same network in order to make it possible to for example write down the activity on the phone and then synchronize it to the computer later. After some investigation into possible solutions I decided to go with end-to-end encrypted sharing over a local network using the Go implementation of “wormhole”, called “wormhole-william”. [Show the synchronization support] For it to share, you will need to be on the same network and then press share on one device. On the other end, just type in the code that you receive and then press receive. This will synchronize data from the sender to the receiver and sort it all in the correct order. It works one way so the receiver will receive activities, not the other way around. Later, I worked on getting the user interface tidied up with a new login screen. I designed a specific layout to fit specific needs that I had. I wanted the login screen to be small and cantered while growing horizontally with window size, but not vertically. Thanks to the built-in support for mobile development in Fyne, I tried to make it look good on a small screen as well, but I ran into some problems. The layout that I had created to look good on desktop did not fit at all on mobile. Then it occurred to me that I could simply check if the application were running in mobile mode and use a different layout in that case. The result was the following: [show both mobile and desktop versions] Now the login page can look good on any platform regardless of screen size. It really is wonderful being able to write the app once and run it on every platform. I am glad that choose Fyne and nothing else, while starting this project. Quite recently I began to get the backend code in good shape. As the application I am using encryption, I needed a way of handling it securely to ensure that user data will not be easily compromised by hackers or malware. After a total backend rewrite, it is now using a more cryptographically secure method with encryption keys that change after logout from the application and more thoroughly follows advice from cryptographers. However, please do take in mind that I am not a cryptographer and the application has not been reviewed by any security researchers yet. This is where we are at now. Thanks to the huge 1.3.0 release of Fyne, I can finally use text wrapping for making text look better on even more screen sizes. Before it would not let me shrink the interface as much as it would get stuck on the text, but now it works great. [Show the latest version and demo text wrapping] Sparta may be taking shape now, but there are more to look out for on the horizon. It will quite soon be released open source under the GNU General Public License v3 (GPLv3) and available on GitHub under my profile. Anyone will be able to look at the code, file bugs, feature request or contribute. There are a couple features and improvements that I wish to have implemented in a not too distant future. The data should be shown using a custom widget for displaying it in a fancier way, statistics like pie charts along with other features. I might also look at adding gps and time recording for adding activities that way using the mobile phone. Here is an old proof of concept showcasing what I have in mind for the statistics: [Show test version of statistics] I hope that you all are as excited as I am about Sparta and please feel free to ask any question if you want.