Skip to content

rstanberry/RateIt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Whop Reviews App - RateIt

A comprehensive review and testimonial system for Whop communities, similar to Judge.me. This app allows community members to submit, view, and manage product/service reviews with photos, videos, and detailed analytics.

🌟 Features

For Community Members:

  • ⭐ Submit reviews with 1-5 star ratings
  • πŸ“Έ Upload photos (up to 5 per review)
  • πŸŽ₯ Upload videos (optional)
  • πŸ‘ Mark reviews as helpful/not helpful
  • πŸ” Filter reviews by rating
  • πŸ“Š Sort reviews by date, rating, or helpfulness
  • βœ… View verified purchase badges

For Admins:

  • πŸ›‘οΈ Review moderation (approve/reject/pending)
  • πŸ“ˆ Detailed analytics dashboard
  • βš™οΈ Customizable settings:
    • Auto-approve reviews
    • Require verified purchases
    • Enable/disable photos and videos
    • Set minimum rating
    • Email notifications
    • Custom thank you messages
    • Review incentives (coupon codes)
  • 🎯 Featured reviews
  • πŸ’¬ Respond to reviews
  • πŸ“Š Rating distribution charts
  • πŸ“‰ Review status breakdown

πŸš€ Getting Started

Prerequisites

  • Node.js 18+ and npm/pnpm
  • A Whop account and API key
  • A PostgreSQL database (Supabase recommended)

Installation

  1. Clone this repository or create a new Next.js project:
npx create-next-app@latest whop-reviews-app
cd whop-reviews-app
  1. Install dependencies:
npm install
# or
pnpm install
  1. Set up your database:

Create a Supabase account at https://supabase.com and create a new project.

  1. Configure environment variables:

Copy .env.local.example to .env.local and fill in your values:

# Whop API Key (Get from https://whop.com/apps)
WHOP_API_KEY=your_whop_api_key_here

# Database URLs (From Supabase)
DATABASE_URL="postgresql://user:password@host:port/database"
DIRECT_URL="postgresql://user:password@host:port/database"
  1. Initialize Prisma:
npm run prisma:generate
npm run prisma:db:push
  1. Run the development server:
npm run dev

Open http://localhost:3000 to see your app.

πŸ“¦ Project Structure

whop-reviews-app/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ api/
β”‚   β”‚   β”œβ”€β”€ reviews/[experienceId]/
β”‚   β”‚   β”‚   β”œβ”€β”€ route.ts                    # GET and POST reviews
β”‚   β”‚   β”‚   └── [reviewId]/
β”‚   β”‚   β”‚       β”œβ”€β”€ moderate/route.ts        # Approve/reject reviews
β”‚   β”‚   β”‚       └── helpful/route.ts         # Mark as helpful
β”‚   β”‚   β”œβ”€β”€ settings/[experienceId]/route.ts # Settings management
β”‚   β”‚   └── upload-image/route.ts            # Image upload handler
β”‚   β”œβ”€β”€ experiences/[experienceId]/
β”‚   β”‚   └── page.tsx                         # Main reviews page
β”‚   β”œβ”€β”€ globals.css                          # Global styles
β”‚   └── layout.tsx                           # Root layout
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ ui/
β”‚   β”‚   β”œβ”€β”€ button.tsx                       # Button component
β”‚   β”‚   └── tabs.tsx                         # Tabs component
β”‚   β”œβ”€β”€ review-form.tsx                      # Review submission form
β”‚   β”œβ”€β”€ reviews-list.tsx                     # Reviews display
β”‚   β”œβ”€β”€ stats-overview.tsx                   # Analytics stats
β”‚   └── settings-panel.tsx                   # Admin settings
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ db.ts                                # Prisma client
β”‚   β”œβ”€β”€ whop-sdk.ts                          # Whop SDK initialization
β”‚   └── utils.ts                             # Utility functions
β”œβ”€β”€ prisma/
β”‚   └── schema.prisma                        # Database schema
β”œβ”€β”€ .env.local.example                       # Environment variables template
β”œβ”€β”€ next.config.js                           # Next.js configuration
β”œβ”€β”€ package.json                             # Dependencies
β”œβ”€β”€ tailwind.config.js                       # Tailwind CSS configuration
└── tsconfig.json                            # TypeScript configuration

