Skip to content

This repository contains a minimalistic journal web application developed using Streamlit and MongoDB. Easily record, modify, and manage your personal entries while enjoying an intuitive user interface. It also has the option of audio entries via whisper transcription.

License

Notifications You must be signed in to change notification settings

grudloff/Journal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Journal Web App using Streamlit and MongoDB

This repository contains a simple web application for maintaining a personal journal. The application is built using Streamlit, a Python library for creating interactive web applications, and MongoDB, a NoSQL database. The web app allows users to add, modify, and delete journal entries, as well as filter entries based on date.

Demo

Personal Journal Webapp

Features

  • Add new journal entries.
  • Modify existing journal entries.
  • Delete journal entries.
  • Filter entries by date range.
  • Display previous journal entries.

Changelog

  • 01-09-2023: Added authentication through streamlit-authenticator package.
  • 27-09-2023: Added audio entries with transcription powered by openai's whisper.

Getting Started

To run the journal web app locally, follow these steps:

  1. Clone this repository:

    git clone https://github.com/yourusername/journal-webapp.git
  2. Install the required rependencies:

    (a) Using pip. Navigate to the project directory and run:

    pip install -r requirements.txt

    (b) Or using conda to run the code in a virtual environment. Navigate to the project directory and run:

    conda env create -f environment.yml

    Then to activate the newly created environment with name "journal", run:

    conda activate journal
  3. Ensure you have a MongoDB instance set up. You will need the connection URI.

  4. Create a .streamlit directory in the root of your project (if not already present), and create a secrets.toml file inside it. Add the following lines to the secrets.toml file, replacing <your-mongo-uri> with your MongoDB connection URI, the configuration for authentification (check streamlit-authenticator documentation for more details):

    [mongo]
    uri = "<your-mongo-uri>"
    
    [credentials.usernames.jsmith]
    email = "jsmith@gmail.com"
    name = "John Smith"
    password = "abc"
    
    [credentials.usernames.rbriggs]
    email = "rbriggs@gmail.com"
    name = "Rebecca Briggs"
    password = "def"
    
    [cookie]
    expiry_days = 30
    key = "random_signature_key"
    name = "random_cookie_name"
    
    [preauthorized]
    emails = [ "melsby@gmail.com" ]
  5. Run the Streamlit app:

    streamlit run journal.py
  6. The web app will open in your default web browser. You can now start adding and managing journal entries.

Usage

  • New Entry: Add a new journal entry by typing in the text area and clicking the "Add entry" button.

  • Filter by date: Use the sidebar to select a start and end date to filter entries within a specific date range.

  • Number of entries: Adjust the slider in the sidebar to select the number of entries you want to display.

  • Previous Entries: View a list of previous journal entries based on your chosen filters.

  • Modify Entry: Click the "Modify" button on a specific entry to edit its content. You can also delete the entry using the "Delete entry" button.

Project Structure

  • journal.py: The main Streamlit application script that defines the UI and interaction logic.
  • requirements.txt: A list of required Python packages for running the web app.

Note

  • This is a simple example project and may not include advanced features such as authentication, user accounts, or extensive error handling. Ensure to enhance the app's security and reliability before deploying it to production.

  • Make sure to keep your MongoDB connection string secure, especially in production environments.

Blog Entry

I've written a blog post about the development of this journal web app. There I go into detail about using atlas MongoDB hosting and Streamlit Community Cloud to serve the webapp. Check it out for more details and insights:

Read the blog post

Contributing

Contributions are welcome! If you find any issues or want to add new features, feel free to create a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

This repository contains a minimalistic journal web application developed using Streamlit and MongoDB. Easily record, modify, and manage your personal entries while enjoying an intuitive user interface. It also has the option of audio entries via whisper transcription.

Topics

Resources

License

Stars

Watchers

Forks

Languages