-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #73 from MinaFoundation/feature/deliberation-phase
Feature/deliberation phase
- Loading branch information
Showing
44 changed files
with
1,417 additions
and
298 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# JWT Configuration - RS512 Key Pair | ||
JWT_PRIVATE_KEY_RS512="-----BEGIN PRIVATE KEY----- | ||
...your private key here... | ||
-----END PRIVATE KEY-----" | ||
|
||
JWT_PUBLIC_KEY_RS512="-----BEGIN PUBLIC KEY----- | ||
...your public key here... | ||
-----END PUBLIC KEY-----" | ||
# Discord Bot Configuration | ||
DISCORD_TOKEN="your-bot-token" # Bot token from Discord Developer Portal | ||
CLIENT_ID="your-client-id" # Application ID from Developer Portal | ||
GUILD_ID="your-guild-id" # Server ID where bot will operate | ||
PUBLIC_KEY="your-public-key" # Application public key from Developer Portal | ||
|
||
# Application URL | ||
NEXT_APP_URL="http://localhost:3000" # Used for Discord embed links | ||
|
||
# PGAdmin Configuration | ||
PGADMIN_EMAIL=admin@example.com | ||
PGADMIN_PASSWORD=pgadmin_password | ||
|
||
# Database Configuration | ||
POSTGRES_DB=govbot | ||
POSTGRES_PASSWORD=your_secure_password_here | ||
DATABASE_URL="postgresql://postgres:your_secure_password_here@db:5432/govbot?schema=public" | ||
|
||
# Environment | ||
NODE_ENV=development | ||
|
||
# Logging | ||
APP_LOG_LEVEL=DEBUG | ||
|
||
# OCV API Configuration | ||
NEXT_PUBLIC_OCV_API_BASE_URL=http://on-chain-voting-server:8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
prisma/migrations/20241208233644_add_delibration_votes/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
-- CreateTable | ||
CREATE TABLE "CommunityDeliberationVote" ( | ||
"id" UUID NOT NULL, | ||
"proposalId" INTEGER NOT NULL, | ||
"userId" UUID NOT NULL, | ||
"feedback" TEXT NOT NULL, | ||
"createdAt" TIMESTAMPTZ(6) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
|
||
CONSTRAINT "CommunityDeliberationVote_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "ReviewerDeliberationVote" ( | ||
"id" UUID NOT NULL, | ||
"proposalId" INTEGER NOT NULL, | ||
"userId" UUID NOT NULL, | ||
"feedback" TEXT NOT NULL, | ||
"recommendation" BOOLEAN NOT NULL, | ||
"createdAt" TIMESTAMPTZ(6) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
|
||
CONSTRAINT "ReviewerDeliberationVote_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateIndex | ||
CREATE INDEX "CommunityDeliberationVote_userId_idx" ON "CommunityDeliberationVote"("userId"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "CommunityDeliberationVote_proposalId_userId_key" ON "CommunityDeliberationVote"("proposalId", "userId"); | ||
|
||
-- CreateIndex | ||
CREATE INDEX "ReviewerDeliberationVote_userId_idx" ON "ReviewerDeliberationVote"("userId"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "ReviewerDeliberationVote_proposalId_userId_key" ON "ReviewerDeliberationVote"("proposalId", "userId"); | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "CommunityDeliberationVote" ADD CONSTRAINT "CommunityDeliberationVote_proposalId_fkey" FOREIGN KEY ("proposalId") REFERENCES "Proposal"("id") ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "CommunityDeliberationVote" ADD CONSTRAINT "CommunityDeliberationVote_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "ReviewerDeliberationVote" ADD CONSTRAINT "ReviewerDeliberationVote_proposalId_fkey" FOREIGN KEY ("proposalId") REFERENCES "Proposal"("id") ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "ReviewerDeliberationVote" ADD CONSTRAINT "ReviewerDeliberationVote_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE; |
Oops, something went wrong.