{"id":21681007,"url":"https://github.com/trustworthydev/racelab-electronjs","last_synced_at":"2026-04-06T02:32:44.426Z","repository":{"id":235043241,"uuid":"783832014","full_name":"TrustworthyDev/RaceLab-ElectronJS","owner":"TrustworthyDev","description":"Start up changing from WebPack to Vite and then more.","archived":false,"fork":false,"pushed_at":"2024-04-08T17:52:11.000Z","size":51939,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-20T10:44:23.791Z","etag":null,"topics":["electron","express","mongodb","nodejs","react","tailwindcss","vite","webpack"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TrustworthyDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-08T16:55:21.000Z","updated_at":"2024-04-22T10:55:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"ee0d931e-70a1-4ec7-b951-080985c653ea","html_url":"https://github.com/TrustworthyDev/RaceLab-ElectronJS","commit_stats":null,"previous_names":["trustworthydev/racelab-electronjs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TrustworthyDev/RaceLab-ElectronJS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TrustworthyDev%2FRaceLab-ElectronJS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TrustworthyDev%2FRaceLab-ElectronJS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TrustworthyDev%2FRaceLab-ElectronJS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TrustworthyDev%2FRaceLab-ElectronJS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TrustworthyDev","download_url":"https://codeload.github.com/TrustworthyDev/RaceLab-ElectronJS/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TrustworthyDev%2FRaceLab-ElectronJS/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262188396,"owners_count":23272341,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["electron","express","mongodb","nodejs","react","tailwindcss","vite","webpack"],"created_at":"2024-11-25T15:23:18.098Z","updated_at":"2025-12-30T19:14:12.033Z","avatar_url":"https://github.com/TrustworthyDev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Race Lab Apps\n\n## First time setup\n\n### Install deps\n\nRecommended node version: 18.16.1\n\n```terminal\nyarn\n```\n\n### Dev environment\n\n- [VSCode](https://code.visualstudio.com) with these extensions\n\n  - [Code Spell Checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker).\n  - [EditorConfig for VS Code](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig).\n  - [GitLens — Git supercharged](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens).\n  - [Markdown All in One](https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one).\n  - [Todo Tree](https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.todo-tree).\n  - [Visual Studio IntelliCode](https://marketplace.visualstudio.com/items?itemName=VisualStudioExptTeam.vscodeintellicode).\n  - [Debugger for Chrome](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome).\n  - [TSLint](https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-typescript-tslint-plugin).\n  - [Prettier - Code formatter](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode).\n  - [Graphviz Interactive Preview](https://marketplace.visualstudio.com/items?itemName=tintinweb.graphviz-interactive-preview)\n\n- [Nodejs](https://nodejs.org) 10 or later\n\n## Terminal commands\n\nTo install servicestack command line utilities (used for dto generation), install:\n\n```terminal\n  npm install -g @servicestack/cli\n```\n\n### Run in dev environment\n\n```terminal\nyarn start\n```\n\nFor webpack logs, visit: http://localhost:9000\n\n#### To restart main process\n\nwhile running, just type `rs` on the terminal\n\n#### To refresh renderer code\n\njust modify the code (JS/TS, HTML or SCSS/CSS)\n\n### Make distributable\n\n```terminal\nyarn make\n```\n\n### Package the app\n\n```terminal\nyarn package\n```\n\n## Project structure\n\n### Main process\n\nLocated in `src/main/*`\n\nThis code is for setting up the application, no more no less.\n\n### Cockpit window\n\nLocated in `src/renderer/cockpit/*`\n\nThe cockpit window, basically an electron window that loads React code.\n\n### Local server (hidden window)\n\nLocated in `src/renderer/server/*`\n\nAn express application that:\n\n- Works as backend, consume the game's data, convert it and serve it in the right format for front-end widgets.\n\n- Serves frontend files, to be consumed by the browser using the URL.\n\n### Ovelay host window (transparent window)\n\nLocated in `src/renderer/overlayHost/*`\n\nA transparent always-on-top window, that loads React application and display widgets on the screen, also it consumes the information from the backend.\n\n## Notices\n\n### node-irsdk\n\nTo recompile the package for Electron, you need [MSBuild tools](https://github.com/nodejs/node-gyp/#on-windows), and it's a one-time compile task for each dev machine, all you need to do is run the command:\n\n```terminal\nyarn start\n```\n\nand ElectronForge will take care of the compiling process.\n\nYou may need to run the following command to install native dependencies\n\n```terminal\nnpm install --global --production windows-build-tools\nnpm install --global node-gyp\n```\n\n### Configure refresh on code change\n\nBecause ElectronForge does not use [webpack-dev-server](https://github.com/webpack/webpack-dev-server) (which we can tweak its config), and used instead two lightweight packages: [webpack-hot-middleware](https://github.com/webpack-contrib/webpack-hot-middleware) and [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware), when the code changes, the page [fails to reload](https://gitlab.com/programtervezo/racelabapps/issues/16).\n\nUntil they [fix this issue](https://github.com/electron-userland/electron-forge/pull/1281), you have to stick with a [workaround solution](https://gitlab.com/programtervezo/racelabapps/issues/16#note_245774779), which is very simple, you just need to modify the line 8 on this file:\n\n[./node_modules/webpack-hot-middleware/client.js](./node_modules/webpack-hot-middleware/client.js)\n\nfrom:\n\n```js\n  reload: false,\n```\n\nto:\n\n```js\n  reload: true,\n```\n\non every change made to node_modules folder, typically after running `yarn add` or `yarn remove` ...etc\n\n### Publishing\n\nTo publish a new version, simply update the package.json version, then run\n\n```terminal\nyarn pub\n```\n\nNOTICE:\n\nAfter you run `yarn add/remove`, you can't directly after it publish make or package, but instead you should run `yarn start` to rebuild the native modules against electron again, because they got reset when running the first command.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrustworthydev%2Fracelab-electronjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrustworthydev%2Fracelab-electronjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrustworthydev%2Fracelab-electronjs/lists"}