Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Notes API Client (Tkinter Desktop)

A lightweight, desktop-native GUI client built in Python using Tkinter to interact with a Notes REST API. This application implements a stateful Master/Detail interface layout, allowing you to seamlessly authenticate, browse, search, create, update, and delete notes cached locally for maximum responsiveness.

This client is fully interchangeable with the CLI Go TUI and Python equivalents, communicating with the exact same database engine.

🚀 Features

  • Secure Session Authentication: Integrated login gate with token-based authorization.
  • Master/Detail Layout:
    • Left pane displays an interactive, scrollable list of notes using ttk.Treeview.
    • Right pane features a complete rich-text editing suite for editing titles and bodies.
  • Smart Local Caching: Minimizes server round-trips by caching notes in memory during selection toggles.
  • Stateful Completion System: Visual distinction for completed notes (grayed out with a [✓] tag in the sidebar).
  • Graceful Error Handling:
    • Non-blocking dynamic status bar offering clear visual feedback on successful operations.
    • Safe extraction logic utilizing guard clauses to prevent Tkinter index out-of-bounds callback errors.
  • Native System Dialogs: Warns users and prompts for explicit confirmation before critical database actions (like deletion).

🛠️ Tech Stack & Requirements

  • Backend Interoperability: Compatible with any backend matching the standardized REST endpoints (Go/Fiber/Gorm, Python/FastAPI, or PHP/Laravel).
  • GUI Engine: Python 3.12+ with standard libraries (tkinter, ttk).
  • Dependencies: requests library for synchronous HTTP transport.

📂 Project Structure

notes-gui-tkinter/
├── app.py          # Main Tkinter Application UI & State Controller
├── client.py       # API Engine Class wrapper (HTTP transport requests)
└── README.md       # Project Documentation

⚙️ Installation & Setup

  1. Clone the repository and navigate into the project directory:Bashcd ~/apis/notes-gui-tkinter
  2. Set up a virtual environment and activate it:
python3 -m venv venv
source venv/bin/activate
  1. Install the HTTP client transport dependency:
pip install requests

or

pip install -r requirements.txt
  1. Verify Backend Address: Open app.py and ensure the API client initialization points to your active server URL:Pythonself.api = APIClient("http://127.0.0.1:8002")
  2. Execute the Application:
python3 app.py

🎮 Workflow Controls

  • Select a Note: Click any note in the left panel to load its content into the editor instantly from memory.
  • Create New: Click the New Note button to clear the text editor, focus your typing cursor, and safely reset active selection states.
  • Save Updates: Edits to an existing note are saved securely on-save. If no note is selected, the application automatically defaults to creating a brand new record instead.
  • Verification Popups: The Delete Note option triggers a system-native modal checking if you are sure before calling the API.

About

Python with custom Tkinter gui for Polyglot Notes project.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages