Build toolBuild tooltypeRuns at build time. Nothing of it ships in the deployed application.See every one →What this type is →by a community orgby a community orgoriginPublished by a community organisation, so it outlives any one maintainer.See every one →

dev-approuter

A development-time wrapper for the SAP Application Router that serves UI5 and CDS modules once they are added to the project as dependencies.

Runs the SAP Application Router as a development-time process. UI5 and CDS modules reach it once they are added to the project as dependencies. The registry page carries no README, so its configuration and behaviour beyond that are not documented here.

Facts

Latestv0.7.2ReleasedLast pushLicenceApache-2.0

Where it sits

Lives in
Provides
Local developmentCAPLocal developmentcapabilityRunning the whole stack on a laptop against real bindings — the service, the UI and the routing in front of it — without deploying to see a change.
Requires
@sap/approuter@sap/approuterartifactThe router it wraps and runs as a development-time process, serving the UI5 and CDS modules a project adds as dependencies.

Who is behind it

UI5 CommunityUI5 CommunityOrganisationMaintains this
In the atlas: maintains 69
@ui5-community
maintainerFlorian VogtPersonContributes to this
In the atlas: contributes to 50, wrote 2
@flovogt
Nico SchoenteichPersonContributes to this
In the atlas: maintains 3, contributes to 16, wrote 3
@nicoschoenteich
Peter MuessigPersonContributes to this
In the atlas: maintains 14, contributes to 80, wrote 1
@petermuessig
Volker BuzekPersonContributes to this
In the atlas: maintains 7, contributes to 53, wrote 2
@vobu
4 contributors

What it declares

Every artifact

Type
Build tool
Origin
By a community org

As a build tool

Distributed through
does not say

For local development

Part of the local stack it starts
App Router

Tasks this contributes to1Beta

Open a CAP application through its router locallyA developer opens the application on a laptop at the address the App Router serves, logs in through the real authentication flow, and reaches the CAP service and the UI modules behind it the way a deployed request would.Node.jsCoversthe router as a development-time process
What it does

Wraps the SAP Application Router for development time and serves the project's UI5 and CDS modules once they are added to it as dependencies, so the modules reach the router through the dependency list rather than through a route configuration.

Remaining work

Add the modules as dependencies. The registry page carries no README, so what it expects of the environment around it is not documented here.

All options on the Local development page →

Connections3

Install

npm add dev-approuter

Derived from the package name. No recipe recorded; the README has the configuration.

README

quoted from ui5-community/ui5-ecosystem-showcase under Apache-2.0, read
ui5-community/ui5-ecosystem-showcase/packages/dev-approuter/README.mdOn GitHub

dev-approuter

👋 This is an open‑source, community‑driven project, developed and actively monitored by members of the UI5 community. You are welcome to use it, report issues, contribute enhancements, and support others in the community.

The dev-approuter is a dev time wrapper for the SAP Application Router that can serve UI5 and SAP Cloud Application Programming Model (CAP) apps that are added as (dev)dependencies to the approuter's package.json. A few key notes to begin with:

  • The dev-approuter utilizes the SAP Application Router's extension API by adding UI5 servers as extensions - providing the full UI5 CLI experience.
  • A linked SAP CDS app is started on a different port - this is to mimic a deployed architecture. The corresponding destination is automatically created for you.
  • In order to safely separate development configuration from productive code, the dev-approuter introduces the concept of the xs-dev.json - think of it as an extension to the xs-app.json.
  • As the name suggests, the dev-approuter is for development only and not meant to be used in production.

  1. Prerequisites
  2. Starting the dev-approuter
  3. Adding and serving apps
  4. The xs-dev.json file
  5. Using the dev-approuter and SAP Application Router simultaneously
  6. Extending the dev-approuter

Prerequisites

Starting the dev-approuter

