An open API service indexing awesome lists of open source software.

https://github.com/jpmorganchase/mosaic

https://mosaic-mosaic-dev-team.vercel.app
https://github.com/jpmorganchase/mosaic

jpmorgan

Last synced: 4 months ago
JSON representation

https://mosaic-mosaic-dev-team.vercel.app

Awesome Lists containing this project

README

          

# Mosaic

Mosaic is a **content aggregating, headless CMS solution** which can be ran with server side rendering (SSR) or as a statically generated site (SGS).

- Running with SSR enables you to publish updates in realtime, just by updating the originating source.
- Running as a SGS enables you to create an immutable snapshot of your content which will not update in realtime.

## How To Create Your Own Mosaic Site

To create a Mosaic site, we have created a simple command line generator.
Refer to [@jpmorganchase/mosaic-create-site](./packages/create-site/README.md)

## Serving A Dynamic, Server Side Rendered Site

To serve your site, pulling dynamic content in realtime and rendering with SSR

Create the required environment variables

```
> export MOSAIC_DOCS_CLONE_CREDENTIALS=":"
> yarn serve
```

## Serving a Statically Generated Site

A snapshot is an immutable copy of the content pulled from your configured data sources.

To create a snapshot of your content for serving as a SGS, you have 2 modes.

- `snapshot-file` mode, creates and stores snapshots as files within in this repo so you can deploy your site and content together
- `snapshot-s3` mode, pulls your snapshot from a remote S3 bucket and enables you to deploy site and content seperately

### To create a snapshot of your content

```
> export MOSAIC_DOCS_CLONE_CREDENTIALS=":"
> yarn gen:snapshot
```

This will create a snapshot in `packages/site/public/snapshots/latest`.

### To upload your snapshot to an S3 bucket

```
> export MOSAIC_S3_ACCESS_KEY_ID=""
> export MOSAIC_S3_SECRET_ACCESS_KEY=""
> export MOSAIC_S3_REGION=""
> export MOSAIC_S3_BUCKET=""
> yarn mosaic upload -S
```

### To serve from local snapshot

`yarn serve:snapshot:file`

### To serve from an S3 bucket

`yarn serve:snapshot:s3`