ProjectMiddleware is a Kotlin/Ktor API transformation service. It acts as a middleware layer: clients register mapping rules that define how to call an external API and how to transform its JSON response. Mapped routes are then served dynamically via UUID-based paths.

GitHub repository: github.com/LeonardoBai12/ProjectMiddleware


What is it?

Instead of consuming a cluttered or deeply nested external API response directly, you register a mapped route that describes:

  1. Which external endpoint to call — the base URL, path, method, headers, and optional auth
  2. How to transform the response — field renaming, type conversion, value extraction from nested objects, and multi-field concatenation

Once registered, the middleware exposes a clean UUID-based endpoint. Every request to that endpoint triggers a live call to the original API and returns the transformed response.


Quick navigation

Section Description
How It Works Step-by-step flow from client to mapped response
Key Features Capabilities overview
Mapping Rules Rule syntax reference with full examples
Mapping Request Route creation guide including authentication options
Preview Route Test your mapping rules before creating a route
Endpoints All available HTTP endpoints
Postman Collection Interactive API collection
KDoc Reference Auto-generated code documentation
Ecosystem Playground app, user service, and related repositories

The ecosystem

ProjectMiddleware is the backend of a broader ecosystem:

  • Middleware Playground — a Kotlin Multiplatform app (Android + iOS) for creating and managing mapped routes with a visual editor
  • Middleware User Service — a dedicated Ktor authentication microservice that handles JWT issuance and user management for the ecosystem

See the Ecosystem page for details.


Built with


This site uses Just the Docs, a documentation theme for Jekyll.