https://github.com/pwrdrvr/microapps-app-release
MicroApps - Release App - Built on Next.js, Deployed with CDK and MicroApps
https://github.com/pwrdrvr/microapps-app-release
aws-lambda cdk microapps nextjs
Last synced: 8 months ago
JSON representation
MicroApps - Release App - Built on Next.js, Deployed with CDK and MicroApps
- Host: GitHub
- URL: https://github.com/pwrdrvr/microapps-app-release
- Owner: pwrdrvr
- License: mit
- Created: 2021-02-27T18:50:38.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-07-20T06:45:11.000Z (almost 2 years ago)
- Last Synced: 2024-10-07T04:42:08.097Z (9 months ago)
- Topics: aws-lambda, cdk, microapps, nextjs
- Language: TypeScript
- Homepage: https://apps.ghpublic.pwrdrvr.com/release
- Size: 12.1 MB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
  
# Overview
Example / basic Next.js-based Release app for the [MicroApps framework](https://github.com/pwrdrvr/microapps-core).
# Table of Contents
- [Overview](#overview)
- [Screenshot](#screenshot)
- [Try the App](#try-the-app)
- [Video Preview of the App](#video-preview-of-the-app)
- [Functionality](#functionality)
- [Installation](#installation)
- [Installation of CDK Construct](#installation-of-cdk-construct)
- [Node.js TypeScript/JavaScript](#nodejs-typescriptjavascript)
- [Add the Construct to your CDK Stack](#add-the-construct-to-your-cdk-stack)# Screenshot

# Try the App
[Launch the App](https://dukw9jtyq2dwo.cloudfront.net/prefix/release/)
# Video Preview of the App

# Functionality
- Lists all deployed applications
- Shows all versions and rules per application
- Allows setting the `default` rule (pointer to version) for each application# Installation
Example CDK Stack that deploys `@pwrdrvr/microapps-app-release`:
- [Deploying the MicroAppsAppRelease CDK Construct on the MicroApps CDK Construct](https://github.com/pwrdrvr/microapps-core/blob/main/packages/cdk/lib/MicroApps.ts#L260-L267)The application is intended to be deployed upon the [MicroApps framework](https://github.com/pwrdrvr/microapps-core) 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.
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 available for TypeScript, DotNet, Java, and Python with docs and install instructions available on [@pwrdrvr/microapps-app-release-cdk - Construct Hub](https://constructs.dev/packages/@pwrdrvr/microapps-app-release-cdk).
## Installation of CDK Construct
### Node.js TypeScript/JavaScript
```sh
npm i --save-dev @pwrdrvr/microapps-app-release-cdk
```## Add the Construct to your CDK Stack
See [cdk-stack](packages/cdk-stack/lib/svcs.ts) for a complete example used to deploy this app for PR builds.
```typescript
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,
});
```