2.0.1 • Published 3 months ago

@buttonize/cdk v2.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

Buttonize is a low-code paltform which enables cloud developers to create UI widgets like buttons, inputs, forms etc. connected to the cloud services like AWS Lambda, AWS Step Functions, AmazonDynamoDB and more.

This package contains AWS CDK constructs through which you can manage Buttonize widgets via Infrastructure as Code.

Getting started

Installation

TypeScript

$ npm i -D @buttonize/cdk

Python, Java, Go, .NET

Coming soon...

Example

You can find more examples in the examples folder.

import * as path from 'path'
import * as btnz from '@buttonize/cdk'
import * as cdk from 'aws-cdk-lib'
import * as lambda from 'aws-cdk-lib/aws-lambda'
import { NodejsFunction } from 'aws-cdk-lib/aws-lambda-nodejs'
import { Construct } from 'constructs'

export class SimpleFormStack extends cdk.Stack {
  constructor(scope: Construct, id: string, props?: cdk.StackProps) {
    super(scope, id, props)

    btnz.GlobalConfig.init(this, {
      apiKey: process.env.BUTTONIZE_API_KEY, // Ideally use SSM or Secrets Manager
      executionRoleExternalId: 'secret-external-id' // Ideally use SSM or Secrets Manager
    })

    const simpleFormActionLambda = new NodejsFunction(
      this,
      'SimpleFormActionLambda',
      {
        handler: 'handler',
        entry: path.join(__dirname, `/src/index.ts`),
        runtime: lambda.Runtime.NODEJS_18_X
      }
    )

    const form = new btnz.Form({
      name: '[Example: simple-form] Invoke the lambda function',
      label: 'Open form',
      tags: ['simple', 'button', 'example']
    })

    form
      .addTextField('email', {
        label: 'Email of the user',
        placeholder: 'user@example.com',
        regex: '^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$'
      })
      .addToggleField('isAdmin', {
        label: 'Is admin'
      })

    simpleFormActionLambda.addEventSource(form)
  }
}

Video Tutorial

Construct API Docs

Read more here.

Buttonize Docs

Learn more at docs.buttnoize.io


Join our community Discord | Twitter

3.0.0-beta.37

3 months ago

3.0.0-beta.36

3 months ago

3.0.0-beta.35

3 months ago

3.0.0-beta.33

3 months ago

3.0.0-beta.34

3 months ago

3.0.0-beta.32

3 months ago

3.0.0-beta.28

3 months ago

3.0.0-beta.29

3 months ago

3.0.0-beta.30

3 months ago

3.0.0-beta.31

3 months ago

3.0.0-beta.25

3 months ago

3.0.0-beta.26

3 months ago

3.0.0-beta.27

3 months ago

3.0.0-beta.23

4 months ago

3.0.0-beta.24

4 months ago

3.0.0-beta.22

4 months ago

3.0.0-beta.20

4 months ago

3.0.0-beta.21

4 months ago

3.0.0-beta.19

5 months ago

3.0.0-beta.18

5 months ago

3.0.0-beta.1

8 months ago

3.0.0-beta.3

8 months ago

3.0.0-beta.2

8 months ago

3.0.0-beta.5

8 months ago

3.0.0-beta.4

8 months ago

3.0.0-beta.7

8 months ago

3.0.0-beta.6

8 months ago

3.0.0-beta.9

8 months ago

3.0.0-beta.8

8 months ago

3.0.0-beta.10

8 months ago

3.0.0-beta.11

8 months ago

3.0.0-beta.12

8 months ago

3.0.0-beta.13

8 months ago

3.0.0-beta.14

8 months ago

3.0.0-beta.15

8 months ago

3.0.0-beta.16

8 months ago

3.0.0-beta.17

8 months ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.0.10

1 year ago

0.0.11

1 year ago

0.0.12

1 year ago

0.0.13

1 year ago

0.0.14

1 year ago

0.0.15

1 year ago

0.0.9

1 year ago

0.0.16

1 year ago

0.0.8

1 year ago

0.0.17

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago