# rural-environmental-registry/rer-core architecture

> Architecture diagram of the GitHub repository rural-environmental-registry/rer-core, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rural-environmental-registry/rer-core
- Repository: https://github.com/rural-environmental-registry/rer-core

## Overview

RER is a deployable rural environmental registry: users access the web application, authenticate, submit property information, and use spatial and environmental-calculation services. The repository primarily contains deployment configuration, so the graph follows the README’s documented service topology and capabilities; internal request handling and several service-to-service details are not evidenced by sampled application source.

Main entry points: [`config/Gateway`](https://github.com/rural-environmental-registry/rer-core/tree/main/config/Gateway) (API gateway), [`config/Main/nginx/nginx.conf.template`](https://github.com/rural-environmental-registry/rer-core/blob/main/config/Main/nginx/nginx.conf.template) (Nginx proxy), [`config/Calculation-Engine`](https://github.com/rural-environmental-registry/rer-core/tree/main/config/Calculation-Engine) (Calculation engine), [`config/Core-Frontend`](https://github.com/rural-environmental-registry/rer-core/tree/main/config/Core-Frontend) (Core frontend)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User entry"]
  node_proxy["Nginx proxy"]
  node_frontend["Core frontend"]
end

subgraph group_registry["Registry services"]
  node_gateway["API gateway"]
  node_backend["Core backend"]
  node_coredb[("Core PostGIS")]
end

subgraph group_identity["Identity services"]
  node_authfrontend["Auth frontend"]
  node_authbackend["Auth backend"]
  node_keycloak["Keycloak"]
  node_authdb[("Auth database")]
end

subgraph group_spatial["Spatial and calculation services"]
  node_geoserver["GeoServer"]
  node_engine["Calculation engine"]
  node_enginedb[("Engine database")]
  node_spatialdb[("Spatial calculator DB")]
end

node_user(("Registry user"))

node_user -->|"opens application"| node_proxy
node_proxy -->|"serves frontend"| node_frontend
node_proxy -->|"routes API"| node_gateway
node_frontend -->|"calls API"| node_gateway
node_gateway -->|"routes requests"| node_backend
node_backend -->|"reads and writes"| node_coredb
node_gateway -->|"routes requests"| node_authfrontend
node_gateway -->|"routes requests"| node_authbackend
node_gateway -->|"relays authentication"| node_keycloak
node_keycloak -->|"stores identity data"| node_authdb
node_proxy -->|"routes map requests"| node_geoserver
node_gateway -->|"routes requests"| node_engine
node_engine -->|"uses engine data"| node_enginedb
node_engine -->|"uses spatial data"| node_spatialdb

click node_proxy "https://github.com/rural-environmental-registry/rer-core/blob/main/config/Main/nginx/nginx.conf.template"
click node_frontend "https://github.com/rural-environmental-registry/rer-core/tree/main/config/Core-Frontend"
click node_gateway "https://github.com/rural-environmental-registry/rer-core/tree/main/config/Gateway"
click node_backend "https://github.com/rural-environmental-registry/rer-core/tree/main/config/Core-Backend"
click node_coredb "https://github.com/rural-environmental-registry/rer-core/tree/main/config/Core-Backend"
click node_authfrontend "https://github.com/rural-environmental-registry/rer-core/tree/main/config/Authentication/frontend"
click node_authbackend "https://github.com/rural-environmental-registry/rer-core/tree/main/config/Authentication/backend"
click node_keycloak "https://github.com/rural-environmental-registry/rer-core/tree/main/config/Authentication"
click node_authdb "https://github.com/rural-environmental-registry/rer-core/tree/main/config/Authentication"
click node_geoserver "https://github.com/rural-environmental-registry/rer-core/tree/main/config/Geoserver"
click node_engine "https://github.com/rural-environmental-registry/rer-core/tree/main/config/Calculation-Engine"
click node_enginedb "https://github.com/rural-environmental-registry/rer-core/tree/main/config/Calculation-Engine"
click node_spatialdb "https://github.com/rural-environmental-registry/rer-core/tree/main/config/Calculation-Engine"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_proxy,node_frontend,node_user toneBlue
class node_gateway,node_backend,node_coredb toneAmber
class node_authfrontend,node_authbackend,node_keycloak,node_authdb toneMint
class node_geoserver,node_engine,node_enginedb,node_spatialdb toneRose
```

## Components

### User entry

- [Nginx proxy](https://github.com/rural-environmental-registry/rer-core/blob/main/config/Main/nginx/nginx.conf.template): `config/Main/nginx/nginx.conf.template`
- [Core frontend](https://github.com/rural-environmental-registry/rer-core/tree/main/config/Core-Frontend): `config/Core-Frontend`

### Registry services

- [API gateway](https://github.com/rural-environmental-registry/rer-core/tree/main/config/Gateway): `config/Gateway`
- [Core backend](https://github.com/rural-environmental-registry/rer-core/tree/main/config/Core-Backend): `config/Core-Backend`
- [Core PostGIS](https://github.com/rural-environmental-registry/rer-core/tree/main/config/Core-Backend): `config/Core-Backend`

### Identity services

- [Auth frontend](https://github.com/rural-environmental-registry/rer-core/tree/main/config/Authentication/frontend): `config/Authentication/frontend`
- [Auth backend](https://github.com/rural-environmental-registry/rer-core/tree/main/config/Authentication/backend): `config/Authentication/backend`
- [Keycloak](https://github.com/rural-environmental-registry/rer-core/tree/main/config/Authentication): `config/Authentication`
- [Auth database](https://github.com/rural-environmental-registry/rer-core/tree/main/config/Authentication): `config/Authentication`

### Spatial and calculation services

- [GeoServer](https://github.com/rural-environmental-registry/rer-core/tree/main/config/Geoserver): `config/Geoserver`
- [Calculation engine](https://github.com/rural-environmental-registry/rer-core/tree/main/config/Calculation-Engine): `config/Calculation-Engine`
- [Engine database](https://github.com/rural-environmental-registry/rer-core/tree/main/config/Calculation-Engine): `config/Calculation-Engine`
- [Spatial calculator DB](https://github.com/rural-environmental-registry/rer-core/tree/main/config/Calculation-Engine): `config/Calculation-Engine`

### Other components

- **Registry user**

## Connections

- Registry user → Nginx proxy: opens application
- Nginx proxy → Core frontend: serves frontend
- Nginx proxy → API gateway: routes API
- Core frontend → API gateway: calls API
- API gateway → Core backend: routes requests
- Core backend → Core PostGIS: reads and writes
- API gateway → Auth frontend: routes requests
- API gateway → Auth backend: routes requests
- API gateway → Keycloak: relays authentication
- Keycloak → Auth database: stores identity data
- Nginx proxy → GeoServer: routes map requests
- API gateway → Calculation engine: routes requests
- Calculation engine → Engine database: uses engine data
- Calculation engine → Spatial calculator DB: uses spatial data