πŸ—„οΈ Database Schema

Review Model

  • User information and ratings
  • Text content with optional title
  • Images and videos arrays
  • Verification status
  • Helpful/not helpful counters
  • Admin moderation status
  • Store owner responses

ReviewSettings Model

  • Moderation settings
  • Content options (photos/videos)
  • Notification preferences
  • Review incentives
  • Custom messaging
  • Display preferences

ReviewAnalytics Model

  • Daily statistics
  • Rating distribution
  • Content type counts (photos/videos)

πŸ› οΈ Configuration

Whop App Setup

  1. Go to https://whop.com/apps and create a new app
  2. Set the base URL to your deployment URL
  3. Copy your API key to .env.local
  4. Install the app to your Whop community

Database Setup

The app uses Prisma with PostgreSQL. Supabase is recommended for easy setup:

  1. Create a Supabase project
  2. Copy the connection strings from Settings > Database
  3. Paste into .env.local
  4. Run migrations with npm run prisma:db:push

🎨 Customization

Styling

The app uses Tailwind CSS. Customize colors and themes in:

  • tailwind.config.js - Tailwind configuration
  • app/globals.css - Global CSS variables

Features

Enable/disable features by modifying:

  • Review settings in the admin panel
  • Database schema in prisma/schema.prisma
  • Component logic in components/

🚒 Deployment

Deploy to Vercel

  1. Push your code to GitHub
  2. Import the project in Vercel
  3. Add environment variables
  4. Deploy!
# Add this to package.json scripts for Vercel
"postinstall": "prisma generate"

Update Whop App

After deployment:

  1. Go to your Whop app settings
  2. Update the "Base URL" to your Vercel URL
  3. Test the app in your Whop community

πŸ“ API Routes

Reviews

  • GET /api/reviews/[experienceId] - Fetch all reviews
  • POST /api/reviews/[experienceId] - Submit a new review
  • PATCH /api/reviews/[experienceId]/[reviewId]/moderate - Moderate review (admin only)
  • POST /api/reviews/[experienceId]/[reviewId]/helpful - Mark review as helpful

Settings

  • PUT /api/settings/[experienceId] - Update review settings (admin only)

Upload

  • POST /api/upload-image - Upload and optimize review images

πŸ” Authentication

Authentication is handled automatically by Whop SDK:

  • User tokens verified via whopSdk.verifyUserToken()
  • Access levels checked via whopSdk.access.checkIfUserHasAccessToExperience()
  • Admin-only routes protected by access level checks

🎯 Key Features Compared to Judge.me

βœ… Implemented:

  • Star ratings (1-5)
  • Text reviews with optional titles
  • Photo and video uploads
  • Review moderation
  • Analytics dashboard
  • Helpful/not helpful voting
  • Admin responses
  • Featured reviews
  • Auto-approval settings
  • Review incentives
  • Custom messaging
  • Email notifications
  • Verified purchase badges

πŸ”„ Can be Extended:

  • Email review requests
  • Social media sharing
  • Rich snippets for SEO
  • Multi-language support
  • Advanced filtering
  • Review imports/exports
  • Bulk operations

🀝 Contributing

This is an open-source Whop app. Feel free to:

  • Report bugs
  • Suggest features
  • Submit pull requests
  • Fork and customize for your needs

πŸ“„ License

MIT License - feel free to use this code for your own Whop apps!

πŸ†˜ Support

Need help?

πŸŽ‰ Credits

Built with:

Inspired by Judge.me

About

Unlimited product reviews showcase real experiences and tangible results, helping you convert more visitors into loyal customers.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors