Skip to content

Yumax-panda/MKApp-deta

Repository files navigation

MKApp-deta

A web service of MK8DX discord bot.

日本語はこちらから

Key Features

  • Easy to manage game results you took part in.
  • Login with your discord account.
  • All services available without payment.

Installing

  1. Clone source

You can just run the following command:

git clone [email protected]:Yumax-panda/MKApp-deta.git
  1. Make sure to use Linux or MacOS

Linux or MaxOS recommended. If you use Windows, it would be better to use WSL instead.

  1. Match the version of Node.js

Install asdf or other software to match the version of Node.js. For asdf, run the following command:

asdf install
corepack enable
asdf reshim nodejs
  1. Install required packages
npm install
  1. Setup configuration

Just create .env file on the root directory

DETA_PROJECT_KEY=""
BOT_DB_PROJECT_KEY=""
DISCORD_CLIENT_ID=""
DISCORD_CLIENT_SECRET=""

NEXTAUTH_SECRET=""
NEXTAUTH_URL="https://localhost:3000" // localhost

DETA_PROJECT_KEY and BOT_DB_PROJECT_KEY can be the same value. Get API key after creating an account at deta.space. For discord-related environment variables, refer to the following document.

NextAuth.js Discord Documentation

You can create NEXTAUTH_SECRET key using openssl.

openssl rand -base64 32
  1. Run app
npm run dev

The login system references a cookie on your browser. If a cookie from another application is cached on the localhost site, it may not work properly. If you cannot log in, try deleting the cookie in your browser.