Migrate portfolio architecture to Astro SSG core#253
Merged
Conversation
Co-authored-by: Kiya Rose Ren-Miyakari <kiya.rose@sillylittle.tech>
Co-authored-by: Kiya Rose Ren-Miyakari <kiya.rose@sillylittle.tech>
Contributor
There was a problem hiding this comment.
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 updateuseRemoteDatato 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.
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
Agent-Logs-Url: https://github.com/SillyLittleTech/Portf/sessions/e0e67947-5d7c-4bdd-9aba-1aa674165a7b Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com>
kiyarose
added a commit
that referenced
this pull request
May 13, 2026
Agent-Logs-Url: https://github.com/SillyLittleTech/Portf/sessions/e0e67947-5d7c-4bdd-9aba-1aa674165a7b Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com>
Copilot AI
added a commit
that referenced
this pull request
May 13, 2026
Agent-Logs-Url: https://github.com/SillyLittleTech/Portf/sessions/e0e67947-5d7c-4bdd-9aba-1aa674165a7b Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com>
Agent-Logs-Url: https://github.com/SillyLittleTech/Portf/sessions/e0e67947-5d7c-4bdd-9aba-1aa674165a7b Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com>
Agent-Logs-Url: https://github.com/SillyLittleTech/Portf/sessions/e0e67947-5d7c-4bdd-9aba-1aa674165a7b Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com>
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>
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
/and/privacy-policy) and keeping React components as client-loaded islandsscripts/sync-remote-data.mjs) so remote mode works reliably in static hosting contextsVITE_REMOTE_DATA_URLis configured; remote-enabled failures show placeholder/error states instead of silently falling backValidation
npm run lintnpm run testnpm run buildCI=1 PORT=4174 npm run test:e2e(remote integration test skipped by default)VITE_REMOTE_DATA_URL="https://data.kiya.cat/data" npm run buildCI=1 PORT=4174 E2E_REMOTE_DATA_URL="https://data.kiya.cat/data" npx playwright test tests/remote-data.spec.tsRefs #249