Skip to content

Migrate portfolio architecture to Astro SSG core#253

Merged
kiyarose merged 11 commits into
mainfrom
cursor/astro-ssg-rework-280b
May 13, 2026
Merged

Migrate portfolio architecture to Astro SSG core#253
kiyarose merged 11 commits into
mainfrom
cursor/astro-ssg-rework-280b

Conversation

@kiyarose

@kiyarose kiyarose commented May 13, 2026

Copy link
Copy Markdown
Member

Summary

  • migrate hosting/build system from Vite entrypoint architecture to Astro static routes while preserving the existing React section layout and interaction flow
  • simplify routing by moving page-level routes to Astro (/ and /privacy-policy) and keeping React components as client-loaded islands
  • replace fragile browser cross-origin remote fetching with build-time remote JSON sync (scripts/sync-remote-data.mjs) so remote mode works reliably in static hosting contexts
  • enforce fallback behavior so local content is used only when no VITE_REMOTE_DATA_URL is configured; remote-enabled failures show placeholder/error states instead of silently falling back
  • improve test reliability by separating Vitest and Playwright discovery, adding optional remote integration e2e coverage, and fixing theme persistence timing during reloads
  • modernize docs across repo root and major source areas to improve editability for sections, colors, languages, icons, and deploy targets
  • update CI/workflow references for Astro builds and security header parity checks

Validation

  • npm run lint
  • npm run test
  • npm run build
  • CI=1 PORT=4174 npm run test:e2e (remote integration test skipped by default)
  • VITE_REMOTE_DATA_URL="https://data.kiya.cat/data" npm run build
  • CI=1 PORT=4174 E2E_REMOTE_DATA_URL="https://data.kiya.cat/data" npx playwright test tests/remote-data.spec.ts

Refs #249

Open in Web Open in Cursor 

