Skip to content

Refactor ShortYou into Astro single-page frontend with modular GAS backend#1

Merged
HeiTang merged 12 commits into
mainfrom
dev
May 16, 2026
Merged

Refactor ShortYou into Astro single-page frontend with modular GAS backend#1
HeiTang merged 12 commits into
mainfrom
dev

Conversation

@HeiTang
Copy link
Copy Markdown
Owner

@HeiTang HeiTang commented May 16, 2026

Summary

  • replace the legacy static frontend with an Astro single-page app that separates public resolve mode and authorized create mode
  • refactor the Google Apps Script backend into config, controller, repository, service, utility, and entrypoint modules
  • add env-aware frontend and GAS push/deploy workflows, runtime config bootstrap, and refreshed bilingual README documentation

What changed

  • add Astro/Tailwind frontend structure under src/ with shared layout/components and page scripts for alias resolution, create flow, and UI state
  • remove the legacy invite-page-based frontend flow and normalize public assets / static hosting layout
  • split the GAS implementation into focused TypeScript modules and stop tracking the old generated Code.js source layout
  • add wrapper scripts for frontend env loading and GAS push/deploy automation
  • update README.md and README.zh-TW.md to document the single-page architecture, commands, and deployment model

Notes for review

  • public lookup remains hash-based so the frontend can stay on static hosting
  • authorized create mode is now entered through /#t= on the same page instead of a separate invite page
  • there is an unstaged local change in docs/backend-spec.zh-TW.md that is intentionally not included in this PR

Verification

  • reviewed the branch diff against main
  • confirmed the PR source branch is dev and upstream is origin/dev
  • existing local uncommitted docs changes were left untouched to avoid mixing unfinished documentation into this PR

@HeiTang
Copy link
Copy Markdown
Owner Author

HeiTang commented May 16, 2026

@copilot please review this pull request for correctness, regressions, architecture issues, and test/documentation gaps. Focus on the Astro single-page frontend flow, the modularized Google Apps Script backend, and the env-aware deployment changes.

Copy link
Copy Markdown
Contributor

Copilot AI commented May 16, 2026

@copilot please review this pull request for correctness, regressions, architecture issues, and test/documentation gaps. Focus on the Astro single-page frontend flow, the modularized Google Apps Scrip...

Addressed in 2b20f66.

Review + fixes completed:

  • Fixed a frontend routing regression: entering /#t=<token> no longer rewrites the URL to /; it now preserves the current path/query so project-path/static-host deployments keep working.
  • Fixed Pages deployment gap: workflow now passes required frontend env vars (PUBLIC_API_URL, PUBLIC_TURNSTILE_SITE_KEY) from repo vars/secrets during build.
  • Expanded Pages workflow path triggers to include scripts/**, tailwind.config.mjs, and tsconfig.json so relevant build/deploy-impacting changes are not skipped.

Validation run:

  • npm run typecheck:gas
  • npm run build:gas
  • npm run check:gas
  • PUBLIC_API_URL=... PUBLIC_TURNSTILE_SITE_KEY=... npm run build:frontend
  • CodeQL check: 0 alerts.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • telemetry.astro.build
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/ShortYou/ShortYou/node_modules/.bin/astro build (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@HeiTang
Copy link
Copy Markdown
Owner Author

HeiTang commented May 16, 2026

@copilot I verified the latest head locally after 2b20f66: npm run typecheck:gas, npm run build:gas, npm run check:gas, and npm run build:frontend all passed. Please review the current PR head again and report only any remaining correctness, regression, architecture, or deployment blockers.

Copy link
Copy Markdown
Contributor

Copilot AI commented May 16, 2026

@copilot I verified the latest head locally after 2b20f66: npm run typecheck:gas, npm run build:gas, npm run check:gas, and npm run build:frontend all passed. Please review the current PR head...

Reviewed current head (2b20f66) again for blocker-level issues only.

I do not see any remaining correctness, regression, architecture, or deployment blockers at this time.

No additional code changes were needed.

@HeiTang HeiTang merged commit cf5d3a3 into main May 16, 2026
3 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