Prototype
Application prototype for LIGA Esports Manager
Install / Use
/learn @playliga/PrototypeREADME
APIs and Technologies
- Node
v24.11.1. - Electron
v40.0.0. - SQLite
v5.x.- On Windows, Python
3.10or above is required.
- On Windows, Python
Getting Started
[!IMPORTANT] On windows,
npm startmust be run from CMD.exe, Powershell, or WSL2. More Info.
npm install
npm start
Resetting the Database
[!IMPORTANT] A Pandascore Access Token is required.
This application uses Prisma ORM to manage its database interactions.
A unique Prisma Client is generated from the schema defined in source control which sometimes may need to be regenerated along with the database for troubleshooting purposes.
npm run db:reset
After resetting the database the teams and players data will be repopulated using PandaScore API. A token must be provided in the .env file in order for this to work.
Development CLI
Provides convenience wrappers and business logic for common development tasks.
npm run cli help
Building
Generate platform specific distributables.
npm run make
Publishing
[!IMPORTANT] A Github Access Token is required.
The publish command will build the application and publish it to Github as a draft release.
export GITHUB_TOKEN="<...>"
npm run publish
Updating Application Icon
The installers only accept an .ico file so it must be manually converted from the base assets/icon.png image.
npm run gen:icon
Miscellaneous
Marketing
The resolution used for games and the app should be set to 1280x960.
The game being demoed should also be running in window mode so that the transition between app and game is seamless when taking videos.
Transcoding Videos
.webm format should be used for videos such as the one used in the landing page because .mp4 has stuttering and performance issues.
VP9 prefers to encode in two passes so the first pass compiles a log file with statistics about the video file which is then used in the second pass to make the video.
ffmpeg -i landing.mp4 -b:v 0 -crf 30 -pass 1 -an -f webm -y /dev/null
ffmpeg -i landing.mp4 -b:v 0 -crf 30 -pass 2 landing.webm
For VP9, the CRF can range from 0 (best quality) to 63 (smallest file size). It is set to 30 above for roughly, medium quality.
Converting PNG to SVG
SVGs are great for responsive apps so if it's feasible, consider converting that PNG to an SVG using ImageMagick and AutoTrace.
convert autotrace:src/assets/logo.png src/icons/logo.svg
Troubleshooting
Error: Cannot find module 'undefinedbuild/Release/node_sqlite3.node'
This is caused by editing files while the app is transpiling.
Error: Could not detect abi for version and runtime electron
rm -rf package-lock.json node_modules
npm install
