import { auth } from "@/lib/auth"; import { prisma } from "@/lib/prisma"; import { ProposalList } from "@/components/ProposalList"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardHeader, CardTitle, CardDescription } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; import { calculateAvailableCredits } from "@/lib/credits"; import { getEffectiveWeight } from "@/lib/voting"; import Link from "next/link"; import { ArrowRight, TrendingUp, Vote, Zap, Users, Scale, Clock, Coins, CheckCircle, Shield, Play, ListOrdered, Target, Layers, } from "lucide-react"; export default async function HomePage() { const session = await auth(); // Get top ranking proposals const proposals = await prisma.proposal.findMany({ where: { status: "RANKING" }, orderBy: { score: "desc" }, take: 5, include: { author: { select: { id: true, name: true, email: true }, }, votes: true, }, }); // Get user's votes and credits if logged in let availableCredits = 0; let userVotes: { proposalId: string; weight: number; effectiveWeight: number }[] = []; if (session?.user?.id) { const user = await prisma.user.findUnique({ where: { id: session.user.id }, select: { credits: true, lastCreditAt: true }, }); if (user) { availableCredits = calculateAvailableCredits(user.credits, user.lastCreditAt); } const votes = await prisma.vote.findMany({ where: { userId: session.user.id, proposalId: { in: proposals.map((p) => p.id) }, }, }); userVotes = votes.map((v) => ({ proposalId: v.proposalId, weight: v.weight, effectiveWeight: getEffectiveWeight(v.weight, v.createdAt), })); } // Get counts for stats const [rankingCount, votingCount, passedCount, userCount] = await Promise.all([ prisma.proposal.count({ where: { status: "RANKING" } }), prisma.proposal.count({ where: { status: "VOTING" } }), prisma.proposal.count({ where: { status: "PASSED" } }), prisma.user.count(), ]); return (
{/* Hero section */}
Part of the rSpace Ecosystem

Democratic Backlog{" "} Prioritization

rVote uses quadratic ranking to let your community democratically prioritize proposals. The best ideas rise to the top through collective intelligence, then advance to final voting.

{!session?.user ? ( ) : ( )}
{/* What is Quadratic Ranking */}
The Core Concept

What is Quadratic Ranking?

A system where expressing strong preference costs progressively more, creating a fair and balanced priority list that reflects true community consensus.

The Problem

Traditional priority systems let those with more time, resources, or influence dominate what gets attention.

  • Loudest voices set the agenda
  • Important but less flashy ideas get buried
  • No way to express intensity of preference
  • Backlogs become political battlegrounds
The Solution: Quadratic Ranking

Quadratic ranking balances participation and conviction by making additional votes progressively more expensive.

  • 1 vote = 1 credit, 2 votes = 4, 3 = 9
  • Everyone can participate meaningfully
  • Express strong opinions, but at a cost
  • Naturally surfaces community consensus
{/* Visual cost table */}

Vote Cost Calculator

{[1, 2, 3, 4, 5].map((votes) => (
{votes}
vote{votes > 1 ? "s" : ""}
{votes * votes}
credits
))}

Spreading votes across proposals you support is more efficient than concentrating on one.

{/* How it creates a democratic backlog */}
How It Works

From Chaos to Consensus

Transform your community's ideas into a democratically prioritized backlog through two simple stages.

Stage 1 Quadratic Ranking
  • All proposals enter the ranking pool
  • Upvote/downvote with quadratic cost
  • Votes decay over 30-60 days
  • Creates a living priority queue
Threshold Score +100

When a proposal reaches a score of +100, it automatically advances to the final voting stage.

This ensures only proposals with genuine community support move forward for implementation decisions.

Stage 2 Pass/Fail Vote
  • Yes / No / Abstain voting
  • One member = one vote
  • 7-day voting period
  • Majority decides implementation
{/* Features */}

Built for Fair Prioritization

Everything you need for democratic backlog management

Earn Credits Daily

Get 10 credits every day. Start with 50. Max 500.

Vote Decay

Old votes fade away, keeping rankings fresh and dynamic.

Sybil Resistant

Quadratic costs make fake account attacks expensive.

Auto Promotion

Top proposals automatically advance to voting.

{/* Stats */} {(rankingCount > 0 || userCount > 1) && (
{userCount}

Members

{rankingCount}

Being Ranked

{votingCount}

In Voting

{passedCount}

Passed

)} {/* Active proposals */} {proposals.length > 0 && (

Active Proposals

)} {/* CTA */}
Join the rSpace Ecosystem

Ready to prioritize democratically?

Experience quadratic ranking firsthand. Try the interactive demo or create an account to start building your community's backlog together.

{!session?.user && ( )}
); }