Ramesh Inampudi

Web apps

Building TVOnline: A Chromecast-Style Web TV in React

By Ramesh Inampudi · 2026-11-20 · 5 min read

Watching live TV from the web usually means juggling tabs. One tab has a news channel, another has a streaming service, a third has a YouTube search, and none of them feel like a single place to sit back and watch. I wanted a living-room style screen: a dark interface where I pick a channel or an app and go. TVOnline is my attempt at that, built with React and TypeScript.

Why I built it

India alone has a huge spread of languages, and the channels I care about are scattered across Hindi, Telugu, Tamil, Kannada, Malayalam and English news, plus music, movies, sports and gaming. Most of these channels run live streams on YouTube, but finding them means remembering each channel handle. I wanted one organised catalogue, styled like Chromecast or Android TV, that could be navigated with arrow keys as easily as with a mouse.

This is a side project, so I set myself one firm constraint: browsing live TV should work with no setup and no API key.

What it does

TVOnline has four main parts:

The home screen combines a hero banner, a row of live channels and a row of featured apps. The sidebar collapses and shows a live clock. Every channel gets a card with a gradient in its brand colour, so there are no broken thumbnail images to worry about.

Clicking a channel opens an in-app Channel Preview page showing the name, language tag and a LIVE badge. A Watch Live button sends you to the channel's YouTube live page in the same window, and a Back button returns you to the grid.

How it works

The stack

The app uses React 19 and TypeScript 6, built with Vite 8 and styled with Tailwind CSS 4. React Router 7 handles routing, Zustand 5 holds client state (auth, live TV and UI stores), and TanStack Query 5 handles data fetching. Sign-in uses @react-oauth/google and icons come from Lucide React.

The split between Zustand and TanStack Query is worth copying. Zustand keeps small pieces of UI state such as the selected tab or sidebar state. TanStack Query owns anything that comes from the network, so caching and refetching are not hand-written.

Channels as configuration

The whole catalogue lives in one file, src/config/liveTv.config.ts. Each entry is a plain object with an internal slug, the YouTube channel ID, a display name, a category, the live URL, a brand colour, a tagline and a language. Adding a channel is a data change, not a code change. The 12 streaming apps follow the same pattern in apps.config.ts.

Keeping content in typed config means the UI components (ChannelCard, ChannelGrid, CategoryTabBar) stay generic, and TypeScript catches a malformed entry before it ships.

Why Watch Live navigates away

My first instinct was to embed the stream in an iframe inside the app. That does not work reliably: YouTube blocks iframe embedding for most Indian TV channels. Without a backend proxy, the only dependable approach I found was to navigate to the channel's /live URL in the same window. The browser Back button then returns to the Channel Preview page, so the flow still feels continuous.

The trade-off is that the player is YouTube's own page rather than something inside my interface. In exchange there is no backend to run, and browsing consumes no API quota because each card links straight to its live page.

Hiding dead channels cheaply

Channels sometimes disappear from YouTube. When a YouTube API key or Google sign-in is available, TVOnline health-checks the catalogue in one batched call that costs 1 quota unit per 50 channels, and caches the result for 6 hours. Channels that no longer exist are hidden automatically. Without a key, nothing is hidden, so the feature degrades gracefully instead of breaking.

Keyboard and D-pad navigation

Because the interface imitates a TV, it is navigable with arrow keys or a D-pad, with hover and focus animations and glow effects to show where you are. Designing for focus first also makes the interface friendlier to keyboard users generally.

What I learned

One caution from the README itself: channel handles and IDs change over time, which is exactly why the config file and the health check exist.

Try it

The app is live at https://tvonline-ir.vercel.app. Open a language tab, click a channel, and use Watch Live to jump to its stream. Use the browser Back button to return to the preview page.

Conclusion

TVOnline is a small project built around one idea: a single, TV-style front door for live channels and streaming apps. The reusable parts are the ones I would carry to other projects: typed configuration for content, Zustand plus TanStack Query for state, optional keys that never block the core experience, and cheap batched checks with caching. If you have feedback or a channel suggestion, you can reach me at hello@iramesh.com.

Live: https://tvonline-ir.vercel.app