- Role
- Front-end development, with a backend partner
- Year
- 2025–26
- Stack
- Next.js 16 · TypeScript · Supabase · Tailwind CSS v4 · shadcn/ui · libass (WebAssembly)
- Links
- Live site
Overview
AoYume is an anime platform for Persian speakers: a seasonal broadcast schedule, filters by genre and year, personal watchlists, community discussions, and streaming or downloads. The entire interface was designed right-to-left.
I developed the front end alongside a backend partner who handled the database, access policies, and edge functions. My focus was the product experience: redesigning the UI, building a custom in-browser player for styled subtitles, smoothing download flows, SEO, and running a front-end security audit.


Decisions
I kept the dark theme as default so the artwork stands out, with a light theme toggle visitors can switch to at any time. Text overlays and video controls stay dark in both modes to preserve contrast. Instead of scattered colors, I set up a shared color palette and typography scale; empty states, errors, and toast notifications use reusable components, reserving the mascot illustration for full-page states.
Paid downloads cost user coins, so double-clicks or slow connections must never double-charge. Each purchase generates an idempotency key stored in localStorage rather than component state. It survives resolution changes, tab switches, page reloads, and multi-tab browsing, clearing only after the server confirms the transaction is complete.
User roles read strictly from cryptographically signed claims inside the session token. Any metadata users can edit in their profile is ignored for authorization, so nobody can grant themselves admin permissions.


Build
The pages are built with Next.js 16 Server Components and partial prerendering. The catalogue layout loads as a static shell, while personalized account state streams in alongside it. Data mutations flow through Server Actions, and third-party synopses are sanitized before reaching the page.
To render ASS subtitles with custom fonts, colors, and karaoke styling in the browser, I compiled libass to WebAssembly and loaded it lazily only when a subtitle track is selected. Desktop browsers use WebGL on an offscreen canvas. Mobile uses a 2D canvas renderer because some mobile browsers lose video playback under WebGL overlays. I also preload the Persian font so subtitles never flash with missing characters.
Security headers block iframe embedding to prevent clickjacking, referrers are dropped on login callbacks, and cross-origin rules accommodate Telegram’s login popup. Preview deployments are hidden from search crawlers, and production builds on an unexpected hostname halt rather than risking search rankings.
- 01Subtitle chosenZero code loaded before selection
- 02libass in WebAssemblySelf-hosted, loaded only on demand
- 03Persian font firstPreloaded before the very first frame
- 04Adaptive rendererWebGL on desktop · 2D on mobile phones
Outcome
AoYume is live at aoyu.me, with sign-in via email, Google, or Telegram, the seasonal schedule, and the custom player and download flows.












