A modern desktop IPTV player built with Electron, React, and TypeScript.
Manage M3U playlists Β· Browse XMLTV programme guides Β· Watch HLS streams
| Feature | Description |
|---|---|
| M3U Playlist Parser | Full-spec M3U/M3U8 parser with attribute extraction, EPG source discovery, and malformed-line tracking |
| XMLTV Programme Guide | Parse XMLTV/EPG files, index by channel + time, and render a virtualised grid |
| HLS Playback | Adaptive bitrate streaming via hls.js with auto-detect, retry, and clean teardown |
| Channel Zapper | Quick prev/next navigation with keyboard shortcuts |
| SQLite Persistence | Playlists, channels, EPG data, and favourites stored locally via better-sqlite3 (WAL mode) |
| Multi-Language | English, Spanish, and Japanese out of the box |
| Dark Theme | Dark-first design with CSS custom properties |
| Secure Architecture | Context isolation, sandbox, no nodeIntegration, validated IPC bridge |
| Cross-Platform | Windows (NSIS + portable), macOS (DMG), Linux (AppImage + deb) |
Coming soon β replace these placeholders with actual screenshots.
| Library | Channels | Guide | Player |
|---|---|---|---|
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Electron Main Process β
β β
β ββββββββββββ ββββββββββββββββ ββββββββββββββββββββββββββββββ β
β β main.ts β β ipc.ts β β db/ β β
β β (app β β (handlers + β β ββ database.ts (init/WAL) β β
β β life- ββββ security ββββ ββ migrations.ts (v1) β β
β β cycle) β β validation)β β ββ repositories.ts (CRUD) β β
β ββββββββββββ ββββββββ¬ββββββββ ββββββββββββββββββββββββββββββ β
β β β
β preload.ts β
β (contextBridge) β
ββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββ€
β β IPC (invoke/handle) β
ββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββ€
β βΌ β
β Renderer Process (sandboxed) β
β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β React 18 + Vite 5 β β
β β β β
β β ββββββββββββ βββββββββββββ βββββββββββ ββββββββββββββββ β β
β β β Library β β Channels β β Guide β β Player β β β
β β β (M3U/EPG β β (search, β β (EPG β β (HLS via β β β
β β β loader) β β groups, β β grid, β β hls.js, β β β
β β β β β favs) β β detail)β β zapper) β β β
β β ββββββββββββ βββββββββββββ βββββββββββ ββββββββββββββββ β β
β β β β
β β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β
β β β Zustand Store (app-store.ts) β β β
β β β localStorage + DB-backed persistence β β β
β β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β @stream-shogun/core β
β ββββββββββββββ βββββββββββββββββ βββββββββββββ ββββββββββββββ β
β β types.ts β β m3u-parser.ts β β xmltv- β β epg- β β
β β (IPC ch., β β (39 tests) β β parser.ts β β index.ts β β
β β iptv, β β β β (57 tests)β β β β
β β xmltv) β β β β β β β β
β ββββββββββββββ βββββββββββββββββ βββββββββββββ ββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
stream-shogun/
βββ .github/
β βββ ISSUE_TEMPLATE/ # Bug report & feature request templates
β βββ workflows/
β β βββ ci.yml # Lint, typecheck, test, build
β β βββ release.yml # Tag-triggered multi-platform release
β βββ dependabot.yml # Automated dependency updates
β βββ PULL_REQUEST_TEMPLATE.md
βββ apps/
β βββ desktop/ # Electron main process
β β βββ build/ # App icons (electron-builder)
β β βββ scripts/ # Dev launcher
β β βββ src/
β β β βββ db/ # SQLite: database, migrations, repositories
β β β βββ ipc.ts # IPC handlers with security validation
β β β βββ main.ts # App lifecycle, window creation
β β β βββ preload.ts # contextBridge IPC surface
β β βββ electron-builder.yml # Packaging config (win/mac/linux)
β β βββ package.json
β β βββ tsconfig.json
β βββ ui/ # React renderer
β βββ src/
β β βββ components/ # Sidebar, Welcome, EpgGrid, HlsPlayer, etc.
β β βββ hooks/ # useVirtualRows
β β βββ lib/ # bridge, i18n, persistence, sample-data
β β βββ pages/ # Library, Channels, Guide, Player
β β βββ stores/ # Zustand app store
β β βββ App.tsx # Root shell
β β βββ App.css # Full application styles
β βββ package.json
β βββ vite.config.ts
βββ packages/
β βββ core/ # Shared library
β βββ data/ # Test fixtures (M3U, XMLTV)
β βββ src/
β β βββ __demo__/ # Parser demo/test runners
β β βββ m3u-parser.ts # M3U/M3U8 parser (39 tests)
β β βββ xmltv-parser.ts # XMLTV parser (57 tests)
β β βββ epg-index.ts # EPG time-range indexing
β β βββ types.ts # IPC channels, app config types
β β βββ iptv-types.ts # Channel, Playlist, EpgSource
β β βββ xmltv-types.ts # Programme, XmltvData
β βββ package.json
β βββ tsconfig.json
βββ assets/ # SVG icon source
βββ scripts/ # Build utilities (clean, icon gen)
βββ .editorconfig
βββ .eslintrc.cjs
βββ .gitattributes
βββ .gitignore
βββ .prettierignore
βββ .prettierrc
βββ CHANGELOG.md
βββ CODE_OF_CONDUCT.md
βββ CONTRIBUTING.md
βββ LICENSE # MIT
βββ README.md
βββ SECURITY.md
βββ package.json # Workspace root
βββ pnpm-lock.yaml
βββ pnpm-workspace.yaml
βββ tsconfig.base.json # Shared strict TS config
StreamShΕgun follows the Electron Security Checklist:
| Control | Status | Notes |
|---|---|---|
contextIsolation |
β | Renderer cannot access Node.js APIs |
nodeIntegration |
β Off | Disabled in all windows |
sandbox |
β | Process-level sandboxing enabled |
| Preload bridge | β | Only whitelisted IPC channels exposed |
| Input validation | β | URL scheme checks, file size limits (25 MB fetch, 50 MB file) |
| Fetch timeout | β | 30-second AbortController timeout |
No remote module |
β | Not imported anywhere |
| WAL-mode SQLite | β | Safe concurrent reads during writes |
See SECURITY.md for the full security policy and vulnerability reporting process.
| Tool | Version |
|---|---|
| Node.js | β₯ 18.0.0 |
| pnpm | β₯ 9.0.0 |
| Git | Any recent version |
Windows: A C++ build toolchain is required for better-sqlite3. Install the
"Desktop development with C++" workload
from Visual Studio Build Tools, or run:
npm install -g windows-build-tools# Clone the repository
git clone https://github.com/stream-shogun/stream-shogun.git
cd stream-shogun
# Install all dependencies (including native modules)
pnpm install# Start the full dev environment (Vite HMR + Electron)
pnpm dev
# Or run the UI only in the browser (no Electron)
pnpm dev:ui| Script | Description |
|---|---|
pnpm dev |
Start Vite dev server + Electron |
pnpm dev:ui |
Start Vite dev server only (browser) |
pnpm test |
Run core library tests (96 tests) |
pnpm typecheck |
TypeScript strict check across all packages |
pnpm lint |
ESLint across the monorepo |
pnpm lint:fix |
ESLint with auto-fix |
pnpm format |
Prettier format all files |
pnpm format:check |
Prettier check (CI-friendly) |
pnpm clean |
Remove all build artifacts |
# Build all packages (core β UI β desktop)
pnpm build
# Platform-specific builds
pnpm build:win # Windows (NSIS installer + portable)
pnpm build:mac # macOS (DMG + zip)
pnpm build:linux # Linux (AppImage + deb)Build artifacts are written to apps/desktop/release/.
Replace the placeholder icon before your first release:
# Place a 512Γ512 PNG at:
apps/desktop/build/icon.png
# Or generate from the SVG source (requires sharp):
pnpm add -D sharp
node scripts/generate-icons.jselectron-builder will automatically convert the PNG to .ico (Windows) and
.icns (macOS) at build time.
The project uses electron-builder with config in
apps/desktop/electron-builder.yml.
| Platform | Targets | Output |
|---|---|---|
| Windows | NSIS installer, portable .exe |
release/*.exe |
| macOS | DMG, zip | release/*.dmg |
| Linux | AppImage, .deb |
release/*.AppImage, release/*.deb |
- Update version in
package.jsonfiles andCHANGELOG.md. - Commit:
git commit -m "chore: release v0.2.0" - Tag:
git tag v0.2.0 - Push:
git push origin main --tags
The release workflow will build for all platforms and create a draft GitHub Release with the artifacts.
| Symptom | Cause | Fix |
|---|---|---|
| Black screen, no error | Stream URL is not HLS | StreamShΕgun requires .m3u8 HLS streams |
| "CORS error" in console | Server blocks cross-origin | The stream server must send Access-Control-Allow-Origin headers |
| Stuttering / buffering | Network bandwidth | Check your connection; try a lower-quality stream |
| "Manifest parsing error" | Malformed .m3u8 |
Verify the URL loads valid HLS in VLC or Safari |
| Audio but no video | Unsupported codec (e.g. HEVC) | hls.js supports H.264/AAC; HEVC requires native MSE support |
| Symptom | Fix |
|---|---|
better-sqlite3 build fails |
Install C++ build tools (see Prerequisites) |
pnpm install blocks on native modules |
Ensure pnpm.onlyBuiltDependencies includes better-sqlite3 |
| TypeScript errors after pulling | Run pnpm --filter @stream-shogun/core build first to regenerate declarations |
| Electron white screen in production | Verify apps/ui/dist/ exists and base: "./" is set in Vite config |
- VOD / catch-up playback support
- Channel favourites sync across devices
- Playlist auto-refresh on schedule
- EPG reminders and notifications
- Subtitle / teletext support
- Picture-in-picture mode
- Playlist import from Xtream Codes API
- macOS and Linux native packaging refinements
- Automated end-to-end tests (Playwright)
- Plugin system for custom stream sources
Contributions are welcome! Please read the Contributing Guide and our Code of Conduct before submitting a pull request.
MIT Β© StreamShΕgun Contributors