DynamoDB Tables
The Insight Service uses five DynamoDB tables. site-pave is a single-table design holding every insight entity; the others are single-purpose. Regions and consuming Lambdas are in Infrastructure.
site-pave
Every item has string PK and SK attributes and a type discriminator. Keys are built by utils.HashJoinPath, which joins segments with #.
Entities
| Entity | PK | SK | TTL | Written by | Read by |
|---|---|---|---|---|---|
|
|
|
2 days |
api |
api — Same-Day Cache |
|
|
|
None |
api |
api — Income Verification |
|
|
|
1 year |
savings-snapshot |
api — Savings Progress |
|
|
|
None |
balance-alert |
balance-alert — Balance Alerts |
|
|
|
None |
feeder |
feeder — Feeder |
|
|
|
5 days |
feeder |
miner — Miner |
|
|
|
None |
None |
api ( |
|
|
|
|
None |
api ( |
|
|
|
|
None |
None |
|
|
|
None |
None |
None |
|
|
|
|
None |
api ( |
Source: pkg/dynamo/*.go (one file per entity)
Entities with no writer are Pave-derived caches. recurring and ritual rows age out via TTL; insights and income rows carry no TTL and are never deleted by the service. The endpoints that read them are documented in API Specification.
payday
One row per user, overwritten on each recompute. prediction_date is the validity key: a row is served only while it matches the current UTC day; the TTL is garbage collection only.
| Attribute | Description |
|---|---|
|
UTC day ( |
|
Winning algorithm: |
|
The chosen prediction’s payday, income source name, and cadence, plus the requesting loan and write time |
|
Each algorithm’s full prediction (payday, cadence, instant, standard, and extended collection dates); |
Source: pkg/dynamo/payday.go
income_verification
One row per user: txn_name, txn_id, amount_in_cents, pay_frequency, institution_id, verification_status (pending, approved, denied), is_valid, last_updated, notes[], verification_source (ollie, mx, or empty). Source: pkg/dynamo/income_verification.go
site-incomedetection
Written by the API Lambda on every income detection run; nothing in this service reads it.
| Key | Value |
|---|---|
PK |
|
SK |
|
TTL |
7 days |
Attributes |
|
Source: pkg/dynamo/income_detection.go
site-fmdatacapture
Shared cross-service analytics capture table; the Insight Service only writes to it, through the fmsdk/clients/datacapture client. Every row has a 2-day TTL.
| Event name | SK | Payload |
|---|---|---|
|
Assigned by the |
Every algorithm’s prediction and error, |
|
|
Payroll-candidate transactions selected by FloatMe V2; one row per user per day |
|
|
FloatMe V2 predicted payday and cadence; one row per user per day |
Source: pkg/payday/helpers.go, pkg/payday/floatme_predictor.go