Skip to content

feat(frontend): replace v1 with the redesigned PWA - #6

Merged
gustmrg merged 4 commits into
mainfrom
refactor/frontend-v2
Jul 24, 2026
Merged

feat(frontend): replace v1 with the redesigned PWA#6
gustmrg merged 4 commits into
mainfrom
refactor/frontend-v2

Conversation

@gustmrg

@gustmrg gustmrg commented Jul 24, 2026

Copy link
Copy Markdown
Owner

What changed

  • Replaced the previous apps/frontend application with the redesigned frontend.
  • Removed the separate apps/frontend-v2 source and workflows.
  • Renamed the frontend package to bitfinance-frontend and set version 2.0.0.
  • Added complete PWA support:
    • Root-scoped /sw.js
    • Automatic service-worker updates
    • Outdated Workbox cache cleanup
    • Application-shell and revisioned-asset precaching
    • Web app manifest and install icons
    • Apple touch icon and iOS standalone metadata
    • Explicit offline API error messaging
  • Consolidated frontend validation into one CI job.
  • Updated the canonical frontend/v* release workflow.
  • Changed production deployment to immutable versioned releases with an atomic current symlink.
  • Added a retained build artifact for rollback.
  • Updated canonical frontend, CORS, and notification URL examples.
  • Rewrote the frontend deployment, cutover, redirect, verification, and rollback documentation.

Why

This promotes the redesigned frontend to the canonical BitFinance application while preserving installable PWA behavior and allowing existing canonical-domain installations to update through the root service worker.

The new release structure also prevents stale Vite assets from remaining on the server and provides an immediate rollback path without rebuilding frontend v1.

Verification

  • pnpm install --frozen-lockfile
  • pnpm format:check
  • pnpm lint
  • pnpm build
  • Verified generated manifest fields and required icon sizes.
  • Verified root service-worker generation, cache cleanup, and SPA fallback configuration.
  • Verified that no API runtime caching strategy is present.
  • Verified direct navigation through the production preview server.
  • Validated GitHub Actions workflow YAML.
  • Ran git diff --check.

The build succeeds with one existing non-blocking Vite advisory about the main JavaScript chunk exceeding 500 kB.

Deployment notes

This PR requires one-time server preparation before pushing the release tag:

  • Capture the currently deployed v1 build as an immutable rollback release.
  • Create /var/www/bitfinance/current pointing to that v1 release.
  • Update the canonical Nginx root to /var/www/bitfinance/current.
  • Apply the documented service-worker cache headers.
  • Confirm deployment-directory ownership for the GitHub Actions SSH user.
  • Set the canonical production CORS and notification frontend URLs.
  • Validate and reload Nginx.

After server preparation and merge, deploy with:

git tag frontend/v2.0.0
git push origin frontend/v2.0.0
After validating the canonical deployment and installed-PWA update behavior, configure bitfinance-v2.gustavomiranda.dev as a permanent redirect to the canonical hostname.
Full operational instructions are in apps/frontend/docs/deployment.md.
Risks and rollback
The primary risk is the service-worker transition for users with an existing canonical-domain PWA installation.
Rollback does not require rebuilding v1. Switch /var/www/bitfinance/current back to the captured v1 release. If clients have already received the v2 worker, a forward-fix worker may be required to restore the old application shell safely.

@gustmrg
gustmrg merged commit 3d98ec1 into main Jul 24, 2026
4 checks passed
@gustmrg
gustmrg deleted the refactor/frontend-v2 branch July 24, 2026 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant