Context
Rayaska is the software house I co-founded in July 2025. The first version of the site was a three-section page built on Flowbite components; my part of it was the navbar, the language switcher and the clients section.
In May 2026 I took on the redesign end to end: design direction, specification, build, review fixes and launch. v2 went live as v2.0.0 on 10 September 2026. Measured by surviving lines at that release (whitespace and the formatter commit excluded), 85% of the code is mine. My co-founder reviewed it, edited the copy, added the offline page and service worker plus a few UI refinements, and cut the release.
From prototype to spec
The design started in an AI prototyping tool. Over about twenty rounds of direction I settled on an identity we called Cosmic Code: a warm orange palette (flame #d84315, ember #f46f46 on a midnight #1a0a05), a constellation of particles behind the hero, alternating dark and light sections, and a footer that reveals itself from under the page.
The prototype was React and the site is SvelteKit, so it was a rebuild, not a port. Before touching src/ I wrote a 781-line design spec and a 1,172-line implementation plan, with one rule for conflicts: the prototype is the visual source of truth, and the written handover is the fallback.
Building it in six waves
I built it with AI coding agents in six waves: foundation, UI building blocks, the layout shell, homepage sections (three agents in parallel), sub-pages (four in parallel), then integration. Every wave ended with pnpm check and a review in the browser before the next one started.
The parallel waves taught me the main lesson of the project. Agents briefed with text alone filled the gaps with their own guesses: the order of the hero animation, where the scroll cue sat, nine hard-coded hex colours in the navbar. I added a reconciliation pass that compares each page against the prototype screenshots; for the projects page alone it produced a 37-item list of differences.
Review and launch
My co-founder's review asked for 18 changes, and they made the site better: move to Bun, drop the smooth-scroll library and the custom cursor, bring back the v1 logo animation, flatten the cards, hide each project's tech stack (clients don't want it public), and fix several mobile layouts. I answered with 20 commits.
The smooth-scroll change is a good example. Scrolling felt slower with Lenis on, and I traced it to its 1.2-second smoothing. I removed the library and kept only what the site needed from it: an anchor-click handler that offsets for the fixed navbar, respects reduced motion, and uses pushState so the Back button still works.
Pieces worth a closer look
The constellation
A 2D canvas with fake depth. Each particle gets a depth z between -1 and 1 that scales its size and opacity, lines connect nearby pairs and fade with the depth of their endpoints, and the cursor shifts closer particles further than distant ones. The particle count follows the canvas area, capped at 40 below 768px, and the effect is off on touch devices.
const depth = (p.z + 1) / 2
const dx = -cursorX * cursorParallax * depth
const dy = -cursorY * cursorParallax * depth * 0.6
const screenX = p.x + dx
const screenY = p.y + dy
const twinkle = 0.85 + 0.15 * Math.sin(p.tw)
const alpha = (0.25 + 0.75 * depth) * twinkle
const radius = p.baseR * (0.55 + 0.55 * depth)
The navbar pill
The active-link highlight is measured, not hard-coded. It reads the active link's position relative to the nav and re-measures when the language changes (Indonesian and English labels have different widths), after web fonts finish loading (the fallback font is wider), and on resize. Both bugs it went through, a misaligned pill on first paint and drift after switching language, came from measuring too early.
$effect(() => {
if (!navRef) return
measureTick // bumped on font load and resize
$locale // label width changes with language
const node = navRef.querySelector<HTMLElement>(`[data-nav="${activeId}"]`)
if (!node) { pillVisible = false; return }
const navRect = navRef.getBoundingClientRect()
const r = node.getBoundingClientRect()
pillX = r.left - navRect.left
pillWidth = r.width
pillVisible = true
})
The footer reveal
Page content sits above a fixed footer, and a transparent spacer at the end of the page lets the footer show through as you scroll, like lifting a curtain. The first version only worked on my 24-inch monitor and broke on phones. The fix was to stop using a width breakpoint and measure whether the footer actually fits: if it is taller than the viewport minus the navbar, it falls back to normal flow. The viewport is measured with 100lvh, so the mobile address bar collapsing mid-scroll doesn't flip the decision.
let canStick = $derived(footerHeight > 0 && footerHeight + NAVBAR_BUFFER <= viewportHeight)
// ...
viewportHeight = lvhProbe?.offsetHeight || window.innerHeight
Contact and the logo intro
The contact page is a three-step form that sends real email through Nodemailer, with up to three attachments (10 MB each, 15 MB in total), a honeypot field, and a short reference ID in the subject line. On a visitor's first page load, the v1 Lottie logo animation plays for exactly four seconds (300 frames at 1.25x), once per browser session. Any click skips it, reduced motion skips it entirely, and a six-second failsafe releases the page if the animation file stalls.
After launch: a quality gate
The first thing I measured after launch was the code itself. The contact page was 1,207 lines, and ESLint was configured but had never been installed, so the lint script only ran Prettier. I added a gate that runs in about five seconds on every push:
- ESLint with a 50-line limit per function.
- A 300-line limit per file, with a baseline for existing large files that can only shrink.
- A check that Indonesian and English have the same translation keys.
- A duplication check with jscpd, which turned out to be skipping all 81 Svelte files until I added Svelte to its formats.
if (base) {
if (lines > base.lines) failures.push(`${file}: ${base.lines} -> ${lines} ... Baselined files must not grow.`)
else if (lines <= LIMIT) failures.push(`${file}: now ${lines} lines ... Run \`bun run check:size:update\``)
} else if (lines > LIMIT) failures.push(`${file}: ${lines} lines, limit is ${LIMIT}.`)
Then I split the six largest files, one pull request each, moving code without changing it:
| File | Lines before | Lines after |
|---|---|---|
contact/+page.svelte | 1,207 | 398 |
blog/+page.svelte | 798 | 258 |
Services.svelte | 555 | 375 |
projects/[slug]/+page.svelte | 510 | 224 |
Navbar.svelte | 369 | 264 |
contact/+server.ts | 355 | 222 |
The two files still above 300 lines stay in the baseline, each with a written reason. This work is merged to staging and goes out with the next release.
What I learned
- Parallel agents need the picture, not just the words. Text briefs leave room for guesses; a comparison against reference screenshots after every wave catches them.
- Measure fit instead of guessing breakpoints. The footer reveal only worked once it asked "does this fit?" rather than "is the screen wide?".
- A green check can mean the check never ran. The duplication checker passed while reading zero Svelte files. I verify what a tool scanned before trusting what it reports.
