perf: Core Web Vitals, CDN caching, indexer & compression (#706 #707 #708 #709)#756
Merged
Hexstar-labs merged 2 commits intoJun 29, 2026
Conversation
…rainTease#709 BrainTease#706 Core Web Vitals Optimisation - Fix CLS on courses page (stable min-height container for grid) - Fix CLS on profile page (skeleton loader, explicit avatar dimensions) - Add preconnect hints for API origin and avatar CDNs in layout - Harden lighthouserc.js CWV assertions from warn to error level - Add .github/workflows/lighthouse.yml CI gate BrainTease#707 HTTP Caching & CDN Strategy - Add CacheHeadersMiddleware (Cache-Control + ETag + 304 support) - Wire middleware globally in AppModule - Add docs/CDN_SETUP.md with full CDN strategy and hit-ratio guide BrainTease#708 Indexer & Event Query Performance - Rewrite stellar-indexer: batched processing (Promise.allSettled) - Add back-pressure (skip busy tick, exponential back-off) - Write lag metrics to cache after every poll - Cold-start fast-path (jump to latest ledger unless INDEXER_CATCHUP=true) BrainTease#709 API Response Compression & Payload Slimming - Add compression package, enable gzip/brotli in main.ts - Add SparseFieldsInterceptor for ?fields= sparse responses - Document payload reduction in README
|
@webthreejunkie-sudo Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements four performance issues in a single PR.
#706 — Core Web Vitals Optimisation
CourseGridin amin-h-[480px]container; fixed SVG icon with explicitwidth/height.<link rel="preconnect">for the API origin and avatar CDNs in the root layout.lighthouserc.jsfromwarn→error; added.github/workflows/lighthouse.yml.#707 — HTTP Caching & CDN Strategy
CacheHeadersMiddleware—Cache-Control(public+SWR for safe GETs, private for auth'd, no-store for mutations),ETag(SHA-1),304on matchingIf-None-Match.AppModule.docs/CDN_SETUP.md— header matrix, CloudFront/Cloudflare config, invalidation strategy, hit-ratio measurement.#708 — Indexer & Event Query Performance
Promise.allSettledin chunks of 10 — one bad event never blocks the rest.indexer:lag_ledgers+indexer:last_poll_mswritten to Redis after every poll.INDEXER_CATCHUP=truefor full historical replay).#709 — API Response Compression & Payload Slimming
compression@1.7.4added;app.use(compression({ threshold: 1024 }))inmain.ts(gzip/brotli, ≥ 1 KB).SparseFieldsInterceptor— global interceptor, trims responses to?fields=id,title,level,price.Files changed
.github/workflows/lighthouse.yml(new)apps/backend/package.jsonapps/backend/src/app.module.tsapps/backend/src/main.tsapps/backend/src/common/middleware/cache-headers.middleware.ts(new)apps/backend/src/common/interceptors/sparse-fields.interceptor.ts(new)apps/backend/src/stellar/stellar-indexer.service.tsapps/frontend/lighthouserc.jsapps/frontend/src/app/courses/page.tsxapps/frontend/src/app/layout.tsxapps/frontend/src/app/profile/page.tsxdocs/CDN_SETUP.md(new)README.mdcloses #706
closes #707
closes #708
closes #709