Skip to content

refactor: unify Astro frontend, modular GAS backend, and deployment workflows#2

Merged
HeiTang merged 5 commits into
mainfrom
dev
May 17, 2026
Merged

refactor: unify Astro frontend, modular GAS backend, and deployment workflows#2
HeiTang merged 5 commits into
mainfrom
dev

Conversation

@HeiTang
Copy link
Copy Markdown
Owner

@HeiTang HeiTang commented May 17, 2026

Summary

This PR consolidates the recent ShortYou architecture work into main.

It replaces the legacy frontend with the Astro single-page flow, restructures the GAS backend into modular runtime components, and aligns deployment/configuration workflows across local and production environments.

Key changes

  • migrate the frontend to Astro and unify the product flow around /, /#alias, and /#t=<token>
  • remove the legacy invite flow and old static frontend assets
  • modularize the GAS backend into config, controller, repository, services, types, utils, and request entrypoints
  • rebuild the GAS runtime context per request so updated Script Properties are not reused from warm instances
  • centralize public site URL handling and env-aware frontend/GAS workflows
  • add GitHub Actions for Pages deployment and production health checks
  • refresh English and Traditional Chinese READMEs to match the current architecture and operations model

Notes

  • includes the cleanup commit that removes the outdated backend specification document
  • branch source: dev
  • target branch: main

@HeiTang HeiTang requested a review from Copilot May 17, 2026 17:11
@HeiTang HeiTang self-assigned this May 17, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR centralizes frontend site URL configuration, updates production URLs, adds production health checks, and refactors GAS runtime construction so backend config is reloaded per request.

Changes:

  • Replaces hard-coded frontend canonical/CNAME/robots URLs with env-derived site URL handling.
  • Adds production health-check scripts/workflows and updates deployment workflow inputs.
  • Rebuilds GAS backend runtime context per request and makes PUBLIC_SITE_URL required for capability links.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/layouts/BaseLayout.astro Derives canonical URL from Astro site config.
scripts/site-url.mjs Adds shared site URL normalization and artifact generation.
scripts/run-frontend.mjs Requires site URL env and writes frontend artifacts after build/preview.
scripts/check-production-health.mjs Adds live frontend/GAS production validation script.
README.md Updates public quick-start domain.
README.zh-TW.md Updates public quick-start domain in Traditional Chinese.
public/robots.txt Removes static robots file in favor of generated output.
public/CNAME Removes static CNAME in favor of generated output.
package.json Adds production health-check npm script.
gas/src/entrypoints.ts Rebuilds GAS runtime context on each entrypoint/admin call.
gas/src/config.ts Removes default public site URL and errors when missing for capability links.
docs/backend-spec.zh-TW.md Removes outdated backend specification document.
astro.config.mjs Uses env-derived site URL for Astro config.
.github/workflows/production-healthcheck.yml Adds scheduled/manual production health-check workflow.
.github/workflows/pages.yml Supplies site URL to frontend build and adds post-deploy health check.
.github/workflows/gas-cicd.yml Updates production deploy env validation and deploy/sync command.
.env.prod.example Updates production public site URL example.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/site-url.mjs Outdated
Comment thread scripts/run-frontend.mjs
Comment thread .github/workflows/gas-cicd.yml Outdated
Comment thread gas/src/entrypoints.ts Outdated
Comment thread gas/src/config.ts
Comment thread scripts/check-production-health.mjs Outdated
Comment thread scripts/run-frontend.mjs Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 17 out of 17 changed files in this pull request and generated 8 comments.

Comment thread gas/src/entrypoints.ts Outdated
Comment thread scripts/run-frontend.mjs Outdated
Comment thread .github/workflows/gas-cicd.yml
Comment thread .github/workflows/gas-cicd.yml Outdated
Comment thread scripts/site-url.mjs
Comment thread scripts/run-frontend.mjs
Comment thread scripts/check-production-health.mjs
Comment thread gas/src/config.ts
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@HeiTang HeiTang merged commit 29b6c76 into main May 17, 2026
8 of 10 checks passed
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.

2 participants