From 01af36d8c167f031c14c6c041e25e9bc514e601c Mon Sep 17 00:00:00 2001 From: Ruben Carlo Benante Date: Tue, 7 Jul 2026 16:28:09 -0300 Subject: [PATCH] FinanceBuddy: shell v0.2 -- rename off Skeleton, drop demo files --- Asset/css/finance.css | 6 +++ Asset/css/skeleton.css | 1 - Asset/js/skeleton.js | 1 - Plugin.php | 23 ++++------ README.md | 88 ++++++++++++++++---------------------- Template/layout/header.php | 1 - VERSION | 2 +- 7 files changed, 51 insertions(+), 71 deletions(-) create mode 100644 Asset/css/finance.css delete mode 100644 Asset/css/skeleton.css delete mode 100644 Asset/js/skeleton.js delete mode 100644 Template/layout/header.php diff --git a/Asset/css/finance.css b/Asset/css/finance.css new file mode 100644 index 0000000..0885619 --- /dev/null +++ b/Asset/css/finance.css @@ -0,0 +1,6 @@ +/* + * FinanceBuddy styles. + * + * Empty for now. The money badge (.fb-badge / .fb-installments) and the per-column total + * (.fb-column-total) styling are added as those features land in later versions. + */ diff --git a/Asset/css/skeleton.css b/Asset/css/skeleton.css deleted file mode 100644 index b112526..0000000 --- a/Asset/css/skeleton.css +++ /dev/null @@ -1 +0,0 @@ -/* Skeleton plugin styles -- add CSS here. Loaded via template:layout:css. */ diff --git a/Asset/js/skeleton.js b/Asset/js/skeleton.js deleted file mode 100644 index 7a9d9f2..0000000 --- a/Asset/js/skeleton.js +++ /dev/null @@ -1 +0,0 @@ -// Skeleton plugin script -- add JS here. Loaded via template:layout:js. diff --git a/Plugin.php b/Plugin.php index 78240ed..22a49cc 100644 --- a/Plugin.php +++ b/Plugin.php @@ -1,6 +1,6 @@ template->hook->attach('template:layout:top', 'skeleton:layout/header'); - - // 2. Load the plugin stylesheet (currently empty -- proves the CSS hook fires). + // Plugin stylesheet. Empty for now; the money badge and per-column total styling + // are added as those features land in later versions. $this->hook->on('template:layout:css', array( - 'template' => 'plugins/Skeleton/Asset/css/skeleton.css', - )); - - // 3. Load the plugin script (currently empty -- proves the JS hook fires). - $this->hook->on('template:layout:js', array( - 'template' => 'plugins/Skeleton/Asset/js/skeleton.js', + 'template' => 'plugins/FinanceBuddy/Asset/css/finance.css', )); } public function getPluginName() { - return 'Skeleton'; + return 'FinanceBuddy'; } public function getPluginDescription() { - return t('Reusable skeleton/template for building Kanboard plugins.'); + return t('Attach a money value (debit/credit and installments) to board cards, shown on the card and totalled per column. Opt-in per board.'); } public function getPluginAuthor() @@ -39,12 +32,12 @@ class Plugin extends Base public function getPluginVersion() { - return '0.1.0'; + return '0.2.0'; } public function getPluginHomepage() { - return 'https://code.beco.cc/beco/kanboard-plugin-skeleton'; + return 'https://code.beco.cc/beco/FinanceBuddy'; } public function getCompatibleVersion() diff --git a/README.md b/README.md index a9d069b..83a5ab8 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,39 @@ -# Skeleton -- a Kanboard plugin template +# FinanceBuddy -- money on your Kanboard cards -A minimal, working Kanboard plugin that you copy and rename as the starting point for a -real plugin. By itself it does only one trivial thing: it renders the word "Skeleton" at -the top of every page. It changes no data and runs no database migration. +Attach a money value to a board card, see it on the card, and total it per column -- so a +Kanboard project can double as a simple, visual finance board (bills, installments, income +vs expenses). -## What it demonstrates +FinanceBuddy is **opt-in per board**: installing it changes nothing until a project manager +enables it for a specific board under Settings -> Integrations. Boards that are not enabled +look exactly as before. -- A complete `Plugin.php` registration class with all the metadata Kanboard shows in - Settings -> Plugins (name, description, author, version, homepage, compatible version). -- A template hook (`template:layout:top`) that injects a template into the page. -- Asset hooks (`template:layout:css` and `template:layout:js`) that load a stylesheet and - a script. They are empty for now but prove the injection path works -- handy when a real - plugin needs custom CSS or JS. -- The standard plugin directory layout, with stub folders (`Controller/`, `Model/`, - `Schema/`, `Locale/`, `Test/`) ready to grow into. +## The idea: a bill-lifecycle board + +Kanboard imposes no structure, so FinanceBuddy is built to fit one rather than dictate it. The +suggested organization: + +- **Columns = a bill's status:** `Templates -> Due this month -> Paid`. Cards flow left to + right as they are paid. +- **Tags = category:** housing, utilities, comms, food... +- **Due date = the bill's due date;** color/priority = urgency. +- Each card carries a **money value** (debit or credit) and, optionally, an **installment** + count (`p2/10` = 2nd of 10 payments; leave the total blank for an open-ended recurring bill). + +Recurring monthly bills can live as template cards spawned each month by the companion RecoReco +plugin; FinanceBuddy only owns the money. + +## Money format + +Amounts are shown in R$ with a comma decimal and no thousand separator (for example +`R$1234,56`). Input accepts either a dot or a comma as the decimal separator, so `1234.56` and +`1234,56` are the same value. + +## Status + +Early development. This version registers the plugin and loads its stylesheet; the per-board +toggle, the in-form editing, the card badge, and the per-column totals arrive in the following +versions. ## Requirements @@ -21,45 +41,9 @@ the top of every page. It changes no data and runs no database migration. ## Installation -No build step and no dependencies. - -1. Copy this folder into your Kanboard installation as `plugins/Skeleton/`. -2. Reload any page. The word "Skeleton" appears at the top. -3. Confirm it under Settings -> Plugins. - -To uninstall, delete `plugins/Skeleton/`. Nothing else is left behind. - -## Directory layout - -``` -Skeleton/ - Plugin.php Registration and hook wiring (the only required file). - README.md - LICENSE AGPL-3.0. - Template/ - layout/header.php The visible "Skeleton" word. - Asset/ - css/skeleton.css Loaded via template:layout:css. - js/skeleton.js Loaded via template:layout:js. - Controller/ Stub for future request handlers. - Model/ Stub for future business logic / DB access. - Schema/ Stub for future database migrations. - Locale/ Stub for future translations (e.g. pt_BR/, fr_FR/). - Test/ Stub for future unit tests. -``` - -## How to fork this into a new plugin - -1. Copy the folder and rename it, e.g. `plugins/MyPlugin/`. The folder name must match the - namespace and start with a capital letter. -2. In `Plugin.php`, change the namespace from `Kanboard\Plugin\Skeleton` to - `Kanboard\Plugin\MyPlugin`. -3. Update the metadata methods (`getPluginName`, `getPluginDescription`, `getPluginAuthor`, - `getPluginVersion`, `getPluginHomepage`, `getCompatibleVersion`). -4. Update the hook target paths: the lowercase prefix in `'skeleton:layout/header'` and the - `plugins/Skeleton/Asset/...` asset paths must match the new plugin name. -5. Replace `Template/layout/header.php` with your real template, or attach to a different - hook. See the Kanboard plugin hooks documentation for the full list of hook points. +Copy this folder into your Kanboard installation as `plugins/FinanceBuddy/`. The directory name +must be exactly `FinanceBuddy` (Kanboard derives the plugin namespace from the folder name). No +build step and no database migration. ## License diff --git a/Template/layout/header.php b/Template/layout/header.php deleted file mode 100644 index 4c07070..0000000 --- a/Template/layout/header.php +++ /dev/null @@ -1 +0,0 @@ -
Skeleton
diff --git a/VERSION b/VERSION index 6592437..43f0d00 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -FinanceBuddy v0.1 +FinanceBuddy v0.2