Skip to content

About

Hub (formerly Igroteka): games, programs and system demos in tabs of one page, also a Windows app. Works offline.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Hub (Хаб)

English · Русский

▶ Open the Hub online - the browser version (GitHub Pages); the Windows app is in Releases.

A collection of small projects that have been fixed up, plus the Hub («Хаб»): a desktop app and a web page that open the games, programs and system demos of this collection in tabs of one window. Until version 1.1.0 it was called Igroteka («Игротека», "game library"); settings, records and saves stay after the rename. The browser version is the root site https://alexalesha.github.io/.

  • web/ - 23 standalone HTML pages: games, tools and desktop-shell demos. Each opens with a double click on index.html and works offline.
  • py/ - 6 Python programs (PySide6).
  • app/ - Hub, the Electron desktop app.

The interface of all projects is in Russian.

Hub home screen: games and the "Programs" section

Hub

Twelve games in one window: Cube World, Blockcity, Operation: Perimeter, Dino Run, Hop-Skip (a platformer), Horizon Drift, Fire Jungle, Space Shooter, Blocks, Sudoku, Flappy Wings («Летучая птичка», a fly-between-the-columns game) and RailRunner («Бег по рельсам»). All games are fan concepts and are not affiliated with any rights holders.

A game in a tab

  • Programs. Below the games is a "Programs" section with seven programs: WritingSpeed («Скорость печати», web/writing-speed), a typing speed test; the Compiler («Компилятор», web/compiler): C, C++, Python, JavaScript, TypeScript, Lua, Ruby and SQL run right there, offline; FilesManager («Файловый менеджер», web/files-manager) on a demo disk; Calibrate 3D Printer («Калибровка 3D-принтера», web/calibrate3dprinter): G-code of ten calibration tests for any FDM printer; MediaPlayer («Медиаплеер», web/media-player); two calculators, Calc Pro Glass («Калькулятор Glass», web/calcpro-glass) and Calculator iOS 26 («Калькулятор iOS 26», web/ios-calculator). Each opens in a tab like a game and works offline. Of WritingSpeed only its page goes into the app (its own Electron shell and tools stay next to it); the Compiler goes in with its engines and the Python of web/python_ide (about 80 MB) and is not part of the one-file Hub. Calibrate 3D Printer lives in its own repository (site); web/calibrate3dprinter is a copy of its web/ folder, version 1.0.0, refreshed with node tools/sync-calibrate.js [folder] (or CALIBRATE_DIR). The calculators come from the Calculators repository (CalculatorPro): copies of calcpro-glass/src and ios-calculator/src, version 1.6.0, refreshed with node tools/sync-calculators.js [folder] (or CALCULATORS_DIR); in a tab they have no window buttons and stand in the middle. The third calculator there, Calc Pro on C# and WPF, is not a page and is not in the Hub. No card leads out of the app.
  • System demos. Below the games is a "System demos" section: shells in the style of Windows 11, macOS, iOS and One UI (win11_3, macos-tahoe, ios26, oneui7; not affiliated with Apple/Microsoft/Samsung). Each opens in a tab like a game, with its own storage; games in demo windows get the app volume and pause when the tab is left ({mix: 'pause'}).
  • Tabs. Every game opens in its own tab. Clicking the card of a game that is already open switches to its tab. Close a tab with its cross or the middle mouse button.
  • Separate storage per game. One game cannot see the records and saves of another, and everything survives a restart. The data of a single game can be cleared in the settings without touching the others.
  • Background tabs are paused and silent. A hidden game pauses, gets no animation frames and is muted. Checked on every game.
  • No network. Game pages cannot reach the internet or read files outside their own folder. An external link opens in the system browser, and only after you confirm.
  • The window remembers its size, position and maximised state, and which tabs were open. Reopening tabs on start can be turned off in the settings.
  • App-wide volume and mute, dark and light themes.
Keys Action
Ctrl+T home screen
Ctrl+W close the tab
Ctrl+Tab / Ctrl+Shift+Tab next / previous tab
Ctrl+1 … Ctrl+9 tab by number (Ctrl+9 is the last one)
F11 game full screen without the tab bar; Esc or F11 to go back
F5, Ctrl+R, Ctrl+F5 restart the game (asks first); also via the tab's right-click menu

The keys also work with the Russian keyboard layout. Cube World keeps F1, F2, F3 and F5 for itself (F5 switches the camera there), so in it restart with Ctrl+R, Ctrl+F5 or the tab menu. The keys a game keeps are listed in app/games.js (the keys field).

Cube World also keeps Esc (the escToGame field): the first Esc pauses and shows the cursor, the second resumes and hides the cursor at once, with no click. To leave the shell's fullscreen in this game use F11 (Esc stays with the game).

In a browser the same works in the game's own fullscreen: the "Во весь экран (F)" (fullscreen) button in the pause menu, or the F key. The game turns on keyboard lock (navigator.keyboard.lock(['Escape']), available in Chrome and Edge), so Esc reaches the game; to leave fullscreen hold Esc (the browser shows a hint) or press F. Browser fullscreen via F11 does not enable keyboard lock (it is granted only to a page in fullscreen through the Fullscreen API), so there, as in a normal window, after the second Esc the cursor comes back on your first click in the game (a browser security rule: after leaving pointer lock with Esc a new click is required).