The dev-approuter is a wrapper for the SAP Application Router, meaning your current (productive) approuter configuration will also work with the dev-approuter, with the option to add dev time configuration to it (see xs-dev.json).

  1. Install the dev-approuter as a dev dependency:

    npm install dev-approuter --save-dev
  2. Add the following script to the scripts section of your approuter's package.json file:

    {
        ...
        "scripts": {
            ...
            "dev": "node node_modules/dev-approuter"
        }
    }
  3. Start the dev-approuter:

    npm run dev
  4. The dev-approuter starts on port 5000 by default, just like the SAP Application Router. If that port is already in use on your machine (hello Mac users 👋), you can set another port via the default-env.json file:

    {
        "PORT": 5001,
        ...
    }

...or by passing a port as environment variable: PORT=5001 npm run dev

  1. Upon start, the dev-approuter exposes a custom endpoint http://localhost:$port/my-jwt. It echos the current JWT of the current (authenticated and authorized) user (or none) - this helps debugging auth(n,z) issues at dev time.

Adding and serving apps

To add a UI5 or SAP CDS app to the dev-approuter, add it to the devDependencies section of your approuter's package.json file:

{
    ...
    "devDependencies": {
        ...
        "my-ui5-app": "path/to/ui5-app",
        "my-cds-app": "path/to/cds-app"
    }
}
UI5 apps

For UI5 apps the metadata.name (as defined in the ui5.yaml) is used as the mount path by default. This can be overwritten with via a customConfiguration.mountPath in the ui5.yaml:

specVersion: "3.0"
metadata:
  name: ui5-app  # default mount path would be /ui5-app 
type: application
customConfiguration:
  cds-plugin-ui5:
    mountPath: /my-custom-mount-path # overwrites the default mount path

The above configuration result in the UI5 app being available at http://localhost:5000/my-custom-mount-path.

SAP CDS server

SAP CDS server is started on a separate port (4004 by default, can be overwritten via CDS_PORT). The dev-approuter automatically creates a route and destination behind the scenes, so that you (and your UI5 apps) can reach your SAP CDS services directly at their service path, but through the dev-approuter, e.g. http://localhost:5000/my-cds-service.

There is no need manually create a destination for you SAP CDS app, unless you want to overwrite the default destination configuration. In this case, create a new destination in a default-env.json. The destination's name has to match the module name as declared in the approuter's devDependencies:

{
    "CDS_PORT": 4005,
    "destinations": [
        {
            "Name": "my-cds-app",
            "Authentication": "NoAuthentication",
            "ProxyType": "Internet",
            "Type": "HTTP",
            "URL": "http://localhost:4005",
            "forwardAuthToken": true
        }
    ],
    ...
}

The xs-dev.json file

