Skip to content

Rewrite frontend in Svelte - #2

Draft
akeamc with Copilot wants to merge 2 commits into
mainfrom
copilot/rewrite-frontend-in-svelte
Draft

akeamc with Copilot wants to merge 2 commits into
mainfrom
copilot/rewrite-frontend-in-svelte

Conversation

Copilot AI commented Mar 9, 2026

Copy link
Copy Markdown

Replaces the Next.js/React frontend with a SvelteKit + Svelte 5 (runes mode) application, maintaining full feature parity.

Stack changes

Before After
Next.js 14 (App Router) SvelteKit 2
React 18 Svelte 5 runes
TanStack Query + Context Svelte stores + $state/$derived/$effect
TanStack React Table Native sort logic
Headless UI Custom Svelte dialog/popover components
react-leaflet Leaflet (lazy-loaded, no SSR)
bun lockfile npm

Key files

  • src/lib/api.ts – API client (mirrors af.ts, fixes Stringstring types)
  • src/lib/stores.ts – Auth state + sort field as writable stores
  • src/lib/components/ – Header, Footer, LoginModal, VacancyGrid, VacancyCard, AreaPictures, FloorplanModal, Map
  • src/routes/ – Three pages: /, /bostad/[id], /konto

Notable patterns

SSR load functions catch API errors gracefully (API may not be co-located during dev); auth is initialized client-side via onMount in the root layout. Map is dynamically imported to avoid SSR:

let LazyMap = $state<typeof import('$lib/components/Map.svelte').default | null>(null);

$effect(() => {
  if (showMap && browser && !LazyMap) {
    import('$lib/components/Map.svelte').then((mod) => { LazyMap = mod.default; });
  }
});

All original features preserved: vacancy grid with 6-field sorting, area photo gallery, floorplan modal, Leaflet map with geocoded markers, login/logout, auth-protected /konto, 30s auto-refresh, and urgency highlighting for deadlines <24h.

Original prompt

This section details on the original issue you should resolve

<issue_title>Rewrite the frontend in Svelte</issue_title>
<issue_description>Let's try vibe coding this.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@vercel

vercel Bot commented Mar 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
amcoff-bostader Error Error Mar 9, 2026 3:07pm

Co-authored-by: akeamc <17624114+akeamc@users.noreply.github.com>
Copilot AI changed the title [WIP] Rewrite the frontend in Svelte Rewrite frontend in Svelte Mar 9, 2026

This branch had an error being deployed

1 failed deployment
Preview b8eda392 Deployed Mar 9, 2026 by vercel[bot]
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.

Rewrite the frontend in Svelte

2 participants