Competitive Splatoon Platform
Go to file
2022-07-08 11:27:44 +03:00
.github Try Cypress in Github Actions 3 2022-07-08 11:27:44 +03:00
app Test Cypress tests 2022-07-08 11:13:58 +03:00
cypress Add badges page e2e tests 2022-07-07 15:38:17 +03:00
discord-bot Fix /plus command to use non-cached data 2022-07-06 09:37:11 +03:00
migrations Add badge data scripts 2022-07-08 01:18:45 +03:00
public Add admin page to menu 2022-07-05 15:53:08 +03:00
scripts Upgrade sendou.ink deps 2022-07-08 11:03:37 +03:00
.env.example Improve getting started with project experience 2022-07-06 11:02:23 +03:00
.eslintrc.js Fix checks command problems 2022-06-22 22:36:49 +03:00
.gitignore Fix how score is shown on voting results 2022-07-04 13:17:34 +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
cypress.config.ts Add deleting suggestion of themselves 2022-06-24 14:55:59 +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 Upgrade sendou.ink deps 2022-07-08 11:03:37 +03:00
package.json Try Cypress in Github Actions 3 2022-07-08 11:27:44 +03:00
README.md Improve getting started with project experience 2022-07-06 11:02:23 +03:00
remix.config.js Add test to adding new suggestion 2022-06-04 13:10:00 +03:00
remix.env.d.ts
tsconfig.json Fix checks command problems 2022-06-22 22:36:49 +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 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

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 ./*.gif --out .

avif

https://github.com/lovell/avif-cli