Tempo, a mood tracking/diary app 

These days, I've been working on a lightweight mood tracking and diary app.

I've used some of them, like Daylio in the past, however I wasn't entirely satisfied, mainly because I wanted something that worked accross multiple devices (incl. desktop), and could handle larger amounts of texts.

Tempo is my second attempt at building something for myself, with a significantly different approach as last time.

Tempo, a mood tracking/diary app 

The third-party apps I tried are usually more mood-tracking oriented, which is something I have a hard time to do.

Most of the time, I'm not sure how I feel, and the process of writing it makes it clearer for me.

So with Tempo, I decided the diary would power the mood-tracker, by extracting information from the diary entries.


Tempo, a mood tracking/diary app 

It's done by using moodtags (like hashtags, but for mood). By prefixing words with +, -, ~ or ? you can indicate if something feels good, bad, mixed or if you don't know how it feels.

When present, + and - tags are used to compute a score for each diary entry, and the sum of each entry score powers the daily mood widget, letting you see how each day went.

· · Web · 2 · 1 · 4

Tempo, a mood tracking/diary app 

Since moodtags are like hashtags, you can click on them to filter all corresponding entries.

E.g find all negative or positive entries associated to sleep.

From my perspective, it's way easier than thinking in term of arbitrary categories, and it's really easy because it doesn't disrupt the writing process.

You can just write, and add the mood prefixes on words as you do, or take a few seconds before saving your entry to do so.

Tempo, a mood tracking/diary app 

That's pretty much for the core features. There are a couple more smaller features though:

- Entries text is formatted using markdown, so you can include links or lists in it for instance.
- Since this is a personal diary, it supports theming to let you feel more at home
- Entries can be exported in Markdown and JSON format
- Optional bidirectional syncing with other devices

Now, I'm going to focus a bit more on the tech side.

Tempo, a mood tracking/diary app 

The app itself is built as a progressive web app (), so that it works in any browser, and still work when in offline mode.

It's written in , which is my javascript framework of choice for web apps.

I've been a bit more creative with data, as I used , for the first time, to store diary entries.

Internally, PouchDB used the browser IndexedDB, which can handle significantly large amounts of data.

Tempo, a mood tracking/diary app 

As a result, Tempo is also private by design! Data never leaves your browser, and everything happens client side.

The only exception to that is syncing. This feature relies on the replication feature of PouchDB that works by sending/pulling data to/from a third-party CouchDB server.

However, I don't provide an hosted CouchDB server, and you can use your own, so that your data stays in your control if you wish to use syncing.

Tempo, a mood tracking/diary app 

To be honest, I'm really impressed by PouchDB / CouchDB replication. It's been extremely reliable and easy to integrate in the project.

Basically, PouchDB handles *everything*, and I didn't have to write any low-level sync related code in the app.

If I have network, it will sync. If not, it will retry later. Conflicts are handled gracefully.

Sync performance is really good as well. Editing a theme and see it replicated instantly on two other devices is impressive!

Tempo, a mood tracking/diary app, conclusion 

That's pretty much it, a couple of links if you want to learn more or try it:

- Web app: mood.eliotberriot.com/
- Source code: code.eliotberriot.com/eliotber
- PouchDB website : pouchdb.com/guides/

I hope I wasn't too annoying with my thread

Tempo, a mood tracking/diary app 

I also feel there is a potential business model here, like offering the app for free, as it's already, and a paid, managed sync server for a bunch of $ a year (while keeping the possibility to use a self hosted one, obviously).

Not sure if I want to work on that, though.

Tempo, a mood tracking/diary app, conclusion 

@agateblue c'est compliqué à mettre en place un serveur de sync ?

qu'est-ce qu'il se passe si mon navigateur purge les données ? c'est supprimé du serveur aussi ou c'est juste répliqué à nouveau à la prochaine sync ?

Tempo, a mood tracking/diary app, conclusion 

@agateblue déso si je t'embête avec toutes mes questions ;;;

Tempo, a mood tracking/diary app, conclusion 

@amaranthe pas du tout, au contraire !

Tempo, a mood tracking/diary app, conclusion 

@amaranthe c'est pas extrèmement compliqué je trouve, j'ai un exemple avec Docker ici : code.eliotberriot.com/eliotber

(je peux te faire une place sur le mien though si tu veux, vu qu'on se connait)

Les navs peuvent potentiellement supprimer les données si ton espace disque est bas, mais c'est le seul cas à ma connaissance. Si tu as la synchro configurée, ça supprime que ce qui est local, la synchro remettra tout ce qui est sur le serveur CouchDB.

Tempo, a mood tracking/diary app 

@agateblue du coup si je met des tags - et + ça fait une moyenne c'est ça ?

Tempo, a mood tracking/diary app 

@amaranthe en gros, si tu as deux + et trois -, ça te fera un score de -1 sur l'entrée (+2 - 3 = -1)

C'est pas une moyenne a proprement parler, juste une addition / soustraction, mais tu as compris l'idée je pense.

Tempo, a mood tracking/diary app 

@agateblue oui je vois, comme mon humeur est absolument pas stable ça m'aiderais à y voir plus clair je pense

Tempo, a mood tracking/diary app 

@amaranthe j'aimerai bien trouver à un moyen de mettre en lumière ce genre d'instabilité, parce que c'est un problème que j'ai parfois.

Peut-être un widget dédié qui au lieu d'aditionner les scores additionne les écarts, par exemple 🤔

Tempo, a mood tracking/diary app 

@agateblue a ça serait pas mal oui
Sign in to participate in the conversation
Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!