@startuml

component "Loculus Website" as Website

together {
    component "Loculus Backend" as Backend
    component Keycloak
}

component "Postgres DB" as Postgres
component S3

component "Preprocessing Pipeline" as Preprocessing
component "Ingest Pipeline" as Ingest


frame SILO-LAPIS {
    component SILO
    component LAPIS
}

Website --> Keycloak : authenticate
Backend -left-> Keycloak : authenticate

Website -down-> Backend : upload\nsequence data
Backend --> Preprocessing : fetch new\nsequence entries
Backend <-- Preprocessing : submit enriched\nsequence entries
Backend <--> Postgres : persist\nsequence entries
Ingest --> Backend : new Genbank\nsequences

Backend -up-> SILO: provide\nsequence entries
LAPIS -left-> Website : sequence query\nresults
LAPIS <-right- SILO : sequence query\nresults

Website -> S3: upload\nextra files
Backend --> S3: set files\nto public
S3 -right-> Preprocessing: provide user submitted files
Preprocessing -left-> S3: upload processed files

@enduml
