How it works
This Coreflux LoT Notebook implements an append-only journal backed by MongoDB. A REST API writes new entries once, while MQTT topics carry live counters, window summaries, events, and scheduled reports for consumers.
Key features
- REST ingest: POST
/entriescreates a journal entry ondemo/journal/intake/create. - MongoDB persistence:
JournalDBinserts documents into theentriescollection and serves recent history. - Live broker state: today, this_week, metrics, and KPI values are maintained on topics with PUBLISH and KEEP.
- Domain events:
EntryAddedpublishes each new note todemo/journal/events/entry_added. - Scheduled reporting: midnight actions publish a daily report and reset daily state; Monday resets the weekly window.
- Error mirror: DB route error totals are mirrored from
$SYS/Coreflux/Routes/JournalDB/status.
Prerequisites
- MongoDB connection string and database name in
JOURNAL_DB_URIandJOURNAL_DB_NAME - Coreflux broker access with HTTP enabled on port 9091
- A broker clock aligned to the desired report timezone
