Competitive Splatoon Platform
Go to file
Kalle (Sendou) e3ab352e5e closes #276
2021-03-09 13:00:58 +02:00
app xrank in app 2021-03-09 11:57:42 +02:00
components closes #276 2021-03-09 13:00:58 +02:00
cypress add tests and colors to plus voting history 2021-02-27 15:30:45 +02:00
hooks new api for plus 2021-03-09 00:01:59 +02:00
locale Update messages (#282) 2021-03-07 10:59:51 +02:00
pages xrank in app 2021-03-09 11:57:42 +02:00
prisma closes #276 2021-03-09 13:00:58 +02:00
public tasl initial 2021-02-27 18:31:41 +02:00
utils suggestion mutation backend 2021-03-08 22:04:09 +02:00
.babelrc lingui initial 2020-11-04 03:09:57 +02:00
.env update readme! 2020-12-02 19:57:54 +02:00
.gitignore closes #276 2021-03-09 13:00:58 +02:00
cypress.json cypress mock login 2021-02-25 13:28:58 +02:00
lingui.config.js hebrew translation 2021-02-12 21:15:51 +02:00
next-env.d.ts fix type errors 2020-11-18 13:57:41 +02:00
next.config.js preload font 2021-02-24 12:58:53 +02:00
package-lock.json suggestions plusStatuses via trpc 2021-03-08 20:25:16 +02:00
package.json closes #276 2021-03-09 13:00:58 +02:00
README.md update readme 2021-03-08 17:33:28 +02:00
theme.ts improved styles for select 2020-12-17 20:21:25 +02:00
tsconfig.json crash fixes 2021-01-30 13:36:39 +02:00

Discord Server

Goal of sendou.ink is to provide useful tools and resources for the Splatoon community.

Live version: https://sendou.ink/

Technologies used

  • React (via Next.JS)
  • TypeScript
  • Node.js
  • PostgreSQL (via Prisma 2)

A few of the features

🐙 Choose between light and dark mode

🦑 Planner tool where you can draw on any map in the game to conveniently make up game plans

🐙 Calendar that collects together all the events happening in the community

🦑 Users can make an account and submit their builds and browse builds made by others

🐙 It is possible to submit yourself as "free agent". If two FA's like each other they are notified and a new team can be founded

🦑 X Rank Top 500 results can be browsed through far more conveniently than on the official app

🐙 X Rank Top 500 leaderboards to compare yourself against other players

🦑 Form your own team, recruit players and make a profile

🐙 Build analyzer that reveals way more detailed information about builds than the game does

🦑 Salmon Run leaderboards featuring some of the best records

🐙 The most comprehensive link collection in the community

Setting up the project locally

Access pages that don't need database access

With the following steps you can access a few pages that don't need a database. For example: home page (/), build analyzer (/analyzer) and map planner (/plans)

  1. Clone the project
  2. Run npm i to install dependencies
  3. Run npm run compile to compile translation files.
  4. Run npm run dev to start the development server at http://localhost:3000/

Access rest of the pages

In addition to the steps above the steps below enable access to rest of the pages.

  1. Create a file called .env in the prisma folder. In it you need an environmental variable called DATABASE_URL that contains the URL to a running PostgreSQL database. For example mine looks like this while developing:
DATABASE_URL=postgresql://sendou@localhost:5432

You can see Prisma's guide on how to set up a PostgreSQL database running locally for more info.

  1. Use npm run migrate to get the database formatted with the right tables.
  2. There should be a seeding script but this doesn't exist yet. If anyone is interested in contributing this is probably a good starting point (see issue #197).

Enable logging in

In addition to the steps above the steps below enable logging in.

  1. Create a file called .env.local in the root folder. In it you need following variables:
DISCORD_CLIENT_ID=
DISCORD_CLIENT_SECRET=
JWT_SECRET=

a) Go to https://discord.com/developers/applications
b) Select "New Application"
c) Go to your newly generated application
d) On the "General Information" tab both "CLIENT ID" and "CLIENT SECRET" can be found.
e) On the "OAuth2" tab add http://localhost:3000/api/auth/callback/discord in the list of redirects.

JWT_SECRET can be any randomly generated reasonably long string.

Using API

If you wish to use the sendou.ink API for your own project like a Discord bot you can use the API endpoints under https://sendou.ink/api/bot (https://github.com/Sendouc/sendou.ink/tree/main/pages/api/bot) as long as you keep the load on my backend reasonable.

Using other endpoints isn't advised as I change those as I feel to suit the needs of the website. If the endpoints under /bot don't meet your use case feel free to leave an issue.

Contributing

If you are interested in contributing come say hello on Discord! For any feature requests or bug reports you can either leave an issue or use the #feedback channel on Discord.