Architecture #

This section describes how the ABAPer platform components fit together. It is intended for developers and administrators who need to understand the service topology and data flow.

Platform Overview #

┌──────────────────────────────────────────────────────────┐
│                   ABAPer Editor (Browser)                  │
│          React 18 + Monaco Editor + abaplint               │
│          https://abaper.bluefunda.com                      │
└─────────────┬─────────────────────┬──────────────────────┘
              │                     │
         /api/* requests       /ai/* requests
              │                     │
              ▼                     ▼
┌─────────────────────┐   ┌────────────────────┐
│    abaper-gw         │   │     abaper-bff      │
│  (KrakenD :8083)     │   │   (Go proxy :8080)  │
│  API Gateway         │   │  Backend-for-Frontend│
└──────┬──────┬────────┘   └──────┬───────┬──────┘
       │      │                   │       │
       ▼      ▼                   ▼       ▼
┌──────────┐ ┌──────────┐ ┌──────────┐ ┌────────┐
│abaper-ts │ │ abaper   │ │abaper-mcp│ │cai-bff │
│(TS :8087)│ │(Go :8085)│ │(Go :8015)│ │(AI Chat│
│ADT proxy │ │GitHub API│ │MCP Agent │ │ :8080) │
└────┬─────┘ └──────────┘ └────┬─────┘ └────────┘
     │                         │
     ▼                         ▼
┌──────────────────────────────────────────┐
│         SAP System (ADT REST API)         │
│         /sap/bc/adt/*                     │
└──────────────────────────────────────────┘

Components #

ABAPer Editor (Frontend) #

PropertyValue
TechnologyReact 18, TypeScript, Vite
EditorMonaco Editor with ABAP syntax
Lintingabaplint (Web Worker, client-side)
Transpiler@abaplint/transpiler (in-browser)
AuthKeycloak (PKCE flow)
StateZustand stores, persisted in localStorage

The frontend is a single-page application. All SAP interactions go through the API gateway. Linting and transpilation run client-side.

abaper-gw (API Gateway) #

KrakenD gateway on port 8083. Routes API requests to backend services:

Path PatternBackend
/api/v1/objects/*abaper-ts (:8087)
/api/v1/activateabaper-ts (:8087)
/api/v1/syntax-checkabaper-ts (:8087)
/api/v1/formatabaper-ts (:8087)
/api/v1/unit-testsabaper-ts (:8087)
/api/v1/completionabaper-ts (:8087)
/api/v1/navigationabaper-ts (:8087)
/api/v1/transports/*abaper-ts (:8087)
/api/v1/packages/*abaper-ts (:8087)
/api/v1/github/*abaper (Go :8085)

abaper-ts (ADT Proxy) #

Express.js 5 / TypeScript service on port 8087. Translates REST requests into SAP ADT calls using the abap-adt-api npm library.

  • Connection pooling with 5-minute idle eviction
  • Per-request credential resolution via X-SAP-* headers
  • Self-signed certificate support
  • 10MB request body limit

abaper (Go Backend) #

Go service on port 8085. In the platform context, handles GitHub integration endpoints (OAuth, user info, branches, tree, file contents). Also functions as a standalone CLI tool.

abaper-mcp (AI Agent) #

Go MCP server on port 8015. Exposes 16 SAP tools, 8 resource URI patterns, and 7 analysis prompts for AI assistants. Delegates to abaper-ts for all ADT operations — it does not connect to SAP directly.

abaper-bff (Backend-for-Frontend) #

Go reverse proxy on port 8080. Routes AI requests:

PathTarget
/ai/agentabaper-mcp (:8015) via SSE
/ai/chats/{id}cai-bff (:8080) via SSE

Handles header propagation and SSE streaming optimization.

Data Flow: Editing an Object #

1. User presses Ctrl+P  Open Object dialog
2. User types "ZCL_TEST"  search request
3. Browser  abaper-gw  abaper-ts  SAP ADT (search)
4. Results  user selects ZCL_TEST
5. Browser  abaper-gw  abaper-ts  SAP ADT (get source)
6. Source loads in Monaco Editor
7. abaplint Web Worker runs lint (client-side, no server)
8. User edits  dirty indicator on tab
9. Ctrl+S  save with source + etag
10. Browser  abaper-gw  abaper-ts  SAP ADT (lock  update  unlock)
11. Ctrl+Shift+A  activate
12. Browser  abaper-gw  abaper-ts  SAP ADT (activate)
13. Result shown in Output panel

Data Flow: AI Code Review #

1. User clicks "Review" in AI panel
2. Prompt + source sent to /ai/chats/{id} (SSE)
3. Browser  abaper-bff  cai-bff  AI model
4. AI model calls MCP tools as needed:
   Tool call  abaper-bff  abaper-mcp  abaper-ts  SAP
5. Response streams back as SSE events
6. Editor renders incrementally in AI panel

Authentication #

LayerMechanismPurpose
KeycloakPKCE OAuth, JWT Bearer tokenAuthenticates user to ABAPer platform
SAP credentialsX-SAP-* request headersAuthenticates against SAP ADT services
GitHubOAuth token in localStorageAuthenticates GitHub API access

These are independent — Keycloak authenticates the user to the platform, SAP credentials authenticate against SAP, and the GitHub token authenticates GitHub API calls.

Deployment #

All backend services run as Docker containers on a shared network:

ContainerImagePort
abaperbluefunda/abaper:latest8085
abaper-tsbdadevops/abaper-ts:latest8087
abaper-mcpbdadevops/abaper-mcp:latest8015
abaper-bff(internal)8080
abaper-gw(KrakenD)8083

Why Two ADT Backends? #

abaper (Go)abaper-ts (TypeScript)
ADT libraryCustom Go implementationabap-adt-api (npm)
Primary roleCLI + GitHub REST APIADT proxy for editor + MCP
Used byCLI users, editor (GitHub only)Editor (all ADT ops), MCP agent

The TypeScript service uses the mature abap-adt-api npm library with comprehensive ADT support. The Go service handles CLI operations and GitHub integration.