notajson.dev
← All projects
archived2020 · web app · side project

Gleetch

An anime site I built for myself in 2020, because the free sites I watched on were buried in pop-up ads. A small Node API scraped one of those sites for shows and episode links, and Gleetch played each episode in a sandboxed frame where the pop-ups couldn't open. React 16, Ant Design, phone and desktop layouts, light and dark.

// snapshots

The real 2020 build, running again.

The deployed front end, fed made-up shows and generated posters because its API is gone. No real titles or artwork.

// how it worked

A scraper behind, a clean player in front.

The API did the scraping, so the browser never loaded the ad-heavy pages. The front end only got clean JSON and the address of each episode's video host.

FeatureRuns onHow
ListingsExpress · cheerioThe API fetched the source site's list pages and parsed them into JSON: popular, ongoing, recently added, movies, genres.
Show pageExpress · cheerioTitle, other name, status, genres, synopsis and the episode list, scraped from the show's page.
Playersandboxed iframeThe API returned each episode's video hosts. Gleetch kept three and played the first in a frame that can't open pop-ups. The other two were one tap away.
SearchReactWaits for you to stop typing before calling the API, then lists matches with a small poster.
LooklocalStorageLight or dark and one of six accent colours, kept in the browser and fed to styled-components.
Rooms, Favoritesnot finishedWatch-together rooms and a favourites list were in the UI but never wired up. The buttons are still there, doing nothing.

// stack

What it's built with, and where each piece runs.

9 technologies · tap one to see where it runs

app/JavaScript
  • React 16Hooks throughout; every route loads on demand with lazy and Suspense
  • Ant Design 4Grid, buttons, tags, radios and the search box
  • styled-componentsThe theme: two palettes and an accent colour, switched at the top of the app
  • React Router 5Eight routes, from home to /c/:id/:episode
  • axiosOne client with a response interceptor that unwraps data and errors
api/Node.js
  • Node.jsA separate repo, deployed on its own
  • Express + cheerioOne route per list; each fetched a page from the source site and parsed it
host/static + serverless
  • Firebase HostingThe front end, deployed 18 Aug 2020 and still served
  • VercelThe API. Its address now returns 404

Logos: Simple Icons (CC0). Trademarks belong to their owners.

// decisions

Three calls worth explaining.

01

Pop-ups had nowhere to open

Each video host loaded in an iframe sandbox without allow-popups, so the ad scripts inside could run but couldn't open new windows. It worked, with one gap: allow-top-navigation was still on, so a host could redirect the whole page.

02

Three hosts, no more

Episodes listed half a dozen hosts. Gleetch kept the three that played cleanly in the sandbox and dropped the rest, so a bad host never reached the player.

03

One theme object, two modes

Colours lived in one object with a dark and a light palette. The choice and the accent were saved in localStorage and passed through styled-components, so every screen switched at once.

// recovered

My laptop died before the last push. The build still had the code.

GitHub stopped at July 2020. The site deployed in August still served its source maps, and a source map carries the original files. Six years later that was enough to get the code back.

gleetch · recovery
  1. 31 Jul 2020last push to jasonejavier/anime-stream
  2. 18 Aug 2020firebase deploy → anime-site-56c79.web.app
  3. laterlaptop breaks with the newest code unpushed
  4. 2023API deploy on Vercel stops serving
  5. Nov 2026read asset-manifest.json, fetch every .map
  6. Nov 2026pull sourcesContent, skip node_modules

6 steps · runs when it scrolls into view

// looking back

What I'd do differently now.

  1. securityClose the last sandbox gapDrop allow-top-navigation so a host can't send the whole page somewhere else.
  2. bugRemove listeners on cleanupThe player added its fullscreen listeners again on unmount instead of removing them.
  3. scopeFinish or cut RoomsDead buttons on the home screen promised a feature that never shipped.
  4. sourceUse a licensed catalogueScraping someone else's site is fragile and isn't mine to reuse. A real version needs a source that allows it.
  5. habitPush every daySource maps saved this one by luck. A remote is the plan, not the backup.