Competitive Splatoon Platform
Go to file
2022-08-07 12:07:32 +03:00
.github Try Cypress in Github Actions 6 2022-07-08 14:27:16 +03:00
app Get users to combobox via useSWR 2022-08-07 12:07:32 +03:00
cypress "browses weeks and inspects event page" E2E test 2022-07-31 20:32:38 +03:00
discord-bot Add command to update usernames and avatars 2022-07-15 23:54:08 +03:00
migrations Save discord invite code instead of the whole URL 2022-07-30 13:19:54 +03:00
public Don't add Badge prizes tag in seeding 2022-07-28 23:51:31 +03:00
scripts add-badge script 2022-07-23 01:40:21 +03:00
types Translate tag 2022-07-28 21:32:42 +03:00
.env.example Patreon pledge data parsing endpoint initial 2022-07-10 12:27:02 +03:00
.eslintrc.js Patrons with node cron 2022-07-13 00:11:09 +03:00
.gitignore Footer desktop initial 2022-07-11 16:11:09 +03:00
.nvmrc Upgrade sendou.ink deps 2022-07-08 11:03:37 +03:00
.prettierignore User page initial with SQLite3 (#822) 2022-05-16 17:52:54 +03:00
.stylelintrc.json Stylelint allow -webkit-backdrop-filter 2022-03-07 00:39:40 +02:00
CONTRIBUTING.md Add CONTRIBUTING.md 2022-07-16 16:15:19 +03:00
cypress.config.ts Patreon pledge data parsing endpoint initial 2022-07-10 12:27:02 +03:00
ley.config.js Set DB path from env var 2022-06-07 01:23:33 +03:00
LICENSE User page initial with SQLite3 (#822) 2022-05-16 17:52:54 +03:00
package-lock.json Get users to combobox via useSWR 2022-08-07 12:07:32 +03:00
package.json Get users to combobox via useSWR 2022-08-07 12:07:32 +03:00
README.md Fix setting up instructions 2022-07-25 22:01:05 +03:00
remix.config.js Extract Tags component to a separate file 2022-07-28 21:49:05 +03:00
TODO.md Get users to combobox via useSWR 2022-08-07 12:07:32 +03:00
tsconfig.json Type safe translations 2022-07-17 12:25:28 +03:00

Note: This is the WIP Splatoon 3 version of the site. To see the current live version checkout the main branch

Running locally

sendou.ink

Prerequisites: nvm

There is a sequence of commands you need to run:

  1. nvm use to switch to the correct Node version.
  2. npm i to install the dependencies.
  3. Make a copy of .env.example that's called .env. See below for note about environment variables.
  4. npm run migrate up to set up the database tables.
  5. npm run seed to fill database with test data.
  6. npm run dev to run the project in development mode.

And if you want to run the E2E tests:

  1. Make a copy of the db.sqlite3 file created by migration and name it db-cypress.sqlite3.
  2. npm run dev:cypress and npm run cy:open can be used to run the E2E tests.

Environment variables

You don't need to fill the missing values from .env.example to get started. Instead of using real auth via Discord you can "impersonate" the admin (=Sendou#0043) or any other use in the /admin page once the project has started up. LOHI_TOKEN is only needed for bot + sendou.ink interoperability.

Lohi

TODO: instructions on how to develop Lohi locally

Contributing

Contributions very welcome! See CONTRIBUTING.md for more information.

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.
├── cypress/ -- see: https://docs.cypress.io/guides/core-concepts/writing-and-organizing-tests#Folder-structure
├── 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

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"