@dxvis/flatbi 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,40 @@
1
+ ---
2
+ name: flatbi
3
+ description: Dashboard authoring with flatbi — use when building, editing, or fixing a dashboard from local data files into a self-contained offline HTML file.
4
+ ---
5
+
6
+ # flatbi
7
+
8
+ Author declarative `*.dash.yaml` specs and compile them into single-file, zero-network HTML dashboards.
9
+
10
+ ## Authoring loop
11
+
12
+ Follow these five steps in order:
13
+
14
+ 1. **Inspect** — Run `flatbi inspect` on your source files (or existing spec) to see exact column names, types, cardinalities, null counts, and date ranges.
15
+ 2. **Write the spec** — Create or update `*.dash.yaml` starting with `dash: 1`, defining `sources`, `models` (dimensions, time field, measures, formulas), `filters`, `tiles`, and 12-column `layout`. Use the exact column names returned by `inspect`. Only dimensions, filters, and fields shown by tiles enter the embedded slim table, and `count_distinct` stores rank keys rather than raw IDs or emails.
16
+ 3. **Check until clean** — Run `flatbi check` on the spec. Each finding reports `file:line:col CODE message` with allowed values and nearest-match suggestions. Resolve every finding until `check` reports zero errors and zero actionable warnings.
17
+ 4. **Render** — Run `flatbi render` on the spec to capture a full-page PNG screenshot and evaluate visual findings (`text-clipped`, `legend-overflow`, `too-many-categories`, `low-contrast`, `tiny-text`). Optionally run `npx impeccable detect` on the built HTML for an extra polish check when available. Run `flatbi build` to write the shareable offline HTML file.
18
+ 5. **Look** — Open and visually inspect the rendered PNG image directly to verify layout hierarchy, label spacing, legend/axis clearance on narrow multi-series charts, and that every tile displays meaningful data. Adjust the spec (such as widening a span or switching a stacked bar chart to horizontal) and repeat `check` and `render` if anything looks cramped or unclear.
19
+
20
+ ## Operate-mode dashboard guidance
21
+
22
+ Analytical dashboards operate in dense information mode rather than marketing mode: KPI headline tiles, sparklines backed by real time-series data, and dense tables are intentional and appropriate here.
23
+
24
+ ## Reference pointers
25
+
26
+ - **CLI commands and options**: Run `flatbi --help` or `flatbi <command> --help` for current subcommands and flags.
27
+ - **Tile selection guide**: [`docs/tile-guide.md`](../../docs/tile-guide.md) maps your data shape to the right tile type.
28
+ - **Copy-paste recipes**: [`docs/recipes.md`](../../docs/recipes.md) shows verified examples for all 10 tile types.
29
+ - **Complete spec reference**: [`docs/spec-reference.md`](../../docs/spec-reference.md) (generated directly from the validator schema).
30
+ - **JSON Schema**: [`schema/dash.schema.json`](../../schema/dash.schema.json) for editor validation (`# yaml-language-server: $schema=...`).
31
+ - **Canonical vocabulary**: [`GLOSSARY.md`](../../GLOSSARY.md).
32
+ - **Starter example**: [`examples/sales.dash.yaml`](../../examples/sales.dash.yaml).
33
+
34
+ ## Done condition
35
+
36
+ Consider the dashboard finished only when all three hold:
37
+
38
+ - `flatbi check` is clean with zero unresolved findings;
39
+ - you have opened and visually inspected the rendered PNG from `flatbi render`;
40
+ - every tile displays real data.