This is a LocalStack Pro - GDC (generic dev container) blueprint. The same Pulumi pipelines deploying this solution to LocalStack can be used to deploy to AWS. It uses the GDC to provide a containerized development environment. The GDC runs LocalStack-Pro and an Auth0Mock. The GDC can be used with any IDE and works on Mac, Windows, Ubuntu.
Jump to Quickstart
Deploys system to AWS with backend and frontend. Some extra features like RDS and some UI features are stubbed out. This project has a API Gateway (APIGW) REST endpoint, and an APIGW WebSocket (WS) endpoint. Auth is provided by Auth0Mock. The UI is Vue.js+tailwind hosted in CloudFront (when deployed to AWS).
There is a lot that can be done with this blueprint. This is a functional E2E starting point.
The UI has two parts, a public side, and a private portal. The public side is minimal, but this is where you could host your public content and then let users login to the auth-protected private portal.
Click on the button text to enter the protected portal.
The username and password are populated for you. You can see them in users-local.json. The default username and password are configured in .env-gdc.
Once you're logged in, the light and dark mode selection is the popover in the upper right hand corner. The other buttons in the popover do nothing. Logout is in the lower left hand corner. All of these screen snaps are in dark mode.
This project uses an adjacency model to store users and s3item documents in DynamoDB. The actual files are sore
Open the model to upload files to S3Storage.
Upload files to a protected private bucket using presigned S3 URLs. This is a multi-file upload modal. You can drop many files in at once. The first upload will take some time (a few extra seconds) as the Lambda ColdStarts in LocalStack will take a few seconds. The subseqeunt uploads are very fast as long as the Lambdas haven't timed out and you're back at another cold start.
Then your files will appear in your file list. You may have to refresh no your very first upload. See Known Issues.
Hovering on a file line shows the menu for that item. You can delete it here. First delete is longer (ColdStart).
You can add tags/labels to files.
Double-clicking on a file will open a S3File detail page. This page does nothing at this time.
After the kinesis_mock_server
times out, the DynamoDB Stream handler Lambda will never get triggered again. And all WS messages stop flowing from the backend. Restart of the GDC and LocalStack is required at this point.
This only happens when the system sits idle for awhile, not sure how long. Ref: LocalStack Issue 5182
-
GDC install.
-
Follow GDC Setup instructions. (Install DockerDesktop)
-
Clone this repos
-
Create a file called
.env-gdc-local
in the root of this repo. Put your Localstack Pro key in it like this
export LOCALSTACK_API_KEY=YOUR_KEY_HERE
- Start GDC
# from the root of the cloned repo
~/<gdc dir>/run-dev-container.sh
- Deploy the system to Localstack
# Open GDC shell
docker exec -it lsgdc-dev-1 bash -l
# Deploy 3 pulumi pipelines
make local-toplevel-deploy
make local-db-deploy
make local-lsgdc-deploy
# Or the command below will run all of the above
make it-again
- Run UI
# Open GDC shell
docker exec -it lsgdc-dev-1 bash -l
# run the UI locally
make local-lsgdc-run-ui
- Login to UI Navigate to http://localhost:3030/
Everything is done from inside the GDC shell.
- Open GDC shell
docker exec -it lsgdc-dev-1 bash -l
- Create Python virtual env You only have to do this once.
make setup-venv
- Run tests
# Run a hard-coded test
make local-lsgdc-test-tags
The work here is collaborative and made possible by many contributions.