Leo7TV is a proof‑of‑concept web application that demonstrates how to build a legal, resilient and modern streaming platform for free‑to‑air television and radio. The design is Africa‑first: the site organizes channels by region, country and language while offering a clean, premium user experience. Only officially licensed or public streams are listed; pirated feeds and scraped IPTV lists are excluded.
This repository contains a full working scaffold for the frontend, a small sample dataset with official streams, a health‑check workflow and guidance for deployment on Vercel. It is intended as a starting point for further development rather than a finished product.
The app is built as a static Next.js application in TypeScript. HLS.js provides reliable playback of HTTP Live Streaming sources and Video.js supplies a polished player shell with caption support. Channel metadata is stored in src/data/. A GitHub Action periodically checks stream health and writes a health.json file; the frontend reads this file to display quality badges and hide dead streams.
Key components:
- Data layer:
src/data/channels.tsexports an array of channel objects with metadata such as region, country, languages, category, stream URL and health score. - Pages: Next.js pages in
src/pagesrender the UI. The home page lists featured channels. Dynamic routes can be added for country pages or channel detail pages. - Components:
src/componentscontainsHeader(site header),ChannelCard(displays channel information) andPlayer(wraps Video.js and HLS.js). - Health checks:
.github/workflows/health‑check.ymlschedules a job every 12 hours that runsscripts/health‑check.js. This script performs HEAD requests to eachstreamUrland writeshealth.json. - Design system: Tailwind CSS is configured in
tailwind.config.jswith a dark primary palette.
The interface is luxurious yet minimal. It opens with a hero section introducing Leo7TV and emphasising its mission. Featured channels appear in cards with the station logo, language tags and quality badge. Users can browse by region, country or language and search by name or category. Playback opens in a modal player that displays captions when available.
leo7tv/
├── .github/
│ └── workflows/
│ └── health‑check.yml
├── public/
│ └── logo.png
├── scripts/
│ └── health‑check.js
├── src/
│ ├── components/
│ │ ├── ChannelCard.tsx
│ │ ├── Header.tsx
│ │ └── Player.tsx
│ ├── data/
│ │ └── channels.ts
│ ├── pages/
│ │ ├── _app.tsx
│ │ └── index.tsx
│ └── styles/
│ └── globals.css
├── README.md
├── package.json
├── postcss.config.js
├── tailwind.config.js
├── tsconfig.json
└── next.config.js
Each channel object in src/data/channels.ts follows this interface:
export interface Channel {
id: string;
name: string;
country: string;
region: string;
category: string;
languages: string[];
type: 'tv' | 'radio';
officialSite?: string;
streamUrl: string;
streamFormat: string;
captionsAvailable: boolean;
qualityLabel: string;
verifiedOfficialSource: boolean;
healthScore: number;
checkedAt: string;
notes?: string;
}The workflow .github/workflows/health‑check.yml runs every 12 hours and on demand to validate stream URLs:
name: Health Check
on:
schedule:
- cron: '0 */12 * * *'
workflow_dispatch:
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install dependencies
run: npm install node-fetch@3
- name: Run health check
run: node scripts/health-check.js
- name: Commit results
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
run: |
if [ -f health.json ]; then
git config user.name 'health-bot'
git config user.email ''
git add health.json
git commit -m 'Update stream health' || echo 'No changes'
git push || echo 'No push on PRs'
fiTo deploy:
- Create a Vercel account and import this repository.
- Choose the Next.js preset; build command
npm run build; output directory.next. - No environment variables are needed for the sample.
- Deploy; subsequent commits deploy automatically.
See src/pages/_app.tsx, src/pages/index.tsx, and components for examples of how to render the home page and play streams.