https://github.com/cheqd/snapshots-ui
Lightweight front-end app for listing DigitalOcean Spaces object storage. Used to serve cheqd network snapshots
https://github.com/cheqd/snapshots-ui
cheqd cloudflare-pages cosmos-sdk digitalocean-spaces s3-buckets
Last synced: about 2 months ago
JSON representation
Lightweight front-end app for listing DigitalOcean Spaces object storage. Used to serve cheqd network snapshots
- Host: GitHub
- URL: https://github.com/cheqd/snapshots-ui
- Owner: cheqd
- License: apache-2.0
- Created: 2022-03-02T14:48:55.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-11-24T14:58:46.000Z (over 1 year ago)
- Last Synced: 2025-02-14T17:58:11.589Z (3 months ago)
- Topics: cheqd, cloudflare-pages, cosmos-sdk, digitalocean-spaces, s3-buckets
- Language: HTML
- Homepage: https://snapshots.cheqd.net
- Size: 34.2 KB
- Stars: 1
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# Snapshots Explorer for cheqd networks
Simple browser-based app to display contents of an S3-compatible object storage bucket. Used for [snapshots.cheqd.net](https://snapshots.cheqd.net).
This repo is forked from [awslabs/aws-js-s3-explorer](https://github.com/awslabs/aws-js-s3-explorer) to utilise [DigitalOcean's Spaces object-storage offering](https://www.digitalocean.com/products/spaces) instead of AWS S3.
## Usage
To retarget this repo to a different DigitalOcean Spaces storage, change the following lines to your own endpoint using the examples below.
Line 185:
```javascript
var endpoint = 'nyc1.cdn.digitaloceanspaces.com'
```Line 482:
```javascript
AWS.config.region = 'nyc1';
```Line 658-659:
```javascript
s3exp_config.Bucket = '';
s3exp_config.Region = 'nyc1';
```## Deploy
The [snapshots.cheqd.net](snapshots.cheqd.net) microsite is auto-deployed using [Cloudflare Pages](https://developers.cloudflare.com/pages/platform/github-integration) using its GitHub integration. No configuration is required besides connecting your repository to Cloudflare.
### CORS Settings
CORS settings need to be specified to allow the file explorer front-end to fetch and list file details.
These steps assume that the deployment has been done to Cloudflare Pages. Follow [DigitalOcean's guide on defining CORS settings](https://docs.digitalocean.com/products/spaces/how-to/configure-cors/) to set the following:
1. **Origin** to `https://.pages.dev`
2. **Allowed Methods** to `GET` and `HEAD`
3. **Allowed Headers** to `*`
4. (optional )**Access Control Max Age** to 7200