Question over a game Settings Light theme
"Programs" section "Programs", light theme

The app icon is drawn by code: app/assets/logo.svg; npm run icon renders it into app/assets/icon.ico (16-256 px, with a simplified drawing for 16-32 px) and icon.png.

Hub icon

Run, build, test

Requires Node.js 22 or newer.

npm install
npm start                 # run the app
npm run dist              # build the installer and the portable exe into dist/

The Windows x64 build gives dist/Hub-1.1.3-Setup.exe (NSIS, per-user, no admin rights, Russian) and dist/Hub-1.1.3-Portable.exe. Only app/ and the folders of the games, programs and demos go into the build (about 160 MB each).

npm test                  # web/ pages in Chromium (1193 checks)
npm run test:unit         # laws of the app modules and the icon (63)
npm run test:app          # the real app through Playwright (91, windows off-screen)
pip install -r requirements-py.txt
python -m pytest tests/py # py/ programs (183)

Helpers: npm run thumbs re-renders the card pictures, npm run screenshots takes the pictures for this file, npm run probe:background shows what each game does in a background tab. npm run single builds dist/hub-single.html: the whole Hub with all games and system demos in one offline HTML file (about 4.5 MB).

Browser version

index.html at the repository root is the same Hub in a regular browser: the same cards, descriptions and pictures, games open in tabs of the page, plus a "System demos" section (win11_3, macos-tahoe, ios26, oneui7). Open it with a double click on index.html or serve the repository root with any static server. No build, no server and no internet are needed; all paths are relative.

  • One game table for the app and the page: web/_shared/games-data.js. Tab order and settings come from the same modules, app/tabs.js and app/settings.js.
  • Leaving a game (another tab, the home screen, a hidden browser tab) sends it {mix: 'pause'}, coming back sends {mix: 'resume'}; the player unpauses.
  • All pages of a site share one storage; games keep apart by key prefixes (the storage field of the table). "Clear data" erases only the chosen game.
  • The volume setting reaches the games when the page comes from a site or server; from disk the browser treats game pages as foreign, so volume is set in the games.
  • GitHub Pages: Settings → Pages → Deploy from a branch → main, folder / (root). The .nojekyll file at the root is required, otherwise Pages drops folders starting with an underscore (web/_shared, web/_launcher, web/_os-shared).
  • On a site the page isolates itself (hub-coi-sw.js, a service worker that adds COOP/COEP to the Hub's own files only; other sites of the same address stay as they are). So the Compiler in a tab of the Hub waits for a line typed in its output, as on its own site. The first visit loads the page once more through the worker.

The page laws are in tests/weblauncher.spec.js (part of npm test): over file:// and from a server subfolder, as on Pages.

Renaming the app

The name lives in one place: productName in package.json. Both the app (window title, home screen, About) and the builder (shortcuts, installer) read it. Game data does not depend on the name and lives in %APPDATA%\MixOfProject-Games, so records survive a rename. The build file names are set in Latin letters in build.nsis.artifactName and build.portable.artifactName and can be changed separately if needed.

Pages in web/

Every page is checked by a common law: it opens without errors and without network. Most pages also have their own laws in tests/web/<name>.spec.js. Detailed reviews (what was wrong and what was fixed, in Russian) are in docs/audit/games.md and docs/audit/apps.md. Scores are after the fixes.

Games (scores: fun / polish / originality)

Folder What it is Own laws Score
tetris Blocks: falling pieces by the classic rules, with hold and T-spins 12 9 / 9 / 4
sudoku Sudoku with a solver, hints, pause and records per level 11 8 / 9 / 5
horizon_drift_offline Horizon Drift: 3D racing and drifting, career, 8 cars and 8 tracks, free roam on 4 maps, car damage; rivals are driven by the AiRacer neural network (it sees only what a driver sees), "New track" from a code - a generator checked by the bot and the network 118 + 11 in node 8 / 7 / 7
space_shooter Space Shooter: waves of enemies and asteroids, power-ups, record 12 8 / 7 / 5
mario Hop-Skip: a two-level platformer with its own hero 13 7 / 8 / 5
jungle-strike Fire Jungle: a run-and-gun arcade with a boss 11 7 / 7 / 6
minecraft_clone_3d_1 Cube World: a voxel sandbox, builds are saved 11 7 / 7 / 6
dino Dino Run: jump over cacti and duck under birds 11 6 / 8 / 3
rail-runner RailRunner («Бег по рельсам»): run along three tracks in 3D away from trains through five districts - 6 characters, a shop, missions, a jetpack and a tutorial. Its own repository RailRunner; this is a copy of its web/, version 2.0.3, refreshed with node tools/sync-railrunner.js [folder] (or RAILRUNNER_DIR) in RailRunner not reviewed yet
flappy-wings Flappy Wings: fly between columns, one file, a fan game not affiliated with the rights holders of the genre's known games 25 not reviewed yet
fps_1 Operation: Perimeter: a first-person tactical shooter, rounds against bots 10 6 / 7 / 4
roblox-mini Blockcity: a city of places - pick one and dress up your hero 10 5 / 7 / 4

Tools (score 1-10: usefulness, reliability, completeness)

Folder What it is Own laws Score
writing-speed WritingSpeed: typing speed test - time, words, texts, custom text, zen; six languages and code; WPM/CPM, accuracy, consistency, mistakes by key, records. Also a separate Electron app (web/writing-speed/electron) 91 not reviewed yet
media-player MediaPlayer: 12 own songs from a song generator (Web Audio, nothing downloaded), your files (audio and video), playlist, shuffle/repeat, speed, 10-band equalizer, 3 visualizers, mini mode, Media Session, five Paint themes, RU/EN. Also a separate Electron app (web/media-player/electron) and a standalone repository: MediaPlayer 45 (+23 mutants) not reviewed yet
files-manager FilesManager: a file explorer - folder tree, tiles/list/table, tabs, two panels, wildcard search, preview of images, text, code, audio, video, PDF, Windows Explorer hotkeys, five Paint themes, RU/EN. In the browser: a demo disk in IndexedDB or real folders through the File System Access API. Also a separate Electron app (web/files-manager/electron, disk work over IPC, delete only to the Recycle Bin) and a standalone repository: FilesManager 9 (+13 mutants, +1 Electron) not reviewed yet
compiler Compiler: C, C++ (Clang 22 → WebAssembly), Python, JavaScript, TypeScript, Lua, Ruby and SQL in the browser; time limit, Stop, stdin and typing input while the program runs, errors on their line, five Paint themes, RU/EN. Also a standalone repository: Compiler 33 (+27 mutants) not reviewed yet
python_ide Offline Python 3.13: editor, Stop, input(), files 11 8
calcpro-glass Calc Pro Glass («Калькулятор Glass»): Standard, Scientific, Fraction and Programmer (HEX, DEC, OCT, BIN) modes, DEG/RAD/GRAD, memory, history, five Paint themes. A copy of calcpro-glass/src from CalculatorPro, node tools/sync-calculators.js in Calculators (+1 Hub) not reviewed yet
ios-calculator Calculator iOS 26 («Калькулятор iOS 26»): a calculator in the style of the iPhone one - step-by-step evaluation, scientific panel, history, five Paint themes. A copy of ios-calculator/src from the same repository in Calculators (+1 Hub) not reviewed yet

Desktop-shell demos (no detailed review yet, only the common law)

Folder What it is
win11_3 A Windows 11 style shell
macos-tahoe A macOS style desktop
ios26 An iOS style phone
oneui7 A One UI style phone

Programs in py/

All use PySide6 with one dark theme. Tests run without a screen (QT_QPA_PLATFORM=offscreen). Review: docs/audit/py.md.

File What it is Tests Score
paint.py Image editor: undo, opacity, flood fill, filters 42 8
compiler.py Mini compiler of a small language to Python with clear errors 63 8
telegram_clone.py Chat that keeps its history, with search 15 7
explorer.py File explorer that deletes only to the Recycle Bin and only after asking 20 7
os_sim.py "Python95": a desktop whose windows run the programs above 21 7
browser.py QtWebEngine browser with its own start page 22 6

Third-party libraries

They sit next to the pages unchanged, each with its licence text.

Library Where Licence
three.js r149 web/{fps_1,horizon_drift_offline,minecraft_clone_3d_1,roblox-mini}/vendor/ MIT
CodeMirror 5.65.21 web/python_ide/vendor/codemirror/ MIT
Pyodide 0.29.5 (Python 3.13.2) web/python_ide/vendor/pyodide/ (also used by web/compiler) MPL-2.0; Python standard library: PSF
YoWASP Clang 22 (Clang, LLD, wasi-libc, libc++) web/compiler/vendor/clang/ Apache-2.0 WITH LLVM-exception; wasi-libc: Apache-2.0/MIT; YoWASP: ISC
ruby.wasm 2.10.1 (CRuby 3.4) web/compiler/vendor/ruby/ MIT; Ruby: see NOTICE
TypeScript 5.9.3 web/compiler/vendor/typescript/ Apache-2.0
sql.js 1.14.2 (SQLite) web/compiler/vendor/sqljs/ MIT; SQLite: public domain
Fengari 0.1.4 (Lua 5.3) web/compiler/vendor/fengari/ MIT
CodeMirror 5.65.21 modes and hints web/compiler/vendor/codemirror/ MIT
word lists from wordfreq 3.1.1 (Robyn Speer), filtered the WORDS block of web/writing-speed/index.html CC BY-SA 4.0 (that block only)

The app is built with Electron (MIT) and electron-builder (MIT); tests use Playwright (Apache-2.0).

Licence

MIT, see LICENSE. All games and programs are fan concepts. Names of other products in the descriptions are only for comparison; the project is not affiliated with the rights holders.

About

Hub (formerly Igroteka): games, programs and system demos in tabs of one page, also a Windows app. Works offline.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages