Skip to content

Latest commit

 

History

95 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Body Scan Log

A desktop application for tracking body scan mindfulness sessions, monitoring stress levels over time, and managing personalised coping strategies.

Built with Python, CustomTkinter, and SQLite.


What is a Body Scan?

A body scan is a mindfulness practice where you slowly move your attention through different parts of your body, noticing sensations like tension, pain, tightness, or discomfort. This app helps you log those sessions, track patterns, and find strategies to manage your stress.


Features

  • 16-part body scoring — rate tension in each body area on a scale of 0–10
  • Smart session average — zero scores are excluded so your average reflects areas of actual tension
  • Optional notes — add free-text notes to any entry
  • Full entry history — browse all past entries, view per-day body part breakdowns, edit, or delete
  • 10-day analysis — view your average score and a line graph of recent trends
  • Coping strategies — add, edit, view, and delete strategies organised by stress level (mild, moderate, high)
  • Smart strategy suggestions — get a random strategy matched to your current average stress level
  • Bilingual — full English and Polish language support
  • Four themes — Default, Light, Dark, and a Dyslexia-friendly option (OpenDyslexic font)
  • Persistent preferences — language and theme are saved between sessions

Requirements

Install dependencies with:

pip install customtkinter CTkMessagebox CTkListbox matplotlib pillow

Running the App

python gui.py

The SQLite database (body_scan.db) is created automatically on first launch.


Project Structure

├── gui.py                  # Main app window and navigation controller
├── menu_page.py            # Main menu
├── add_entry_page.py       # Add a new body scan entry
├── edit_entry_page.py      # Edit an existing entry
├── view_all_scans_page.py  # Browse, view, edit, and delete all entries
├── analysis_page.py        # 10-day average, graph, and strategy suggestion
├── strategy_page.py        # Browse strategies by stress level
├── add_strategy_page.py    # Add a new coping strategy
├── edit_strategy_page.py   # Edit an existing strategy
├── view_strategy_page.py   # View a strategy in full
├── setting_page.py         # Language and theme settings
├── about_page.py           # App information and instructions
├── database.py             # All database operations (SQLite)
├── db_schema.py            # Table creation SQL
├── translator.py           # English/Polish translations
├── fonts/                  # OpenDyslexic font files
├── styles/                 # Theme JSON files
└── img/                    # App icon

How to Use

Logging a Session

  1. From the menu, select Add New Entry
  2. Confirm or change today's date (format: YYYY-MM-DD)
  3. Score each of the 16 body parts from 0 (no tension) to 10 (severe discomfort)
  4. Add optional notes
  5. Press Submit Entry — your session average is calculated automatically

Viewing & Managing Entries

  • Select View All Entries from the menu
  • Choose an entry from the list, then use the dropdown to View, Edit, or Delete it

Analysing Your Data

  • Select Analyze Entries from the menu
  • See your average score over the last 10 days
  • Press Show Graph for a visual trend line
  • Press Get a Stress Management Technique for a strategy matched to your current stress level

Managing Coping Strategies

  • Go to Settings → Stress Decrease Strategies
  • Choose a stress level (Mild, Moderate, High)
  • Use the dropdown to add, edit, view, or delete strategies

Changing Language or Theme

  • Go to Settings
  • Select Languages to switch between English and Polish
  • Select Select Theme to choose Default, Light, Dark, or Dyslexia

Database

The app uses a local SQLite database with four tables:

Table Description
scans One record per session (date, overall score, notes)
body_part_reading Individual body part scores linked to a scan
stress_manager Coping strategies with stress level and description
user_preferences Saved language and theme preferences

Credits

Developed by Sara Czasak.
Built with Python, CustomTkinter, and SQLite.

Releases

Packages

Contributors

Languages