The dev-approuter introduces the concept of an xs-dev.json file, which works like a regular xs-app.json file, but is used by the dev-approuter exclusively (meaning it's ignored by the SAP Application Router). The idea behind this concept is to safely separate dev time configuration from productive code.

The xs-dev.json follows the same logic and syntax as the xs-app.json file, but has one additional key feature: You can add a dependency to a route, which links it to a UI5 or SAP CDS app.

Look at the following example xs-dev.json that defines different authenticationTypes for different UI5 apps:

{
    "welcomeFile": "index.html",
    "authenticationMethod": "route",
    "routes": [
        {
            "dependency": "my-ui5-app1",
            "authenticationType": "none"
        },
        {
            "dependency": "my-ui5-app2",
            "authenticationType": "xsuaa"
        }
    ]
}

Behind the scenes, the dev-approuter will resolve these "dependency routes" by adding the source, target, and destination properties to them. Be aware that exactly these properties get overwritten by the dev-approuter in case you use them together with dependency. The only exception are SAP CDS dependencies, for which only the destination property gets overwritten by the dev-approuter.

Using the dev-approuter and SAP Application Router simultaneously

If you choose to place your dev-approuter in the same directory as an SAP Application Router, which you will eventually deploy, you will have to remove the devDependencies section of the package.json before deployment. This is required because the SAP Application Router will not be able to install local dev dependencies (your UI5 and SAP CDS apps) in the cloud. To achieve this, you could introduce a build step for the approuter, moving required files to a dist/ folder and removing dev dependencies:

"build": "mkdir -p dist && jq 'del(.devDependencies)' package.json > dist/package.json && cp xs-app.json dist/xs-app.json"

Extending the dev-approuter

The dev-approuter offers an extension point to pass middleware to the SAP Application Router, that gets started by the dev-approuter (behind the scenes) and has an extension point of its own (see the documentation for more info). You can use this extension point by passing extensions to the dev-approuter's start() method:

const devApprouter = require("dev-approuter/lib/devApprouter");
devApprouter.start([
    {
        insertMiddleware: {
            first: [
                {
                    path: "/my-ext",
                    handler: (req, res, next) => {
                        res.end("Request handled by my extension!")
                    }
                }
            ]
        }
    }
]);

Support

Please use the GitHub bug tracking system to post questions, bug reports or to create pull requests.

Contributing

Any type of contribution (code contributions, pull requests, issues) to this set of UI5 CLI extensions will be equally appreciated.

License

This work is licensed under Apache 2.0.

Built with care (and a lot of caffeine). If this helped you build, test, or ship, the next coffee — or drink — is on you when you bump into a contributor.

Apache-2.0, read

History

Latest

v0.7.2

Fixes 1

Notes
Patch Changes
  • #1388 aede5b6 Thanks @petermuessig! - fix(dev-approuter): drop stale engines.node: ">=18" declaration

    The package declared engines.node: ">=18", but its @sap/approuter@22 dependency actually requires ^22.0.0 || ^24.0.0. The declaration was therefore misleading — npm install on Node 18 would have looked allowed by dev-approuter itself but failed (or at least warned) on the transitive @sap/approuter constraint.

    Removing the field aligns dev-approuter with every other publishable package in the monorepo (none declare engines) and lets the effective Node.js floor be correctly inherited from @sap/approuter. See DEPENDENCIES.md for the audit details.

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

  1. v0.7.1

    Notes

    Note: Version bump only for package dev-approuter

  2. v0.7.0

    Features 1

    Notes
    Features
  3. v0.6.3

    Notes

    Note: Version bump only for package dev-approuter

  4. v0.6.2

    Notes

    Note: Version bump only for package dev-approuter

  5. v0.6.1

    Notes

    Note: Version bump only for package dev-approuter

  6. v0.6.0

    Features 1

    Notes
    Features
  7. v0.5.12

    Notes

    Note: Version bump only for package dev-approuter

  8. v0.5.11

    Notes

    Note: Version bump only for package dev-approuter

  9. v0.5.10

    Notes

    Note: Version bump only for package dev-approuter

  10. v0.5.9

    Notes

    Note: Version bump only for package dev-approuter

  11. v0.5.8

    Notes

    Note: Version bump only for package dev-approuter

  12. v0.5.7

    Notes

    Note: Version bump only for package dev-approuter

  13. v0.5.6

    Fixes 1

    Notes
    Bug Fixes
  14. v0.5.5

    Notes

    Note: Version bump only for package dev-approuter

  15. v0.5.4

    Notes

    Note: Version bump only for package dev-approuter

  16. v0.5.3

    Notes

    Note: Version bump only for package dev-approuter

  17. v0.5.2

    Fixes 1

    Notes
    Bug Fixes
    • dev-approuter: switch to custom logger to avoid loading cds.env … (#1211) (9327c0a)
  18. v0.5.1

    Notes

    Note: Version bump only for package dev-approuter

  19. v0.5.0

    Features 1

    Notes
    Features
  20. v0.4.0

    Features 1

    Notes
    Features
    • dev-approuter: add custom /my-jwt route for debugging auth(n,z) (#1134) (3e7b72b), closes #1133
  21. v0.3.4

    Notes

    Note: Version bump only for package dev-approuter

  22. v0.3.3

    Notes

    Note: Version bump only for package dev-approuter

  23. v0.3.2

    Fixes 1

    Notes
    Bug Fixes
  24. v0.3.1

    Notes

    Note: Version bump only for package dev-approuter

  25. v0.3.0

    Features 1

    Notes
    Features
    • enhanced v4 compat + update dependencies (#1070) (2d7ed16)
  26. v0.2.27

    Notes

    Note: Version bump only for package dev-approuter

  27. v0.2.26

    Notes

    Note: Version bump only for package dev-approuter

  28. v0.2.25

    Notes

    Note: Version bump only for package dev-approuter

  29. v0.2.24

    Notes

    Note: Version bump only for package dev-approuter

  30. v0.2.23

    Notes

    Note: Version bump only for package dev-approuter

  31. v0.2.22

    Notes

    Note: Version bump only for package dev-approuter

  32. v0.2.21

    Notes

    Note: Version bump only for package dev-approuter

  33. v0.2.20

    Notes

    Note: Version bump only for package dev-approuter

  34. v0.2.19

    Notes

    Note: Version bump only for package dev-approuter

  35. v0.2.18

    Notes

    Note: Version bump only for package dev-approuter

  36. v0.2.17

    Notes

    Note: Version bump only for package dev-approuter

  37. v0.2.16

    Fixes 1

    Notes
    Bug Fixes
    • cleanup of dependencies and improved approuter logic (#984) (65ffaed)
  38. v0.2.15

    Notes

    Note: Version bump only for package dev-approuter

  39. v0.2.14

    Notes

    Note: Version bump only for package dev-approuter

  40. v0.2.13

    Notes

    Note: Version bump only for package dev-approuter

  41. v0.2.12

    Notes

    Note: Version bump only for package dev-approuter

  42. v0.2.11

    Notes

    Note: Version bump only for package dev-approuter

  43. v0.2.10

    Notes

    Note: Version bump only for package dev-approuter

  44. v0.2.9

    Notes

    Note: Version bump only for package dev-approuter

  45. v0.2.8

    Notes

    Note: Version bump only for package dev-approuter

  46. v0.2.7

    Notes

    Note: Version bump only for package dev-approuter

  47. v0.2.6

    Notes

    Note: Version bump only for package dev-approuter

  48. v0.2.5

    Notes

    Note: Version bump only for package dev-approuter

  49. v0.2.4

    Notes

    Note: Version bump only for package dev-approuter

  50. v0.2.3

    Notes

    Note: Version bump only for package dev-approuter

  51. v0.2.2

    Fixes 1

    Notes
    Bug Fixes
    • dev-approuter: fix detection of cds local apps (#873) (ad56ba8)
  52. v0.2.1

    Fixes 1

    Notes
    Bug Fixes
    • dev-approuter: consider the UI5 middleware config (#872) (e724aee)
  53. v0.2.0

    Features 1

    Notes
    Features
    • ui5-middleware-cap: wrap @sap/cds/bin/serve command (#869) (541e6e6)
  54. v0.1.22

    Notes

    Note: Version bump only for package dev-approuter

  55. v0.1.21

    Notes

    Note: Version bump only for package dev-approuter

  56. v0.1.20

    Notes

    Note: Version bump only for package dev-approuter

  57. v0.1.19

    Notes

    Note: Version bump only for package dev-approuter

  58. v0.1.18

    Fixes 1

    Notes
    Bug Fixes
    • prevent side-effects for combined scenarios (#842) (36aaa5f)
  59. v0.1.17

    Notes

    Note: Version bump only for package dev-approuter

  60. v0.1.16

    Notes

    Note: Version bump only for package dev-approuter

  61. v0.1.15

    Notes

    Note: Version bump only for package dev-approuter

  62. v0.1.14

    Notes

    Note: Version bump only for package dev-approuter

  63. v0.1.13

    Notes

    Note: Version bump only for package dev-approuter

  64. v0.1.12

    Notes

    Note: Version bump only for package dev-approuter

  65. v0.1.11

    Notes

    Note: Version bump only for package dev-approuter

  66. v0.1.10

    Fixes 1

    Notes
    Bug Fixes
    • cds-plugin-ui5: allow relative config files in package.json (#838) (735b24d)
  67. v0.1.9

    Notes

    Note: Version bump only for package dev-approuter

  68. v0.1.8

    Notes

    Note: Version bump only for package dev-approuter

  69. v0.1.7

    Notes

    Note: Version bump only for package dev-approuter

  70. v0.1.6

    Fixes 1

    Notes
    Bug Fixes
    • cap endpoint detection, dev-approuter showcase (#827) (c3abb2a), closes #826
  71. v0.1.5

    Notes

    Note: Version bump only for package dev-approuter

  72. v0.1.4

    Notes

    Note: Version bump only for package dev-approuter

  73. v0.1.3

    Notes

    Note: Version bump only for package dev-approuter

  74. v0.1.2

    Fixes 1

    Notes
    Bug Fixes
    • dev-approuter: make CAP projects work without reference in xs-dev.json (#809) (d52a432)
  75. v0.1.1

    Fixes 1

    Notes
    Bug Fixes
    • dev-approuter: add missing require('fs') (#808) (0793907)
  76. v0.1.0

    Features 1

    Notes
    Features
19downloads per week, npm
Weekly downloads for dev-approuter26 complete calendar weeks from 2026-04-20 to 2026-10-18; the latest total is 19.20 Apr – 26 Apr: 9927 Apr – 3 May: 964 May – 10 May: 6711 May – 17 May: 30218 May – 24 May: 22725 May – 31 May: 1541 Jun – 7 Jun: 568 Jun – 14 Jun: 4115 Jun – 21 Jun: 26522 Jun – 28 Jun: 11729 Jun – 5 Jul: 1846 Jul – 12 Jul: 6013 Jul – 19 Jul: 5020 Jul – 26 Jul: 10227 Jul – 2 Aug: 173 Aug – 9 Aug: 10910 Aug – 16 Aug: 11417 Aug – 23 Aug: 1924 Aug – 30 Aug: 3331 Aug – 6 Sept: 1407 Sept – 13 Sept: 10314 Sept – 20 Sept: 4221 Sept – 27 Sept: 3928 Sept – 4 Oct: 375 Oct – 11 Oct: 12812 Oct – 18 Oct: 19
Local development
  1. abap2UI5 PlaygroundIn-browser ABAP editor beside the abap2UI5 app it buildsfrom ABAP
  2. web-abap2UI5abap2UI5 transpiled to JavaScript and run in a browser tabfrom ABAP
  3. vite-plugin-cdsServes a Vite app through cds watch and imports .cds filesfrom CAP
  4. com.sap.cds:cds-feature-dev-dashboardBrowser dashboard for a running CAP Java service during developmentfrom CAP
  5. com.sap.cds:cds-maven-pluginMaven plugin running CDS build steps in a CAP Java projectfrom CAP
  6. @cap-js-community/commonSix CAP features in one package, from replication cache to rate limitsfrom CAP
  7. abap_trial_dockerScripts running the ABAP Developer Edition in Dockerfrom ABAP
  8. @neoimpulse/cap-js-bootstrapCLI starting several CAP services and an AppRouter locally togetherfrom CAP
  9. open-steamgateLocal ABAP server serving /IWBEP/ OData v2 without an SAP systemfrom ABAP
  10. pokrakam/abapDevSysInitABAP report setting up a new ABAP Developer Edition or trial systemfrom ABAP
  11. @sang2x/captoolsCLI of CAP development tools for Cloud Foundry workflowsfrom CAP
  12. @sap/ams-devCompiler from AMS DCL policies to DCN for local runs and testsfrom CAP
  13. @sap/cds-dkCommand line client and development toolkit for CAPfrom CAP
  14. @sap/cdsCAP Node.js runtimefrom CAP

Details

Sources4
Added by handdiscovered herechecked
npm registry, dev-approuterversion, releases, installschecked
github.com/https://github.com/ui5-community/ui5-ecosystem-showcase.gittree, pushes, contributors, CIchecked
packages/dev-approuter/README.mdquoted, and what the entry declareschecked

Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.

Compatibility and provenance
latestv0.7.2
first release
releases and cadence77, ~28d median
discovered viaAdded by hand
first seen in the atlas
ecosystem and domaincap, developer-experience
Contributors4

From the repository’s contributor list, .

History in the atlas2
  1. local_stack_part: App Router
  2. First seen.
For your agent
Ref
artifact:ui5-community-dev-approuter
JSON
/artifacts/ui5-community-dev-approuter.json
MCP
Connecting an agent