From 48be759e4d4d089db456d5cb913cc6de2ccd5e65 Mon Sep 17 00:00:00 2001 From: xbgmsharp Date: Fri, 23 Feb 2024 21:07:29 +0100 Subject: [PATCH] Update README --- docs/ERD/README.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/docs/ERD/README.md b/docs/ERD/README.md index f50ef48..e6b8646 100644 --- a/docs/ERD/README.md +++ b/docs/ERD/README.md @@ -4,7 +4,7 @@ The Entity-Relationship Diagram (ERD) provides a graphical representation of dat ## A global overview Auto generated Mermaid diagram using [mermerd](https://github.com/KarnerTh/mermerd) and [MermaidJs](https://github.com/mermaid-js/mermaid). -[PostgSail SQL Schema](https://github.com/xbgmsharp/postgsail/tree/main/docs/ERD/postgsail.md "PostgSail SQL Schema") +![PostgSail SQL Schema](https://github.com/xbgmsharp/postgsail/tree/main/docs/ERD/postgsail.md "PostgSail SQL Schema") ## Further There is 3 main schemas: @@ -32,3 +32,25 @@ There is 3 main schemas: - functions - ... +## Overview +- Insert data into table metadata from API using PostgREST +- Insert data into table metrics from API using PostgREST +- TimescaleDB Hypertable to store signalk metrics +- pgsql functions to generate logbook, stays, moorages +- CRON functions to process logbook, stays, moorages +- python functions for geo reverse and send notification via email and/or pushover +- Views statistics, timelapse, monitoring, logs +- Always store time in UTC + +## Ingest flowchart +```mermaid +graph LR + A[SignalK] -- HTTP POST --> B{PostGREST} + B -- SQL --> C{PostgreSQL} + C --> D((metadata trigger)) + C --> E((metrics trigger)) + D --> F{tbl.metadata} + E --> G{tbl.metrics} + E --> H{tbl.logs} + E --> I{tbl.stays} +```