mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-03-22 02:14:41 -05:00
Competitive Splatoon Platform
| .github | ||
| app | ||
| cypress | ||
| discord-bot | ||
| migrations | ||
| public | ||
| scripts | ||
| types | ||
| .env.example | ||
| .eslintrc.js | ||
| .gitignore | ||
| .nvmrc | ||
| .prettierignore | ||
| .stylelintrc.json | ||
| CONTRIBUTING.md | ||
| cypress.config.ts | ||
| ley.config.js | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| remix.config.js | ||
| TODO.md | ||
| tsconfig.json | ||
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:
nvm useto switch to the correct Node version.npm ito install the dependencies.- Make a copy of
.env.examplethat's called.env. See below for note about environment variables. npm run migrate upto set up the database tables.npm run seedto fill database with test data.npm run devto run the project in development mode.
And if you want to run the E2E tests:
- Make a copy of the
db.sqlite3file created by migration and name itdb-cypress.sqlite3. npm run dev:cypressandnpm run cy:opencan 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"