Brick
Available
Free
Privacy, retention, feature flags and currency
- Version
- 0.1.2
- Database part
- No
The contract
Small rules every app needs, kept in one place.
Settings
| Name | What it does |
|---|---|
| retentionRules | How long each kind of record is kept, in years and days. Defaults to the Australian starting points in defaultRetentionRules. |
| piiKeys | Field names whose values are hidden in logs, as well as the defaults. Pass them as extraKeys. |
| whenMissing | Whether a feature that has no flag is on. Defaults to false. |
| locale | The locale amounts are shown in. Defaults to en-AU. |
| currency | The currency amounts are in. Defaults to AUD. |
| currencySymbols | The symbol shown for each currency code. Defaults to defaultCurrencySymbols, such as A$ for AUD. |
Requires
This block works on its own.
Live demo
Hide personal data before it reaches a log
What the log would hold
{
"id": 4021,
"name": "Sam Lee",
"email": "[redacted]",
"phone": "[redacted]",
"date_of_birth": "[redacted]",
"tfn": "[redacted]",
"membership_no": "[redacted]",
"api_token": "[redacted]",
"note": "Rang from 0412 345 678 about the receipt. Card 4242 4242 4242 4242.",
"plan": "monthly"
}Free text is hidden by pattern too. The note reads Rang from 0412 345 678 about the receipt. Card [redacted-card].
- An email address
- s***@example.org
- A phone number
- ***678
- A token
- tok_li***(21)
When a record may be purged
The starting points are Australian, and an app can set its own.
The record is due to be purged.
Due on 30 June 2026.
Feature flags
A person always lands on the same side of a rollout, so a feature never flickers on and off.
| Flag | Set up as | For this person |
|---|---|---|
| new-dashboard | 50 in 100 people | Off (bucket 98) |
| beta-reports | Named people and the admin role | Off |
| everyone-feature | On for everyone | On |
| switched-off | Off for everyone | Off |
A misspelt flag, new-dashbord, is off. By default a typo never turns a feature on.
Money in whole minor units
What a person types is read, turned into whole cents without rounding, and shown with a symbol that names the currency.
- Read as
- 5000.50
- Held as
- 500,050
- Shown in a table
- A$5,000.50
- Shown to a donor
- A$5,000.50