Home

Awesome

FxLifeSheet

Twitter: @KrauseFx


See the outcome on howisFelix.today

<img src="https://raw.githubusercontent.com/KrauseFx/howisFelix.today/master/screenshots/Desktop-1.png" /> <h3 align=center>See the resulting work on <a href="https://howisFelix.today/">howisFelix.today</a> <p /> <table> <tr> <td> <img src="https://raw.githubusercontent.com/KrauseFx/howisFelix.today/master/screenshots/iPhone-1.png" /> </td> <td> <img src="https://raw.githubusercontent.com/KrauseFx/howisFelix.today/master/screenshots/iPhone-2.png" /> </td> <td> <img src="https://raw.githubusercontent.com/KrauseFx/howisFelix.today/master/screenshots/iPhone-3.png" /> </td> </tr> </table>
<img src="https://raw.githubusercontent.com/KrauseFx/howisFelix.today/master/screenshots/Overview-Portrait-1.png" />

Goals

To answer questions about my life, like

Key decisions for this project:


This repo contains


Questions to answer

There are many questions that can be answered using this data, here are some main ones I want to look into over the next few months

Mood/Happines related:

Fitness related

Travel

Productivity

Implementation

Assumptions

This repo contains the Telegram bot that is responsible for collecting the data.

There are 2 ways to input data: by the user telling the bot to ask for all the values, and by a regular interval of the bot asking you (similar to the deprecated mood bot)

Configuration

lifesheet.json

Available values for schedule:

User initiates data inputs

Mood

Using fourTimesADay, this will replace the mood bot

Morning

/awake

This will trigger the morning questions, like:

Evening

/asleep

This will trigger the end-of-day questions like

Week

/week

This will trigger questions that take longer to reply, so they're only done weekly

Telegram

Insert for available commands

skip - Skip a question that was asked
report - Generate one page report
track - Track a specific value only
mood - Track your mood
awake - First thing in the morning
asleep - Right before going to sleep
week - Once per week metrics
skip_all - Remove all queued questions

Development

Running locally

npm run dev

Debugging

After using npm run dev, open chrome://inspect to use the Chrome Dev Tools

Setup

Environment variables

.keys file or however you manage your secret env variables:

export TELEGRAM_BOT_TOKEN=""
export TELEGRAM_USER_ID=""
export TELEGRAM_CHAT_ID=""

export DATABASE_URL=""

export LIFESHEET_JSON_URL=""

Scheduler

Not using Heroku any more, in railway.app, just add this as its own service

npm run scheduler

Postgres

Create a new Postgres database, and run the SQL queries defined in db/create_tables.sql

<img src="screenshots/Database1.png" /> <img src="screenshots/Database2.png" />

Data Visualization

To analyze the data, check out the visual_playground subfolder https://github.com/KrauseFx/FxLifeSheet/tree/master/visual_playground

Origins

The original implementation abused Google Sheets as a database, and I used Google Data Studio to visualize the data. Both implementations ended up not working pretty quickly.

<img src="screenshots/Dashboard1.png" /> <img src="screenshots/Dashboard2.png" />