Skip to content

lulu-codes/mindful-moments-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DEV1001 T1A2 - Programming Project: "Mindful Moments" App

Table of Contents


Setup and Requirements

Project Overview

This is my individual programming project to demonstrate my skills as a Student Developer to design and build a functional command-line interface (CLI) application using the Python programming language.

The application showcases my abilities and skills to develop and implement the use of key programming principles, structures and apply appropriate use of code styles and conventions.

Key concepts demonstrated in this project include

  • Writing and using functions and classes
  • Applying of Python language features including appropriate use of syntax and structures
  • Handling of inputs and outputs for a functional user experience
  • Applying DRY coding coding principles and use of reusable functions
  • Approporiate use of code styles and conventions in Python PEP 8
  • Documentation including user help guide and instructions on how to use application
  • Implementing control structures to manage control flow
  • Applying error handling to manage exceptions and errors
  • Using third*party libraries and use of modules and functions
  • Using file handling, including reading and writing files/data to JSON

Purpose of "Mindful Moments" App

The "Mindful Moments" CLI app is designed to help users track their daily emotional-wellbeing through mood ratings and journal reflections. It allow users to log and view their journal entries about "Mindful Moments" to encourage personal reflections on their daily mood and wins and challenges of the day.

The app will include user input prompts and allow users to create simple journal entries based off these prompts. Over time, the app will capture a history of data files to provide a text-based mood trend summary and allow users to identify emotional patterns to promote self-awareness, self-reflection and support the practice of mindfulness well-being.

Features of "Mindful Moments" App

  • Main menu - User input and output to handle navigating the terminal interface
  • Secure Access - Password-protected journal to keep reflections private
  • Mood Logging - Users selects a mood rating from predefined options represented with descriptive text/emojis for quick and intuitive input
  • Daily Reflections - Users are prompted with input to enter wins and challenges for the day to promote self-reflection and mindfulness.
  • Gratitude Entry - Prompts user to note down something they are grateful for, aimed to cultivate a positive and grateful mindset.
  • Random Affirmations - After mood rating entry, based on their mood rating score, users receive an encouragement quote randomly selected from a custom list to boost and encourage their mood. Overall to support enhancing the user experience and engagement.

Built-In and Third-Party Libraries - Software Licensing & Security

This application project uses the following built-in and third-party Python libraries. The combination of the following libraries and tools were used to enhance the application's functionality, security and user experience in the "Mindful Moments" app:

Main Libraries Used

Library Purpose Licence Type Security & Ethical Considerations
json Read/write and store structured journal data Built-in Used to support consistent and readable structured data storage. No security or ethical concerns.
pathlib File system path handling Built-in Used to manage file path navigation. No security or ethical concerns.
datetime Log and track timestamps on journal entries Built-in Used securely to log timestamp.
random Randomly selects motivational affirmations to promote positive user engagement Built-in Used only for random selection - to choose and display motivational affiramtions. Content is appropriate and consists of positive quotes.
bcrypt Secure password protection to keep journal access private Apache Licence Used for the user account login feature to strengthen security by hashing passwords with random salt instead of storing passwords as plain text. Chose to use 'bcrypt' library over 'getpass' to practice enhanced password protection.
rich Add colour to terminal UI with styled text and enhance visual insights MIT Licence Open source and widely trusted library however relies on dependencies so need to ensure that library is up to date to avoid any potential vulnerabilities
rich-pyfiglet Add decorative ASCII art fonts integrated with rich library to enhance CLI aesthetics MIT Licence Appropriate use of selected styled ASCII art, it will also be checked to avoid inappropriate characters that may cause errors. No security or ethical concerns.

Dependency Libraries for Main Libraries Used

Library Purpose Licence Type
Pygments Dependency of rich used for syntax highlighting when rendering formatted text in CLI. BSD Licence
markdown-it-py Dependency of rich to enable rendering of Markdown formatted text (eg. for headings and lists) in the CLI. MIT Licence
mdurl Sub-dependency of markdown-it-py specifically used to parse and validate URLs in Markdown content. MIT Licence
click Dependency of rich-pyfiglet used for creating CLI commands and options. BSD Licence

License Versions

Each library is open-source and Licenced to allow for educational and personal use under their respective Licences. I acknowledge and respect the work of the open-source community in making these tools available. For more details on each Licence, please visit the respective project pages on PyPI or via their official repositories.

Custom Made Modules

This project is includes works off core structured custom built Python modules to improve maintainability, readability, and separated modules based on their utility support. Each module focuses on a specific responsibility within the app:

Modules Purpose
user_auth_models.py Handles user account creation, login, password hashing and verification.
journal_models.py Manages journal entry creation, formatting and storage logic.
helpers.py Contains reusable functions for input validation, menu handling, and console utilities.
ascii_art.py Stores visual enhancements like the ASCII welcome banner for console printing to improve UI experience.
quotes.py Provides lists of categorised encouragement quotes which are randomly selected based on user mod input to support user's engagement and mood.

These modules allow for a clean and modular main program (main.py) and include use of Class, inheritance, composition and encapsulation.

Note: File Paths for stored data located in data_storage for user accounts and journal entries. This can be manually cleared if wanting to remove stored data. Exception classes relocated to own file to tidy up away from main app flow code files.

Tech Stack Used

  • Markdown - Documentation for README and User Guide
  • Python (version 3.13.3) - Python programming language version
  • Visual Studio Code - Development environment for code, use of terminal line and console output for debugging
  • GitHub - Git version control

References and Resources Used

  • PEP 8 - For following Python styles and conventions

  • Exceptions - For handling exceptions

  • Emoji (Most CLI-safe. Raw Unicode and official reference) -
    Used to add expressive Emoji characters to convey mood rating tracking to enhance UI visual in CLI interface. As these Emojis are supported natively by Unicode, I used this directly as strings and assigned to relevant variables for reuse. I avoided adding external dependencies to keep project lightweight and more simple to maintain. Other considerations taken into account was that when saving to JSON, the files wouldn't require special processing to convert between reading/writing to files.

  • Geeksforgeeks - Support guide with using bcrypt to hash passwords with bcrypt

About

T1A2: Programming Project: Mindful Moments App

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages