A Slack app for creating quadratic votes in your workspace. Quadratic voting is a collective decision-making procedure where participants express how strongly they feel about different issues by spending "voice credits" to influence the outcome.
Live App: qvote.omrinuri.com
- Create quadratic votes directly in Slack
- Allow team members to allocate credits across options
- Visualize voting results and analytics
- Simple and intuitive user interface
- Deno installed (version 1.38 or later)
- PostgreSQL installed and running
- A Slack workspace where you can install apps
- Clone this repository
- Copy
.env.exampleto.envand fill in your Slack app credentials and database details- Set
ENCRYPTION_SECRETto a strong random string (e.g., generate withopenssl rand -base64 32)
- Set
- Create a Slack app at https://api.slack.com/apps
- Add the necessary OAuth scopes:
commands,chat:write,channels:join - Set the redirect URL to your callback URL (e.g.,
http://localhost:8080/oauth/callback)
- Add the necessary OAuth scopes:
# Create the database
deno task setup-db
# Generate Prisma client
deno task prisma:generate
# Create and apply migrations
deno task prisma:dev
# Optional: Seed the database with initial data
deno task prisma:seed
# Optional: View database with Prisma Studio
deno task prisma:studio
# Encrypt existing tokens (if upgrading from unencrypted version)
deno run --allow-env --allow-read --allow-write scripts/migrate-encrypt-tokens.tsdeno task prisma:dev- Create a new migration and apply itdeno task prisma:deploy- Apply existing migrations to the databasedeno task prisma:status- Check the status of migrationsdeno task prisma:reset- Reset the database and apply all migrations
# Start the development server
deno task devThe project includes git hooks for code quality and coverage enforcement. To install:
# Make the install script executable
chmod +x hooks/install-hooks.sh
# Run the installation script
./hooks/install-hooks.shThis will install a pre-commit hook that enforces:
- Code linting and formatting standards
- Type checking
- Test success
- Minimum test coverage thresholds:
- Line coverage: 80%
- Branch coverage: 80%
For production:
# Start the application and database with Docker
docker compose up -d
# View logs
docker compose logs -fFor development (with hot reload and volume mounting):
# Start with development config
docker compose -f docker-compose.dev.yml up -d
# View logs
docker compose -f docker-compose.dev.yml logs -fThe server will start at http://localhost:8443.
The application uses PostgreSQL with Prisma ORM. The schema is defined in prisma/schema.prisma:
Workspace- Stores Slack workspace information and OAuth tokensVote- Stores information about quadratic votesVoteResponse- Stores user responses to votes
MIT License - Copyright (c) 2025 - All rights reserved