@forgeapp/sdk v0.2.1
Forge JavaScript SDK
Forge is a low code internal tooling platform built on top of Interval that allows developer to build internal tools that integrate directly with their APIs. Forge provides a JavaScript SDK to allow developers to quickly develop Forge apps.
Why choose Forge?
With Forge, all of the code for generating your web UIs lives within your app's codebase. Forge apps are just asynchronous functions that run in your service. Because these are just functions, you can access the complete power of your existing services. When you need to request input or display output, await
any of our I/O methods to present a form to the user and your script will pause execution until input is received.
Getting started
To get started with building your first Forge app, all you have to do is define an action. An Action represents a Forge app, which users can define inline or imported. Forge apps can run as a separate background process within your service or as a standalone service. You can get started and create a Forge app in just a few lines of code.
import { Forge } from '@forgeapp/sdk'
const forge = new Forge({
endpoint: 'wss://<YOUR FORGE SERVER WEBSOCKET URL>/websocket',
apiKey: '<YOUR API KEY>',
actions: {
refundCustomerOrder: async () => {
const orderID = await io.input.text('Order ID')
// import your existing function to refund order
return `Successfully refunded order ID: ${orderID}`
},
},
})
forge.listen()
Forge:
- Allows you create forge apps as code which integrates directly with your existing functions.
- Makes creating full-stack apps as easy as writing CLI scripts.
- Can scale from a handful of scripts to robust multi-user dashboards.
With Forge, you do not need to:
- Deploy and maintain additional endpoint and/or services to support your forge apps.
- Give Forge write access to your database or secrets (or give us any of your credentials, for that matter).
- Work in an external IDE. Integrate directly with your developer environment.