Competitive Splatoon Platform
Prerequisites: nvm
There is a sequence of commands you need to run:
nvm use
to switch to the correct Node version. If you don't have the correct Node.js version yet it will prompt you to install it via the nvm install
command. If you have problems with nvm you can also install the latest LTS version of Node.js from their website.npm install
to install the dependencies..env.example
that's called .env
. Filling additional values is not necessary unless you want to use real Discord authentication or develop the Lohi bot.npm run migrate up
to set up the database tables.npm run dev
to run the project in development mode.http://localhost:5173/admin
. There press the seed button to fill the DB with test data. You can also impersonate any user (Sendou#0043 = admin).See CONTRIBUTING.md for more information.
db-test.sqlite3
Empty DB with the latest migration run. When creating new migrations they should also be applied+committed to this file (add it in .env
and then run the migration command as normal).
sendou.ink can be translated into any language. All the translations can be found in the locales folder. Here is how you can contribute:
.json
file from /en
folder."country": "Country",
could become "country": "Maa",
. Keep the "key" on the left side of : unchanged.Things to note:
weapons.json
and gear.json
are auto-generated. Don't touch these..json
files can also have some lines in English as new lines get added to the site. Those can then be translated."articleBy": "by {{author}}"
in this case {{author}}
should appear in the translated version unchanged. So in other words don't translate the part inside {{}}
."project": "Sendou.ink is a project by <2>Sendou</2> with help from contributors:",
the <2></2>
should appear in the translated version. The text inside these tags can change.Any questions please ask Sendou!
---
in-the-zone-26-winners.md
becomes https://sendou.ink/a/in-the-zone-26-winners
By default SQL is logged in truncated format. You can adjust this by changing the SQL_LOG
env var. Possible values are "trunc", "full" and "none".
Note it only logs queries made via Kysely.
If you want to use the API then please leave an issue explaining your use case. By default, I want to allow open use of the data on the site. It's just not recommended to use the same APIs the web pages use as they are not stable at all and can change at any time without warning.
sendou.ink/
├── app/
│ ├── components/ -- React components
│ ├── db/ -- Database layer
│ ├── hooks/ -- React hooks
│ ├── modules/ -- "nodu_modules but part of the app" https://twitter.com/ryanflorence/status/1535103735952658432
│ ├── routes/ -- Routes see: https://remix.run/docs/en/v1/guides/routing
│ ├── styles/ -- All .css files of the project for styling
│ ├── utils/ -- Random helper functions used in many places
│ └── permissions.ts / -- What actions are allowed. Separated by frontend and backend as frontend has constraints based on what user sees.
├── migrations/ -- Database migrations
├── public/ -- Images, built assets etc. static files to be served as is
└── scripts/ -- Stand-alone scripts to be run outside of the app
NOTE: public/static-assets
should only have files that don't change as it is cached for 1 month.
Feature folders contain all the code needed to make that feature happen. Some common folders include:
Some common files:
npx tsx scripts/add-badge.ts fire_green "Octofin Eliteboard"
npx tsx scripts/rename-badge.ts 10 "New 4v4 Sundaes"
npx tsx scripts/add-badge-winners.ts 10 "750705955909664791,79237403620945920"
sips -s format png ./sundae.gif --out .
While in the folder with the images:
for i in *.png; do npx @squoosh/cli --avif '{"cqLevel":33,"cqAlphaLevel":-1,"denoiseLevel":0,"tileColsLog2":0,"tileRowsLog2":0,"speed":6,"subsample":1,"chromaDeltaQ":false,"sharpness":0,"tune":0}' $i; done
Note: it only works with Node 16.
Note: This is only useful if you have access to a production running on Render.com
cd /var/data
cp db.sqlite3 db-copy.sqlite3
wormhole send db-copy.sqlite3
weapon
folderlanguage
folderGearInfoClothes.json
, GearInfoHead.json
, GearInfoShoes.json
, spl__DamageRateInfoConfig.pp__CombinationDataTableData.json
, SplPlayer.game__GameParameterTable.json
, WeaponInfoMain.json
, WeaponInfoSpecial.json
and WeaponInfoSub.json
CURRENT_SEASON
constantsCURRENT_PATCH
constantsPATCHES
constant with the late patch + remove the oldeststage-ids.ts
and create-misc-json.ts
. Add images from Lean's repository and avify them.npx tsx scripts/create-misc-json.ts
npx tsx scripts/create-gear-json.ts
npx tsx scripts/create-analyzer-json.ts
8a. Double check that no hard-coded special damages changednpx tsx scripts/create-object-dmg-json.ts
weapon-ids.ts
(easy to take from the diff of English weapons.json)gear-ids.ts
.object-dmg.json
with the object-dmg.json
in /output folderweapon-params.ts
with the params.json
in /output foldermain-weapons
, main-weapons-outlined
, main-weapons-outlined-2
and gear
folders.npx tsx scripts/replace-img-names.ts
commandnpx tsx scripts/replace-weapon-names.ts
commandgear.json
and weapons.json
filesIf you change any files and the CI pipeline errors out on certain formatting/linting steps (Biome) run this command in the repo's root directory:
npm run checks
Before committing, if for some reason you see an abnormally high amount of files changed, simply run git add --renormalize .
and it will fix the error.