Static assets — image gallery and URLs
Brand logos, the app icon, the 3D energy-flow illustrations and the product images used by the Flutter app and the admin console. Click any image to open it with its URL and a copy button, or use the copy icon on the card.
brand/ 3



energy3d/ 16
















icon/ 1
products/ 18


















How they are hosted
| Source of truth | cse-http-be/assets/<folder>/<file> (committed to the repo) |
| Stack | cse-http-be-dev-assets — its own CDK app, bin/assets.ts |
| Storage | Private S3 bucket: Block Public Access on, no ACLs, SSE-S3 at rest, TLS-only bucket policy, versioned (old versions kept 30 days) |
| Delivery | CloudFront with Origin Access Control — CloudFront signs every request to S3 with SigV4, and the bucket only accepts requests signed for this distribution. Direct S3 URLs return 403. |
| Viewer rules | HTTPS only (HTTP redirects), GET/HEAD only, CORS * for read (Flutter web needs it), HSTS, nosniff |
| Caching | Cache-Control: public, max-age=86400; every deploy invalidates /* at the edge |
| URL format | <AssetsBaseUrl>/<folder>/<file>, e.g. <AssetsBaseUrl>/products/nexus_hybrid.png |
The assets are public read through CloudFront (anyone with the URL can fetch the image). They are not signed URLs: a signed URL expires, which would break any URL baked into an APK. Only put files here that are fine to be public.
URLs stay the same across redeploys
- The object key is exactly the file's path under
assets/, with no content hash, so re-uploading a file keeps its URL. - Uploads never delete (
prune: false): removing a file from the repo leaves the old object in S3, so URLs already shipped keep working. - The bucket and the distribution are
RETAINed — deleting the stack keeps both, so the CloudFront domain doesn't change. - To replace an image, overwrite the file with the same name and redeploy. To publish a new image, add a new file — never rename an existing one that's already in use.
Adding or updating assets
# in cse-http-be
cp ~/new-image.png assets/products/
npm run deploy:assets
deploy:assets runs cdk deploy for the assets app only (dev; it never
touches the API stacks) and then npm run assets:manifest, which rewrites
http-docs/guides/_static-assets/manifest.json in this repo with the live
URLs. Rebuild/redeploy the docs site afterwards so the gallery updates.
Other commands:
npm run synth:assets # synth only, into cdk.out.assets/
npm run assets:manifest # regenerate the docs manifest from cdk.out.assets/outputs.json
The first deploy creates IAM roles (the CDK upload handler), so CDK asks you
to approve the security changes — answer y.
Cost
38 files / ~5.4 MB. S3 storage is a fraction of a cent per month. CloudFront
data transfer and requests fall inside the always-free tier (1 TB and 10M
requests per month) at current scale. Each deploy does one /* invalidation
(the first 1,000 paths per month are free). PriceClass_100 (the cheapest
edge set) is used.