Skip to content

MariaSoledadMoya/reward-system

 
 

Repository files navigation

Reward System

Introducing the perfect companion for your Discord community! 💻🚀 This reward calculation bot is the ultimate tool for those seeking recognition for their contributions. From small code tweaks to large collaborative projects, this bot is equipped to calculate and display the rewards deserved for each contribution. ⚙️💰 With its precision and speed, this bot will make your creators feel valued and motivated to keep working in the community. Don't wait any longer to add it to your Discord server and give your members the gratification they deserve! 💯💪

.github
  └─ workflows
        └─ CI with pnpm cache setup
.vscode
  └─ Recommended extensions and settings for VSCode users
apps
  ├─ bot
  |   ├─ Node
  |   ├─ Discord JS
  |   ├─ tRPC Client
  |   └─ TypeScript
  └─ next.js
      ├─ Next.js 13
      ├─ React 18
      ├─ Tailwind CSS
      └─ E2E Typesafe API Server & Client
packages
 ├─ api
 |   └─ tRPC v10 router definition
 ├─ auth
     └─ authentication using next-auth. **NOTE: Only with Discord**
 └─ db
     └─ typesafe db-calls using Prisma

Run Project

As the project uses Turborepo, you could run the following commands on the root, and it will run every inner same command.

Run the Main Project

Install Dependencies pnpm install

Build the app pnpm build

Run the app locally pnpm dev

Run the Bot

Install Dependencies (if this is the first time you run this command) pnpm install

Run the bot pnpm start

How can I contribute ?

It is an open-source project, check the issues and join our discord to be part of this community.

Quick Start

To get it running, follow the steps below:

Setup .ENV

DATABASE_URL=""

NEXTAUTH_SECRET=""
NEXTAUTH_URL=""

DISCORD_CLIENT_ID=""
DISCORD_CLIENT_SECRET=""
DISCORD_BOT_TOKEN=""

Configure DB (SUPABASE)

Create a new project in Supabase, go to settings / database / Connection string(URI). more details here

Configure NEXT AUTH

NEXTAUTH_URL Your localhost.

Configure DISCORD BOT

  1. Go to the Discord Developer Portal.

  2. Create a New Application. Application

  3. Your next step is to go over the menu on the left side of the screen and click “Bot”.

    Bot

  4. Now you want to click the blue “Add Bot” button. Add Bot

  5. Click the “Yes, do it!” button…

  6. You’ll also see a “Token” and a blue link you can click called “Copy”. Token

DISCORD_BOT_TOKEN="YOUR_TOKEN"

  1. Add Your Bot to a Discord Server

  2. In order to add your bot to your Discord Server, you’ll need to navigate back to the “OAuth2” "URL GENERATOR" tab.

    Token

  3. In the “Scopes” section, you’ll want to select the “bot” checkbox. Token

  4. “Bot Permissions” section. This is where you choose what permissions to give your bot, and what it can and can’t do.

  5. After you’ve selected your permissions, scroll up a little bit and look at the URL that was generated.

  6. Click the blue “Copy” button on the right side. This is the URL you’ll navigate to in order to add your bot to a server.

Configure DISCORD KEYS

  1. you’ll need to navigate back to the “OAuth2” "GENERAL" tab.

  2. Copy "CLIENT ID"

    Token

DISCORD_CLIENT_ID="1xxxxxxxxx"

  1. Click the blue “Reset Secret” button.
  2. Click “YES” button.
  3. You’ll also see a “Token” and a blue link you can click called “Copy”.

DISCORD_CLIENT_SECRET="SECRET_TOKEN"

References

The stack originates from create-t3-app.

A blog post where I wrote how to migrate a T3 app into this.

About

Reward System - Indie Creators

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 82.5%
  • JavaScript 15.3%
  • Shell 2.1%
  • CSS 0.1%