Co-authored-by: Kiya Rose Ren-Miyakari <kiya.rose@sillylittle.tech>
@github-actions github-actions Bot added enhancement New feature or request help wanted Extra attention is needed source issue an issue with the source portfolio that will need to be fixed recursivly labels May 13, 2026
Co-authored-by: Kiya Rose Ren-Miyakari <kiya.rose@sillylittle.tech>
@kiyarose kiyarose linked an issue May 13, 2026 that may be closed by this pull request
@kiyarose kiyarose self-assigned this May 13, 2026
@kiyarose
kiyarose requested a review from Copilot May 13, 2026 04:51
@kiyarose
kiyarose marked this pull request as ready for review May 13, 2026 04:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 migrates the portfolio from a Vite SPA entrypoint to an Astro static-site architecture, keeping the existing React section composition as client-hydrated islands while moving page routing to src/pages/*. It also changes remote data from runtime cross-origin fetching to build-time JSON snapshot syncing so remote mode works on static hosting.

Changes:

  • Replace the Vite SPA/router setup with Astro routes (/ and /privacy-policy) that hydrate React apps via islands.
  • Add build-time remote JSON syncing (scripts/sync-remote-data.mjs) and update useRemoteData to read same-origin snapshots.
  • Split unit vs e2e testing discovery (Vitest config + Playwright testDir), and update docs/workflows for the new build system.

Reviewed changes

Copilot reviewed 47 out of 51 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
wrangler.toml Updates Cloudflare Pages build command to use the new Astro build.
vitest.config.ts Adds Vitest configuration to scope unit test discovery to src/**/*.test.*.
vite.config.ts Removes Vite build configuration (multi-page inputs, header middleware, asset copying).
tsconfig.node.json Removes Vite-node TS project config.
tsconfig.json Switches TS config to Astro strict preset and includes Astro/tests sources.
tsconfig.app.json Removes legacy Vite app TS project config.
tests/remote-data.spec.ts Adds optional Playwright integration coverage for remote-data loading.
tests/README.md Documents Playwright vs Vitest usage and optional remote-data testing.
src/views/PrivacyPolicyPage.tsx Minor formatting changes to privacy policy content.
src/utils/README.md Updates utilities documentation to reflect current module responsibilities.
src/utils/navigation.ts Adjusts navigation to full-page navigation and updates base-path guidance.
src/README.md Documents new Astro + React source structure and editing flow.
src/providers/ThemeProvider.tsx Persists theme immediately on toggle to survive rapid reloads.
src/providers/LanguageProvider.tsx Renames localStorage key to a template-prefixed namespace.
src/pages/privacy-policy.astro Adds Astro route for /privacy-policy that hydrates React app.
src/pages/index.astro Adds Astro route for / that hydrates the React home app.
src/main.tsx Removes Vite SPA entrypoint bootstrap.
src/layouts/BaseLayout.astro Introduces Astro HTML shell and early theme bootstrapping.
src/hooks/useRemoteData.ts Updates remote-data behavior to be opt-in and fetch same-origin snapshots.
src/hooks/useRemoteData.test.ts Adds unit tests for remote URL normalization helper.
src/env.d.ts Adds Astro client type references.
src/data/socials.ts Populates template fallback socials.
src/data/skills.ts Populates template fallback skills.
src/data/README.md Rewrites data docs around local fallbacks + build-time remote sync contract.
src/data/projects.ts Populates template fallback projects.
src/data/experience.ts Populates template fallback experience entries.
src/data/education.ts Populates template fallback education entries.
src/data/certifications.ts Populates template fallback certifications.
src/components/PrivacyPolicyApp.tsx New React “app wrapper” for privacy policy route with providers/boundary.
src/components/HomeApp.tsx New React “app wrapper” for home route with providers/boundary.
src/AppRouter.tsx Removes client-side router (routing now owned by Astro).
src/App.tsx Updates displayed name placeholder for template usage.
security-headers.config.ts Updates documentation comment to reflect new parity-check mechanism.
scripts/verify-security-headers.mjs Removes Vite-specific checks; validates master config and parity files.
scripts/sync-remote-data.mjs Adds build-time sync of remote JSON resources into public/__remote-data.
README.md Updates repo docs for Astro architecture, routing, data sync, and deployment.
public/_redirects Removes SPA routing redirects (Astro emits static routes).
playwright.config.ts Sets Playwright testDir to avoid cross-runner test discovery issues.
package.json Updates scripts/dependencies for Astro build, sync hooks, and test runners.
index.html Removes Vite root HTML entrypoint.
astro.config.mjs Adds Astro configuration, base-path handling, and Tailwind/Vite integration.
AGENTS.md Updates contributor guidance to reflect Astro routing/build workflow.
.lighthouserc.cjs Updates Lighthouse start command to use astro preview.
.gitignore Ignores Astro cache and generated public/__remote-data snapshots.
.github/workflows/security-headers-parity.yml Updates watched files/messages for Astro (instead of Vite).
.github/workflows/README.md Updates workflow docs to reference Astro config.
.github/workflows/pr-screenshot.yml Updates Playwright test file selection.
.github/workflows/github-pages.yml Updates base-path guidance/env var for Astro (BASE_PATH).
.github/workflows/codeql.yml Updates CodeQL path filters for Astro config and removed TS refs.
.github/copilot-instructions.md Updates internal guidance to match Astro + remote-data sync architecture.
Comments suppressed due to low confidence (1)

src/views/PrivacyPolicyPage.tsx:428

  • The intro sentence duplicates phrases ("interact with the contact form" / "engage with analytics services") after the <AdminHint> insertion, which reads as a copy/paste mistake. Please rewrite this paragraph so each clause appears once and the punctuation around the name placeholder is correct.

Comment thread src/hooks/useRemoteData.ts
Comment thread src/utils/navigation.ts
Comment thread src/layouts/BaseLayout.astro
Comment thread src/pages/index.astro
Comment thread package.json Outdated
Copilot AI and others added 4 commits May 13, 2026 01:04
Agent-Logs-Url: https://github.com/SillyLittleTech/Portf/sessions/347cdca7-8283-4c28-ad63-8d83605460cb

Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com>
Agent-Logs-Url: https://github.com/SillyLittleTech/Portf/sessions/347cdca7-8283-4c28-ad63-8d83605460cb

Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI added a commit that referenced this pull request May 13, 2026
kiyarose added a commit that referenced this pull request May 13, 2026
kiyarose added a commit that referenced this pull request May 13, 2026
Copilot AI added a commit that referenced this pull request May 13, 2026
kiyarose and others added 3 commits May 13, 2026 03:36
Issues lead to weird caching of the remote URL, and not respecting prefs
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@kiyarose
kiyarose merged commit d98c50a into main May 13, 2026
13 checks passed
@kiyarose
kiyarose deleted the cursor/astro-ssg-rework-280b branch May 13, 2026 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request help wanted Extra attention is needed source issue an issue with the source portfolio that will need to be fixed recursivly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feat: Major Rework of PortF

4 participants