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) #
| Property | Value |
|---|---|
| Technology | React 18, TypeScript, Vite |
| Editor | Monaco Editor with ABAP syntax |
| Linting | abaplint (Web Worker, client-side) |
| Transpiler | @abaplint/transpiler (in-browser) |
| Auth | Keycloak (PKCE flow) |
| State | Zustand 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 Pattern | Backend |
|---|---|
/api/v1/objects/* | abaper-ts (:8087) |
/api/v1/activate | abaper-ts (:8087) |
/api/v1/syntax-check | abaper-ts (:8087) |
/api/v1/format | abaper-ts (:8087) |
/api/v1/unit-tests | abaper-ts (:8087) |
/api/v1/completion | abaper-ts (:8087) |
/api/v1/navigation | abaper-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:
| Path | Target |
|---|---|
/ai/agent | abaper-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 #
| Layer | Mechanism | Purpose |
|---|---|---|
| Keycloak | PKCE OAuth, JWT Bearer token | Authenticates user to ABAPer platform |
| SAP credentials | X-SAP-* request headers | Authenticates against SAP ADT services |
| GitHub | OAuth token in localStorage | Authenticates 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:
| Container | Image | Port |
|---|---|---|
| abaper | bluefunda/abaper:latest | 8085 |
| abaper-ts | bdadevops/abaper-ts:latest | 8087 |
| abaper-mcp | bdadevops/abaper-mcp:latest | 8015 |
| abaper-bff | (internal) | 8080 |
| abaper-gw | (KrakenD) | 8083 |
Why Two ADT Backends? #
| abaper (Go) | abaper-ts (TypeScript) | |
|---|---|---|
| ADT library | Custom Go implementation | abap-adt-api (npm) |
| Primary role | CLI + GitHub REST API | ADT proxy for editor + MCP |
| Used by | CLI 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.