Commit Graph

17 Commits

Author SHA1 Message Date
Josh Creek ff29095c47 perf: fix slow page loads and gate performance in CI
- Ship one hashed Tailwind stylesheet instead of two (one render-blocking)
- Compress responses in-app (brotli/gzip, streaming-safe) and precompress
  the node build so local and CI measurements match production
- Validate the Supabase session once per request
- Render the homepage immediately and stream public stats
- Stream a Pokedex's entries with the page instead of fetching after
  hydration, running the rows and count queries in parallel
- Shrink the avatar and offline placeholder images, fix layout shift,
  contrast, link names and missing meta descriptions
- Add Lighthouse CI (mobile + desktop) with score and metric budgets,
  bundle-size budgets in the build tests, and signed-in speed scenarios
2026-09-14 20:53:53 +01:00
Josh Creek b7d2db4959 fix(auth): stop stale session cookies signing users out on refresh
@supabase/ssr 0.1.0 never removed the old unchunked session cookie once a
refreshed session grew past one cookie, and always read that stale copy
first. Every load then retried an already-used refresh token, which the
hosted auth server rejects, signing the user out.

Upgrade @supabase/ssr to 0.12 (and supabase-js to match) and move to the
getAll/setAll cookie API, which clears stale chunks when writing.
2026-09-14 16:19:20 +01:00
Josh Creek f2d8451c34 chore(deps): match Node engine range to sharp
sharp is now a runtime dependency and requires ^18.17.0 || ^20.3.0 || >=21.0.0.
2026-09-14 14:47:27 +01:00
Josh Creek 7240376e00 feat(pokedex): add shareable read-only dex links 2026-09-14 14:25:09 +01:00
Josh Creek de39dc78ea test: replace ad-hoc tests with a layered suite and CI workflow
Splits testing into five layers so a failure points at the responsible one:

- tests/unit    isolated utility, repository and service tests
- tests/data    validates the tracked Pokémon, game, region and dex files
- tests/integration  schema, views, constraints, RLS and repositories
- tests/bdd     executable Gherkin for user-visible behaviour
- tests/build   service worker and manifest artifacts per build variant

Replaces the two Playwright specs in client-test/ and the two Vitest files in
test/. Adds a GitHub Actions workflow running the layers as separate jobs, a
mock OAuth provider server so the Drive and Dropbox scenarios never touch real
accounts, and a wrapper that reads the local Supabase keys from
`supabase status` rather than hard-coding them.

Extracts the pure formatting helpers out of PokedexExportService so they can be
unit tested, and makes the provider endpoints configurable so the mock server
can stand in for Google and Dropbox.
2026-09-13 17:38:41 +01:00
Josh Creek 4f2fe5e333 build(*): Update supabase version 2026-01-25 09:09:49 +00:00
Josh Creek 575aafbc28 build(*): Enable running db migrations in build 2026-01-24 17:59:28 +00:00
Josh Creek d18b231ac6 fix(#69): Downgrade SvelteKit to 2.5.3 and enable generateSW mode to resolve build failures 2026-01-02 20:57:28 +00:00
Josh Creek 2f5c0d68be feat(#69): Improve seeding process 2026-01-02 20:17:13 +00:00
Josh Creek 852c6c3f34 feat(*): Complete MongoDB to Supabase migration cleanup 2025-07-26 23:13:11 +01:00
Josh Creek 31e8a0d686 build(*): Add netlify support 2025-07-26 22:26:45 +01:00
Josh Creek 5285d5d84d chore(*): Add workbox service worker 2024-04-14 16:03:01 +01:00
Josh Creek 59ff274a44 build(#13): Add DaisyUI 2024-04-07 15:12:59 +01:00
Josh Creek 496cdb6666 feat(#9): Add sign up 2024-04-06 21:10:37 +01:00
Josh Creek 49e39c2742 chore(#4): Add a database connection to mongodb 2024-04-06 15:04:53 +01:00
Josh Creek 26c552e994 build(*): Add netlify support 2024-03-09 21:32:50 +00:00
Josh Creek e3420d6e02 chore(*): Add base sveltekit files 2024-03-09 21:28:07 +00:00