From 349cca38538d49c8f21a2cce885d512adfab7790 Mon Sep 17 00:00:00 2001 From: Jono Targett Date: Fri, 12 May 2023 11:44:56 +0930 Subject: [PATCH] Updated documentation. --- README.md | 2 +- docs/architecture.md | 62 ++++++++++++++++++++++++++++++++++++++++++++ requirements.txt | 4 +-- 3 files changed, 65 insertions(+), 3 deletions(-) create mode 100644 docs/architecture.md diff --git a/README.md b/README.md index 3a96d17..2bff379 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ This repository is a demo - it isn't a fully fleshed out system and isn't intend # Getting started - Use a debian-based 64-bit system. No way around it; this project is not cross-platform. - Install the SDRPlay device driver & install the project dependencies. - - `./SDRplay_RSP_API-Linux-3.07.1.run` + - `./setup` - Follow the prompts, there is some audience participation getting the driver installed. - Beyond that it should be mostly unattended. SoapySDR & plugins will be installed in the system directories. - Run the demos. The demo code is provided by SoapySDR and required minimal modification. diff --git a/docs/architecture.md b/docs/architecture.md new file mode 100644 index 0000000..fbc685a --- /dev/null +++ b/docs/architecture.md @@ -0,0 +1,62 @@ +# Microservice architecture +A bit of an oxymoron isn't it? If it needs an architecture diagram to explain it then how _micro_ can it be? The reality is that this microservice is actually several smaller services in a trenchcoat pretending to be one thing. I suppose that makes it just a service. + +```mermaid +flowchart TB + subgraph microservice["✌ 'Microservice' ✌"] + subgraph rest[REST Interface] + flask[Flask] + swag[flasgger] + flask-->swag + swag-->swaggerui[Swagger UI] + end + + subgraph hw[Hardware Interface] + soapy[SoapySDR] + subgraph plugins[Vendor Plugins] + soapysdrplay[SoapySDRPlay] + soapyrtlsdr[SoapyRTLSDR] + end + soapy<-->plugins + end + + flask<-->soapy + + subgraph radio[DSP Chain] + demod[fm_demod.py] + ffmpeg + end + mediamtx["RTSP Relay\n(MediaMTX)"] + + plugins-->|IQ samples|demod + demod-->|PCM audio|ffmpeg + ffmpeg-->|RTP stream|mediamtx + + subgraph proxy[Reverse Proxy] + caddy[Caddy] + l4[Caddy Layer 4 Plugin] + %%le[Let's Encrypt] + style l4 stroke-dasharray: 3 3,opacity: 0.5 + caddy-.->l4 + %%le-->caddy + end + + flask<-->|HTTP:5000|caddy + swaggerui<-->|HTTP:5000|caddy + mediamtx-.->|RTSP:8554|l4 + end + style microservice opacity: 0.2 + + %%rtlsdr[RTL-SDR Driver]-->soapyrtlsdr + %%sdrplay[SDRPlay Driver]-->soapysdrplay + + subgraph client[Client] + control["REST Client\n(Browser)"] + rtsp["RTSP Renderer\n(VLC)"] + end + style client opacity: 0.2 + + caddy<-->|HTTPS:443|control + l4-.->|RTSPS|rtsp + mediamtx-->|RTSP:8554|rtsp +``` \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 6cc6fe3..f39a6ea 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ colorama==0.4.3 +flasgger==0.9.5 +Flask==2.2.3 numpy==1.17.4 prefixed==0.7.0 -flask==2.2.3 -flasgger==0.9.5