04Frontend EngineerJun 2026Remote · Lagos, Nigeria
Filmporte
Film distribution platform
- Product
- Pay-per-view cinema for independent film
- Apps
- Viewer, producer dashboard, admin, landing
- My focus
- Film page architecture, pricing, playback and tickets
- Team
- Wider frontend team, alongside a senior engineer
- Stack
- Next.js 15
- React 19
- TypeScript
- TanStack Query
- Zustand
- zod
- Mux Player
- Tailwind CSS
The product
Filmporte lets filmmakers upload a film, set prices by region and sell time-limited tickets. Viewers buy a ticket or redeem a voucher and watch a protected stream.
The platform is four Next.js apps on one API: the audience app, the producer dashboard, an internal admin console and the marketing site. Payments run through Paystack and Stripe, and video through Mux.
My role
I work on Filmporte alongside a senior engineer, inside a wider frontend team. The work here is the part I was involved in. It builds on payment, player and upload foundations laid by other engineers on the team.
Server-rendered film details page
The film page was one 953-line client component. The server sent a skeleton, the film was fetched three times per visit, and every playback tick re-rendered the whole page.
A server shell with client islands
The page is now an async server component that renders the title, synopsis, credits, gallery, cast and poster as HTML, with structured data for search engines. Interactive parts (player, ticket panel, checkout modals, live progress) are separate client components that receive only plain data.
One cached loader
Metadata, structured data and the page body share a single cached loader, which took film fetches per navigation from three to two. A failed fetch is treated as not found, and a missing channel theme only costs the custom colours.
Streaming and purchase are decoupled
Checkout runs on a reducer, with separate hooks for entitlement, playback, deep links and payment detection. Three different copies of the payment-resume logic became one, and payment keys in local storage are written from a single module.
Prices are still fetched in the browser, on purpose
Prices depend on the viewer's region, and the server would see its own region. The ticket panel refetches with the server's film as placeholder data, and the hero reads its price from that same panel, so the two can never disagree.
Nothing ejects a viewer mid-film
Background refetches are ignored while a film is playing, and a payment settles by checking entitlement for a few seconds, which replaced a full page reload that raced the payment confirmation.
Recorded results
From the project's own before and after notes: the heading, poster and theme are now in the server HTML, the page store shrank from 235 to 133 lines, and lint warnings on the touched files went from 13 to 0.
Region-aware pricing
Pricing moved from a fixed local and international pair to any number of regional tiers, matched by country, then continent, then a catch-all.
Request types that refuse invalid combinations
The create-pricing request is a discriminated union: one arm carries the regional tier list, the other the older local and international pair, and each forbids the other's fields. Mixing formats fails at compile time, not as a rejected request.
Checks before the request leaves
The builder asserts there is exactly one default tier and that it names no regions, which mirrors the API's own rule.
Reading saved pricing defensively
The API returns one row per country or continent, so a three-tier setup can come back as ten rows. The parser groups rows back into tiers and classifies each in a fixed order. If anything cannot be read with confidence, editing is switched off, so an edit is never built from a partial picture.
Payment and wallet routing
The settlement country was being looked up by currency, and several countries share a currency. It is now resolved by ISO country code. In the audience app, the payment gateway is chosen from the gateway the backend returns, and currency display reads the currency code directly.
Playback, entitlement and tickets
Resume after a refresh
Refreshing during an active session could leave the player unable to load the video, because the resume path was assembled from data that did not include the playback details. Resume now goes through the stream endpoint, which returns the active view and its progress, and the player starts from there.
Stable playback
The stream a session starts with is kept for the whole session, which stopped switching tabs from restarting the film. Playback after a refresh waits for an explicit Continue Watching action.
Entitlement that reflects reality
After a viewing ends the page returns to the purchase state with a brief skeleton instead of showing a stale ticket. A not-found response is treated as no ticket, while network errors are not, and tickets the backend marks unusable are respected.
Bulk gift vouchers
Buyers can purchase 5 to 50 gift vouchers in one order. The chosen tier and quantity are kept in the URL, so they survive signing in part-way through. Redeeming a voucher is a checkout at full discount that skips the payment gateway.