* Added Danish translations for Analyzer.json Added Danish translations in the Analuzer.json files for the following lines. damage.SPLATANA_VERTICAL_DIRECT damage.SPLATANA_VERTICAL damage.SPLATANA_HORIZONTAL_DIRECT damage.SPLATANA_HORIZONTAL * Updated Danish Translations in common.json Updated and changed translations in the common.json file Added following translations pages.u plans.blueprint plans.noImg Changed following translations - pages.builds (changed to a shorter name to avoid cluttering on the main page) - pages.analyzer (changed to a shorter name to avoid clutting on the main page) - pages.plans (changed to a shorter name to make in order to make all pages names shorter) - pages.object-damage-calculator (changed to a shorter name to avoid cluttering on the main page. This is a wierd translation, so it might be changed in the future) * Added Danish translations to contributions.json Added the folloing line to the contributions.json file -yaga changed the translation for the following line - borzoic (changed a word, to make the translation more correct) * Added Danish translations for the faq.json file Added Danish translations for the faq.json file. The following lines have been added q5 a5 q6 a6 * Added DAnish translations for the user.json file The following lines have been translated in the user.json file search.info search.noResults * Added Danish translations for analyser.json Added Danish translations for the following lines in the analyzer.json file - "stat.humanoidFormInkRecoverySeconds" - "stat.swimSpeedHoldingRainmaker" Changed Danish translations for - "stat.squidFormInkRecoverySeconds" # Changed made so the translation match the translation for "stat.humanoidFormInkRecoverySeconds" * Added Danish translations in the common.json file Added Danish translations for the following lines in the common.json file - weapon.category.subs -weapon.category.specials The following lines have been altered. all "weapon.category." lines. - Removed the English names for the categories in order to avoid too much cluttering in the planner tool. * Added Danish Translations for User.json Fhe folloing Danish translations were added to the User.json file. - weaponPool - discordExplanation - forms.errors.maxWeapons * Added Danish Translations for team.json All added translations are direct translations or not translated, as their are no official Danish translations for these roles and in order reduce the likelyhood of misunderstandings. |
||
|---|---|---|
| .github | ||
| app | ||
| content/articles | ||
| discord-bot | ||
| e2e | ||
| migrations | ||
| public | ||
| scripts | ||
| types | ||
| .editorconfig | ||
| .env.example | ||
| .eslintrc.js | ||
| .gitattributes | ||
| .gitignore | ||
| .nvmrc | ||
| .prettierignore | ||
| .prettierrc.js | ||
| .stylelintrc.json | ||
| CONTRIBUTING.md | ||
| ley.config.js | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| playwright.config.ts | ||
| README.md | ||
| remix.config.js | ||
| screenshot-1.png | ||
| screenshot-2.png | ||
| screenshot-3.png | ||
| tsconfig.json | ||
Competitive Splatoon Hub with over 20k registered users.
Selected Features
- Map planner that lets you draw on maps and insert weapons
- Map list generation tool
- Win badges from tournaments, management tools for TO's
- Calendar to find out upcoming events to play in
- Event result reporting
- Plus Server for top player "looking for group purposes" voting and suggestion tools.
- User pages
- User search
- Object Damage Calculator (how much does each weapon deal vs. different objects)
- Build Analyzer (exact stats of your builds)
- Auth via Discord
- Light and dark mode
- Localization
Tech stack
- React
- Remix
- Sqlite3
- CSS (plain)
Screenshots
Running locally
sendou.ink
Prerequisites: nvm
There is a sequence of commands you need to run:
nvm useto 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 thenvm installcommand. If you have problems with nvm you can also install the latest LTS version of Node.js from their website.npm ito install the dependencies.- Make a copy of
.env.examplethat's called.env. Filling additional values is not necessary unless you want to use real Discord auth or develop Lohi bot. npm run migrate upto set up the database tables.npm run devto run the project in development mode.- Navigate to
http://localhost:5800/admin. There press the seed button to fill the DB with test data. You can also impersonate any user (Sendou#0043 = admin).
Contributing
See CONTRIBUTING.md for more information.
Translations
sendou.ink can be translated to any language. All the translations can be found in the locales folder. Here is how you can contribute:
- Copy a
.jsonfile from/enfolder. - Translate lines one by one. For example
"country": "Country",could become"country": "Maa",. Keep the "key" on the left side of : unchanged. - Finally send the translated .json to Sendou or make a pull request if you know how.
Things to note:
weapons.jsonandgear.jsonare auto-generated. Don't touch these.- If some language doesn't have a folder it can be added.
- Some translated
.jsonfiles can also have some lines in English as new lines get added to the site. Those can then be translated. - Some lines have a dynamic part like this one:
"articleBy": "by {{author}}"in this case{{author}}should appear in the translated version unchanged. So in other words don't translate the part inside{{}}. - There is one more special syntax to keep in mind. When you translate this line
"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. - To update a translation file copy the existing file, do any modifications needed and send the updated one.
Any questions please ask Sendou!
Articles
- Take an existing article as base: https://raw.githubusercontent.com/Sendouc/sendou.ink/rewrite/content/articles/in-the-zone-26-winners.md
- Copy and paste the contents to a text file
- First edit the info section at the top:
- "title" = title of the page
- "date" = date when this article was written (format YYYY-MM-DD)
- "author" = your name as you want it shown on the website
- Write the actual article below the second
--- - You can use Markdown for more advanced formatting (read https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax for more info)
- Name the file as you want the url to be. For example
in-the-zone-26-winners.mdbecomeshttps://sendou.ink/a/in-the-zone-26-winners - Send the file to Sendou (or open a pull request if you know how)
- Optional: also send an image as .png if you want to show a link preview. Preferred dimensions are 1200 × 630.
API
If you want to use the API then please leave an issue explaing 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 API's the web pages use as they are not stable at all and can change at any time without warning.
Project structure
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.
├── discord-bot/ -- Lohi Discord bot that works together with sendou.ink
├── 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
Feature folders contain all the code needed to make that feature happen. Some common folders include:
- routes (same principle as Remix file system routing)
- queries
- components
- core (all core logic, separated from any React details)
Some common files:
- styles.css
- feature-hooks.ts
- feature-utils.ts
- feature-constants.ts
- feature-schemas.server.ts
Note: for anything that should be accessed outside of that feature should be re-exported in the index.ts file (information hiding). Note2: Currently the project is in progress to migrating this style so that's why not everything is using it yet.
Commands
Converting gifs (badges) to thumbnail (.png)
sips -s format png ./sundae.gif --out .
Add new badge to the database
npm run add-badge -- sundae "4v4 Sundaes"
Rename display name of a badge
npm run rename-badge -- sundae "New 4v4 Sundaes"
Convert many .png files to .avif
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
How to...
Download production database from Render.com
Note: This is only useful if you have access to a production running on Render.com
- Access "Shell" tab
cd /var/datacp db.sqlite3 db-copy.sqlite3wormhole send db-copy.sqlite3- On the receiver computer use the command shown.
Doing monthly update
- Fill /scripts/dicts with new data from leanny repository:
- weapon = contents of
weaponfolder - langs = contents of
languagefolder - Couple other at the root:
GearInfoClothes.json,GearInfoHead.json,GearInfoShoes.json,spl__DamageRateInfoConfig.pp__CombinationDataTableData.json,SplPlayer.game__GameParameterTable.json,WeaponInfoMain.json,WeaponInfoSpecial.jsonandWeaponInfoSub.json
- weapon = contents of
- Update
AVAILABLE_SR_GEARwith new SR gear - Update all
CURRENT_SEASONconstants - Update
CURRENT_PATHconstants npm run create-misc-jsonnpm run create-gear-jsonnpm run create-analyzer-jsonnpm run create-object-dmg-json- Fill new weapon ID's by category to
weapon-ids.ts(easy to take from the diff of english weapons.json) - Get gear id's for each slot from /output folder and also update gear id files.
- Replace
object-dmg.jsonwith theobject-dmg.jsonin /output folder - Replace
weapon-params.jsonwith theparams.jsonin /output folder - Delete all images inside
main-weapons,main-weapons-outlinedandgearfolders. - Replace with images from Lean's repository.
- Run the
npm run replace-img-namescommand - Run the
npm run replace-weapon-namescommand - Run the avif generating command in each image folder.
- Update manually any languages that use English
gear.jsonandweapons.jsonfiles
Fix errors from the CI Pipeline
If you change any files and the CI pipeline errors out on certain formatting/linting steps (e.g. the Prettier or Stylelint step), run this command in the repo's root directory:
npm run cf
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.
- Background info: this is caused by the line endings on your local repo not matching those with the remote repo's, which should remove the vast majority of unstaged files that appears to have no changes at all.
- Reference: https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings