Skip to content

About

MicroApps - Release App - Built on Next.js, Deployed with CDK and MicroApps

Topics

Resources

Contributing

Security policy

Stars

2 stars

Watchers

2 watching

Forks

Latest commit

 

History

417 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build/Deploy CI JSII Build Release

Overview

Example / basic Next.js-based Release app for the MicroApps framework.

Repo development uses Node 24 and pnpm. See CONTRIBUTING.md for local setup and common commands.

Table of Contents

Screenshot

Release console showing the versions and rules for the release app

Try the App

Launch the App (no login needed)

Video Preview of the App

Animated walkthrough of the release console

Functionality

  • Lists all deployed applications, with a badge on any app that has a newer release than its live default
  • Shows all versions and rules per application, and each version's position relative to the live default
  • Hides PR and other prerelease builds by default (toggle Releases / All)
  • Provides preview links for each version, so a version can be checked before it is made live
  • Allows promoting a version, or rolling back, by changing the default rule (pointer to version) for each application
  • Asks for confirmation before changing the default, detects conflicting concurrent changes, and offers a one-click revert

Installation

Example CDK Stack that deploys @pwrdrvr/microapps-app-release:

The application is intended to be deployed upon the MicroApps framework and it operates on a DynamoDB Table created by the MicroApps framework. Thus, it is required that there be a deployment of MicroApps that can receive this application. Deploying the MicroApps framework and general application deployment instructions are covered by the MicroApps documentation.

Important: this version of the release console updates routing state through POST requests on versioned /api/ paths. If you are deploying on a custom MicroApps CloudFront configuration, make sure those versioned /api/ routes are forwarded to the app origin with POST allowed. Otherwise dotted versions such as 0.0.0-pr.106 can be picked up by the static-file behavior and CloudFront will reject the request before it reaches the app. If you are using MicroApps 1.2.0 or newer, API route behaviors are enabled by default and no custom override should be needed.

The application is packaged for deployment via AWS CDK and consists of a single Lambda function that reads/writes the MicroApps DynamoDB Table.

The CDK construct is published for JavaScript and TypeScript via npm, with API docs available on @pwrdrvr/microapps-app-release-cdk - Construct Hub.

Installation of CDK Construct

Node.js TypeScript/JavaScript

npm i --save-dev @pwrdrvr/microapps-app-release-cdk

Add the Construct to your CDK Stack

See cdk-stack for a complete example used to deploy this app for PR builds.

import { MicroAppsAppRelease } from '@pwrdrvr/microapps-app-release-cdk';

const app = new MicroAppsAppRelease(this, 'app', {
  functionName: `microapps-app-${appName}${shared.envSuffix}${shared.prSuffix}`,
  table: dynamodb.Table.fromTableName(this, 'apps-table', shared.tableName),
  nodeEnv: shared.env as Env,
  removalPolicy: shared.isPR ? RemovalPolicy.DESTROY : RemovalPolicy.RETAIN,
});

About

MicroApps - Release App - Built on Next.js, Deployed with CDK and MicroApps

Topics

Resources

Contributing

Security policy

Stars

2 stars

Watchers

2 watching

Forks

Releases

Used by

Contributors

Languages