DLP Access Website: A Multi-Tenancy Serverless web application
A Multi-Tenant Serverless Website built with GraphQL, React, AWS Amplify, AWS AppSync, DynamoDB, Amazon Cognito and OpenSearch. This project is part of the Virginia Tech Digital Library Platform (VTDLP). We used this software to host several Virginia Tech University Libraries digital collections, see showcase below.
We also have a Live Demo site.
aws amplify create-branch --app-id=AmplifyAppId --branch-name=GitHubBranchName --backend-environment-arn=BackendEnvARN
aws amplify start-job --app-id=AmplifyAppId --branch-name=GitHubBranchName --job-type=RELEASE
aws amplify list-backend-environments --app-id=AmplifyAppId
Prerequisites
npm install -g @aws-amplify/cli
brew install yarn
Clone the repo
git clone git@github.com:VTUL/dlp-access.git
Change into the directory & install dependencies
cd dlp-access
npm install
Initialize the Amplify backend
amplify init
Push the application into your account
amplify push
public
We assign each site with a unique REACT_APP_REP_TYPE
.
As an example, the site of IAWA takes these settings below:
REACT_APP_REP_TYPE=IAWA
The site of Demo takes these settings below:
REACT_APP_REP_TYPE=Default
Variable | Description |
---|---|
REACT_APP_MINT_LINK | Mint service API URL |
REACT_APP_MINT_API_KEY | Mint service API key |
USER_DISABLE_TESTS | Enable/disable Amplify tests |
If deploying an instance of the Podcast Repository he site must be able to authenticate itself with the NOID minting servicein order to support creating Podcast episode records through the site admin interface. So two additional environment variables are required. The values to be assigned to these variables can be found in the AWS API Gateway console.
REACT_APP_REP_TYPE=podcasts
REACT_APP_MINT_LINK=https://<api id here>.execute-api.us-east-1.amazonaws.com/Prod/mint
REACT_APP_MINT_API_KEY=<your api key here>
We put custom static images (e.g., site cover image) and HTML files (e.g, about page) in a S3 bucket with Cloudfront setup.
See instruction and various site content examples below:
An end-to-end testing framework using Cypress.io has been setup for this project.
To test locally
REACT_APP_REP_TYPE=Default npm start
CYPRESS_password=<secret> CYPRESS_userPoolId=<your user pool Id> CYPRESS_clientId=<your user pool client Id> yarn run cypress open
Note: Environment varibles in the above command beginning with CYPRESS_
must be updated with your actual account valuesdevtest
. You can create this devtest
account through account creation page.If you’d like to tear down the project & delete all of the resources created by this project, you can run the following:
amplify delete
We have a 30 day release cycle (We do Sprints!). Please let us know if you encounter a bug by filing an issue. We appreciate all contributions.
If you are planning to contribute back bug-fixes, please do so without any further discussion.
If you plan to contribute new features, utility functions or extensions to the core, please first open an issue and discuss the feature with us.
To learn more about making a contribution, please see our Contribution page.
DLP Access Website is currently maintained by Lee Hunter, Yangkai Lin, and Astha Dhakal.