Competitive Splatoon Platform
Go to file
2021-11-08 18:24:38 +02:00
.vscode Map pools frontend initial 2021-10-31 01:22:28 +03:00
api Use shared packages for storing constants 2021-10-31 10:40:24 +02:00
frontend Select fix warning 2021-11-06 12:38:44 +02:00
postgraphile Seed tournaments with faker 2021-11-08 18:24:38 +02:00
server Update README 2021-10-31 13:15:39 +02:00
shared Use shared packages for storing constants 2021-10-31 10:40:24 +02:00
.gitignore Prisma initial 2021-10-23 19:18:20 +03:00
.prettierignore Add Prettier 2021-10-31 13:23:45 +02:00
.prettierrc.json Add Prettier 2021-10-31 13:23:45 +02:00
package-lock.json Add Prettier 2021-10-31 13:23:45 +02:00
package.json Add Prettier 2021-10-31 13:23:45 +02:00
README.md Update README 2021-10-31 13:15:39 +02:00

sendou.ink (Splatoon 3)

Next version of sendou.ink

⚠️ This branch is still experimental and likely to have very big changes quickly

Getting started

If these instructions are wrong please make an issue and let's fix them

Prerequisites: Node.js & PostgreSQL running locally (guide)

You might be able to skip steps 2-4 and use a few pages but most pages need a server with database connected.

  1. Install dependencies with running npm install command in the root folder
  2. Make a copy of the .env.sample file in the /server folder and name it .env
  • See below for documentation about what the values mean and which are optional
  1. In the /server folder seed the database with the npm run seed command
  2. In the /server folder run the development server with the npm run dev command
  3. Make a copy of the .env.sample file in the /frontend folder and name it .env.local
  • See below for documentation about what the values mean and which are optional
  1. In the /frontend folder run the app with the npm run dev command

.env

/server

Name Description Required
DATABASE_URL Database connection string. For example mine is currently postgresql://sendou@localhost:5432/sendou_ink_3 Yes
DISCORD_CLIENT_ID Used for auth. Make an application on Discord No
DISCORD_CLIENT_SECRET See above. No
DISCORD_CALLBACK_URL See above. No
FRONTEND_URL Where frontend is located. Cell Yes
NODE_ENV development when developing, production in production Yes

/frontend

Name Description Required
NEXT_PUBLIC_BACKEND_URL Where backend is located. Yes

Folder structure

/api

TypeScript types that acts as a pact between frontend and backend.

/frontend

This folder contains frontend specific code.

frontend/
├── __mocks__/           mocks for tests
├── assets/              images and other assets to be imported directly to code
├── components/          react components
├── hooks/               react hooks including data fetching logic
└── utils/               frontend specific utility methods, constants etc.

/server

This folder contains backend specific code.

server/
├── index.ts/               entry point
├── routes/                 route handling logic (controllers)
├── middleware/             middlewares that are called before controllers
├── services/               methods that talk to the database
├── core/                   business logic
└── prisma/
    ├── migrations/         migrations
    ├── schema.prisma       database models
    └── seed.ts             seeding script

/shared

Utilities, constants etc. that are shared between frontend and backend.