Skip to content

caruano95/diarist

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

Diarist

Journaling made simple.

Diarist is an app to help you update your Journal directly from Whatsapp.

How it works:

  1. Create an account by providing your phone number

Get Started

2. You'll receive a whatsapp message from us asking you `How was your day today?`. Just reply to it and we'll save your response.

Whatsapp

3. Once you feel like reading some of your old entries you can go to the webapp or consume from the rest API to get your messages formatted and time-stamped. It will also continue to send you a text every day so that you don't forget to update your diary.

Diary

About the app

A "Diarist" is a person who writes a diary. This app lets you send your journal updates via Whatsapp and view them on your browser. Note that:

If you are curious about the future, inspirations or the process of building this you can check out the docs.

How to run it

Start your mysql instance

docker-compose -f src/main/resources/docker/docker-compose.yml up -d

Run migrations

mvn clean compile exec:java -Dexec.mainClass=com.diarist.journal.Migrator

Execute the app

mvn clean compile exec:java -Dexec.mainClass=com.diarist.journal.Server -Dexec.cleanupDaemonThreads=false

Instalation guide

  1. Configure environment variables for all the properties that don't have a default value.
  2. Make sure you have an instance of MySQL running. There's a docker-compose on the resources directory that can be useful.
  3. Create a schema for the app. Should be called diarist_test unless DATABASE_SCHEMA is set
  4. Run migrations with the maven command
  5. Execute the app

Available properties

Mysql

Property Name Default Value
DATABASE_USER diarist
DATABASE_PASS diary
DATABASE_HOST localhost
DATABASE_PORT 3306
DATABASE_SCHEMA diarist_test

Twilio

Property Name Default Value
TWILIO_AUTH_TOKEN
TWILIO_ACCOUNT_SID
TWILIO_NUMBER

App settings

Property Name Default Value
APP_PORT 4567
ENABLE_API false

Local developement

  • In order to receive a user's message, you'll need make your computer accessible from the internet with ngrok.
  • You need to provide a MySQL instance on your local environment.