A light backend application for discord-server admins who'd like to provide a system where members can read and write reviews about their transaction experiences with other users.
As a discord user, I noticed some servers with #review-channels where members would leave post transaction reviews for other members in a text thread, which made it difficult to find and track reviews for a specific user. I thought that adding a database would help with managing reviews as the amount of reviews in these channels increased.
- Next.js
- Prisma
- Discord API
- Ngrok
Try the application live at https://discord-reputation-bot.vercel.app/
- User can read a review
- User can leave a review
- Admin can delete reviews
- Node.js 18 or higher
- NPM 18 or higher
-
Clone the repository.
git clone https://github.com/anthony-urbina/discord-reputation-bot cd discord-reputation-bot
-
Install all dependencies with NPM.
npm install
-
Install Ngrok globally.
npm install -g ngrok
-
Run Ngrok to expose your local server.
ngrok http 3000
-
Import the example database to PostgreSQL.
npm run db:import
-
Make a copy of the .env.example file. Name your copy
.env
.cp .env.example .env
-
Set up your environmental variables in
.env
. ReplacechangeMe
with your own credentials.DISCORD_APP_ID="changeMe" DISCORD_PUBLIC_KEY="changeMe" DISCORD_PRIVATE_KEY="changeMe" ACCELERATE_DATABASE_URL="prisma://accelerate.prisma-data.net/?api_key=changeMe POSTGRES_URL_NON_POOLING="postgresql://user:changeMe@host:port/db_name?schema=public"
-
Create the tables in your database
npx prisma db push
-
Generate Prisma Client:
npx prisma generate --no-engine
-
Start the project. Once started you can view the application by opening http://localhost:3000 in your browser.
npm run dev
- If you are having any issues setting up Prisma Accelerate please visit https://www.prisma.io/docs/data-platform/accelerate/getting-started