Skip to content

jasmine-pyz/journal-app-with-text-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Journaling app with text analysis

Course project for CPSC 210 at the University of British Columbia

alt text

About the project

What is this?

This is a journalling app that encourages distraction-free, free-flow expressive writing, or what I like to call brain-dumping everything out. It also provides research-backed text-analysis on your mood, focus and overall state-of-mind.

Who will use it?

Honestly, everyone. But to start, I'll be testing it with myself and my friends.

Why this project interests me:

"The words people use in their daily lives can reveal important aspects of their social and psychological worlds". This is especially true for expressive writing.

I journal regularly and find free-flow writing to be a powerful way to clear my mind. Inspired by the "What’s Hidden in Your Words" episode of the Hidden Brain podcast, I want to create a journalling app that not only encourages this kind of writing but also offers meaningful statistics on the words we use to explore our state of mind.

It's important to note that similar applications already exist, such as 750words, or the software created by Professor James W.Pennebaker (the guest speaker in the podcast), LIWC. However, they either store data on the cloud or requires an expensive license, neither of which I love. I want something secure and private, where my journalling content never touches the internet. So this is why I want to build this project myself. It gies me full control over the interface and functionality to create exactly what I need.

I understand that implementing a robust text analysis algorithm is ambitious, so my goal is to start with a simple version and draw inspirations from 750words or LIWC. To deepen my understanding of the relationship between linguistics and cognition, I just checked out this book today and will start reading The Secret Life of Pornouns by Professor James Pennebaker. This will help me design and implement the basic model.

Other relevant research and resources:

Mock-up for GUI

Click here to view the design mock-ups for the app. Used tldraw;.

alt text

User stories

Persistence

  • As a user, I want to be able to save my journal entries to file (if I so choose).
  • As a user, when I select the quit option from menu, I want to be reminded to save my journal entries to file and have the option to do so or not.
  • As a user, when I start the application, I want to be given the option to load a past journal from file.
  • As a user, when I start the application, I want to be given the option to create a brand new journal.

Entry creation & management

  • As a user, I want to add a new journal entry so that I can document my thoughts and experiences.
  • As a user, I want to view a list of all my journal entries, including their date and time, so that I can easily find past entries.
  • As a user, I want to select a journal entry from the list and view its full content so that I can revisit what I wrote.
  • As a user, I want to edit an existing journal entry so that I can update or refine my thoughts.
  • As a user, I want to delete a journal entry so that I can remove content I no longer want to keep.
  • As a user, I want a distraction-free writing environemnt so that I can focus on journalling without disruptions.

Text analysis

  • As a user, I want to view the text analysis of a specific journal entry so that I can gain insights into my mood and focus for that entry

Instructions for End User (GUI)

  • You can generate the first required action related to the user story "adding multiple Xs to a Y" by creating and adding a new journal entry to the journal with the "create" button inside the action button drop down. alt text
  • You can generate the second required action related to the user story "adding multiple Xs to a Y" by viewing all the journal entries added on the journal page. alt text
  • You can generate the third required action related to the user story "adding multiple Xs to a Y" by deleting a selected journal entry to the journal with the "delete" button inside the action button drop down. alt text
  • You can locate my visual component on welcome screen, create new journal screen, load journal screen, as well as empty journal screen and view journal entry screen.
    alt text
  • You can save the state of my application by selecting the "save" button inside the action button drop down. alt text alt text
  • You can reload the state of my application by selecting loading an existing journal on the welcome screen and inputting the name of the journal you are looking for in the journal name input. alt text

Phase 4: Task 2

Here's a representative sample of the events that occur when my app runs:

 ======================= SESSION EVENT LOG =======================
Thu Mar 27 13:58:59 PDT 2025
        Created new journal with name [Kieran's diary]
Thu Mar 27 13:59:18 PDT 2025
        Created a new entry with preview of [I feel unjust for the world. I am sad today....]
Thu Mar 27 13:59:24 PDT 2025
        Edited journal entry - new preview is [I feel unjust for the world. I am sad today....]
Thu Mar 27 13:59:34 PDT 2025
        Loaded a journal with name [Little dog's journal]
Thu Mar 27 13:59:34 PDT 2025
        Loaded a journal entry with name [Sun coming through the window woke me up! My human...]
Thu Mar 27 13:59:34 PDT 2025
        Loaded a journal entry with name [this is a new entry! :) ]
Thu Mar 27 13:59:34 PDT 2025
        Loaded a journal entry with name [Something woke me up after dark. A noise outside made...]
Thu Mar 27 13:59:34 PDT 2025
        Loaded a journal entry with name [Napped ALL morning after my human left. The house feels...]
Thu Mar 27 13:59:34 PDT 2025
        Loaded a journal entry with name [Woke up when the sun was just peeking through the...]
Thu Mar 27 13:59:34 PDT 2025
        Loaded a journal entry with name [oh i see they are not sorted!]
Thu Mar 27 13:59:44 PDT 2025
        Deleted an entry with preview of [this is a new entry! :) ]
Thu Mar 27 13:59:46 PDT 2025
        Saved journal with name [Little dog's journal]
 ========================== END OF LOG ===========================

Phase 4: Task 3

  • I would like to apply Model-View-Controller design pattern to my project. Currently, there are model and view layers. Adding a Controller, which acts as an intermediary between model and view, processes user input from the view, updates the model based on those inputs, and determines which view should be displayed would create better separation of concerns, and make the code more organized and easier to maintain.
  • There are a lot of duplicated UI components and code that I use. I think it would benefit a lot from making them into re-usable classes, or extracting that code into reusable methods. For example, multiple screens have a "Back" button, so creating a BackButtonPanel could be useful, or a HeaderPanel. Another example is creating a createScaledImageLabel to scale images as I repeat the logic a couple times.
  • I have some very long methods in all three main panels (e.g. createEditPanel(), createViewPanel()), which I think I should refactor them into their own classes and call them in their responsible panels (e.g.entryPanel).
  • I would like to use GridBagLayout for a lot of UI design that I am currently relying on with BagLayout and BoarderLayout.
  • Improve naming to improve code readability.
  • Extract repeated values like font sizes, colors and dimensions into a config class or constants.

Thoughts dump (user stories)

  • Relying on the user's computer security control so i am not thinking about adding password protection. Assuming that the user will keep their laptop secure. However, password-control could be added if there's time.
  • Relying on the user's operating system for quick-hide functionality (quickly hide away the application). For example, on mac, users can use command-H to quickly hide the active application.
  • Relying on the user's ability to navigate file systems for exporting entries. Would like to provide a location path so the user can navigate there and see their entry records.

Thoughts dump (to-dos)

  • (not implemented) As a user, I want to see overall statistics across all my journal entries so that I can track trends in my writing over time.
  • Would be nice to have more robust text analysis.
  • Would be nice to have charts.
  • Did not implement the name check for "create new journal" - could be added in the future.

About

A journaling app that encourages distraction-free, expressive writing and provides research-backed text analysis on mood, focus, and overall state of mind

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages