Diarist
Journaling made simple.
Diarist is an app to help you update your Journal directly from Whatsapp.
How it works:
- Create an account by providing your phone number
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:
- It is my entry for the Twilio x DEV hackathon.
- It is based on the java Spark framework. Heavily influenced by the appointment reminders app example from Twilio.
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
- Configure environment variables for all the properties that don't have a default value.
- Make sure you have an instance of MySQL running. There's a docker-compose on the resources directory that can be useful.
- Create a schema for the app. Should be called
diarist_testunlessDATABASE_SCHEMAis set - Run migrations with the maven command
- 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.


