FinanceBuddy: shell v0.2 -- rename off Skeleton, drop demo files

This commit is contained in:
2026-07-07 16:28:09 -03:00
parent 2d5c6a1377
commit 01af36d8c1
7 changed files with 51 additions and 71 deletions

6
Asset/css/finance.css Normal file
View File

@@ -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.
*/

View File

@@ -1 +0,0 @@
/* Skeleton plugin styles -- add CSS here. Loaded via template:layout:css. */

View File

@@ -1 +0,0 @@
// Skeleton plugin script -- add JS here. Loaded via template:layout:js.

View File

@@ -1,6 +1,6 @@
<?php
namespace Kanboard\Plugin\Skeleton;
namespace Kanboard\Plugin\FinanceBuddy;
use Kanboard\Core\Plugin\Base;
@@ -8,28 +8,21 @@ class Plugin extends Base
{
public function initialize()
{
// 1. Render a visible word at the top of every page (the demo output).
$this->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()

View File

@@ -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

View File

@@ -1 +0,0 @@
<div class="skeleton-plugin-marker">Skeleton</div>

View File

@@ -1 +1 @@
FinanceBuddy v0.1
FinanceBuddy v0.2