Transform your business reviews with intelligent, multi-language AI replies. Respond to Facebook reviews faster than ever with RepuGate.
Live Demo: https://repugate.vercel.app
Vercel |
Supabase |
Clerk |
Groq |
Also powered by:
React 18 • Node.js • Express • Tailwind CSS • PostgreSQL • Facebook Graph API
- Overview
- Tech Stack
- Architecture
- Project Structure
- Getting Started
- Deployment
- Features & How They Work
- API Documentation
- Database Schema
- Security
- Contributing
RepuGate is a SaaS application that helps business owners manage and respond to Facebook reviews efficiently. Using AI-powered reply generation, it creates thoughtful, multi-language responses in seconds—helping you maintain a positive online reputation while saving hours of manual work.
- 🏪 Retail stores and e-commerce businesses
- 🍽️ Restaurants, cafes, and food services
- 💇 Salons, spas, and beauty services
- 🏥 Healthcare and medical clinics
- 🏨 Hotels, accommodations, and travel
- 💼 Any business management Facebook reviews
✅ Fast - Generate 3 AI reply options in ~10 seconds
✅ Multi-language - English and Bangla support
✅ Easy - One-click Facebook login, no setup required
✅ Secure - OAuth authentication, Supabase database, Row-Level Security
✅ Smart - AI review prioritization and compliance checking
- React 18 - UI framework with hooks
- React Router v7 - Client-side routing
- Tailwind CSS - Utility-first styling
- Lucide React - Beautiful SVG icons
- Framer Motion - Smooth animations
- Axios - HTTP client
- Clerk - User authentication & management
- Node.js + Express - REST API framework
- Supabase - PostgreSQL database & auth
- Groq - AI model for reply generation (fast inference)
- Facebook Graph API - Review data integration
- JWT - Secure token authentication
- Helmet - Security headers
- CORS - Cross-origin resource sharing
- Vercel - Frontend and backend hosting
- Supabase - Database and real-time features
- PostgreSQL - Primary data store
- Clerk - Third-party auth provider
- Facebook Graph API v25.0 - Review integration
- npm - Package management
- Nodemon - Auto-reload during development
- Jest - Testing framework
- ESLint - Code linting
┌─────────────────────────────────────────────────────┐
│ Browser / Client │
│ (React 18) │
└────────────────┬────────────────────────────────────┘
│
├─ Frontend App (Vercel)
│ https://repugate.vercel.app
│
┌────────▼────────┐
│ Clerk OAuth │────────────────┐
│ (Auth) │ │
└─────────────────┘ │
│ │
│ x-facebook-token │
│ x-auth-token │
│ │
┌─────────▼──────────────────────┐ │
│ Backend API (Vercel) │ │
│ repugatebackend.vercel.app │ │
│ │ │
│ ├─ /api/auth/* │ │
│ ├─ /api/providers/* │ │
│ ├─ /api/reviews/* │ │
│ ├─ /api/replies/* │ │
│ └─ /api/activity/* │ │
└─────────┬──────────────────────┘ │
│ │
┌────────▼───────┐ ┌──────────▼──────┐
│ Facebook Graph │ │ Groq AI API │
│ API v25.0 │ │ (Reply Gen) │
│ (Reviews) │ └─────────────────┘
└────────┬───────┘
│
┌────────▼─────────────────────────┐
│ Supabase PostgreSQL │
│ ├─ users │
│ ├─ facebook_pages │
│ ├─ reviews │
│ ├─ generated_replies │
│ └─ activity_logs │
│ │
│ Row-Level Security (RLS) enabled│
└───────────────────────────────────┘
- Authentication: User logs in via Clerk OAuth → Token stored in localStorage
- Facebook Integration: User grants app access to their Facebook business page
- Review Fetching: App fetches reviews from Facebook Graph API using user's access token
- Review Storage: Reviews saved to Supabase with RLS restrictions (only user can access their own)
- AI Generation: Selected review sent to Groq API for 3 reply options
- Reply Management: Generated replies stored and user can copy to Facebook or save locally
repugate/
├── frontend/ # React frontend application
│ ├── public/
│ │ └── index.html
│ ├── src/
│ │ ├── assets/
│ │ │ └── images/ # Logo files (vercel, supabase, clerk, groq)
│ │ ├── components/
│ │ │ ├── App.js # Main router component
│ │ │ ├── Dashboard.js # Main dashboard (reviews + reply generator)
│ │ │ ├── LoginScreen.js # OAuth login flow
│ │ │ ├── LandingPage.js # Public landing & feature showcase
│ │ │ ├── ReviewList.js # Review list component with filtering
│ │ │ ├── ReplyGenerator.js
│ │ │ ├── GuidedTour.js
│ │ │ ├── KeyboardShortcuts.js
│ │ │ └── PrivacyPolicy.js
│ │ ├── utils/
│ │ │ ├── api.js # Axios API client
│ │ │ ├── supabaseDb.js # Supabase database functions
│ │ │ ├── clerkInstance.js
│ │ │ └── reviewPrioritization.js
│ │ ├── App.js # Router setup
│ │ ├── index.js
│ │ └── index.css # Tailwind imports
│ ├── package.json
│ └── vercel.json # Vercel routing config
│
├── backend/ # Express.js backend API
│ ├── src/
│ │ ├── server.js # Express app setup
│ │ ├── controllers/
│ │ │ ├── reviewController.js
│ │ │ └── replyController.js
│ │ ├── routes/
│ │ │ ├── providers.js # Facebook/Google API endpoints
│ │ │ ├── replies.js # AI reply generation endpoints
│ │ │ └── reviews.js # Review management endpoints
│ │ ├── utils/
│ │ │ ├── server.js # App configuration
│ │ │ ├── supabaseClient.js
│ │ │ ├── supabaseDb.js # Database layer
│ │ │ ├── aiService.js # Groq AI integration
│ │ │ ├── googleService.js
│ │ │ └── database.js # Legacy SQLite (migration in progress)
│ │ └── providers/
│ │ └── base.js
│ ├── package.json
│ ├── vercel.json # Vercel backend config
│ └── .env.example
│
├── supabase-schema-mvp.sql # Database schema & RLS policies
├── package.json # Root package (monorepo)
├── vercel.json # Main Vercel config
├── next.config.js # Next.js config (legacy)
└── README.md # This file
- Node.js 16+ and npm
- Git for version control
- Accounts required:
- Clerk (authentication)
- Supabase (database)
- Facebook Developer App
- Groq (free tier available)
git clone https://github.com/yourusername/repugate.git
cd repugatecd frontend
npm install
cd ..cd backend
npm install
cd ..Frontend (frontend/.env.local):
REACT_APP_API_URL=http://localhost:5000/api
REACT_APP_CLERK_PUBLISHABLE_KEY=your_clerk_keyBackend (backend/.env):
PORT=5000
SUPABASE_URL=your_supabase_url
SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_KEY=your_supabase_service_key
GROQ_API_KEY=your_groq_api_key
FACEBOOK_APP_ID=your_facebook_app_id
FACEBOOK_APP_SECRET=your_facebook_app_secret
NODE_ENV=developmentCreate tables in Supabase (run the SQL from supabase-schema-mvp.sql):
# Copy contents of supabase-schema-mvp.sql and paste in Supabase SQL EditorTerminal 1 - Backend:
cd backend
npm run dev
# Runs on http://localhost:5000Terminal 2 - Frontend:
cd frontend
npm start
# Runs on http://localhost:3000Visit http://localhost:3000 in your browser.
This app is deployed as two separate Vercel projects:
- Frontend:
repugate.vercel.app - Backend:
repugatebackend.vercel.app
# Push to GitHub (main branch auto-deploys)
git push origin main
# Or deploy directly
vercel deploy --prodEnvironment variables in Vercel:
REACT_APP_API_URL=https://repugatebackend.vercel.app/apiREACT_APP_CLERK_PUBLISHABLE_KEY=<your_key>
cd backend
vercel deploy --prodEnvironment variables in Vercel:
SUPABASE_URL,SUPABASE_ANON_KEY,SUPABASE_SERVICE_KEYGROQ_API_KEYFACEBOOK_APP_ID,FACEBOOK_APP_SECRETNODE_ENV=production
Supabase is cloud-hosted. To apply schema changes:
- Open Supabase Dashboard
- Go to SQL Editor
- Paste and run the contents of
supabase-schema-mvp.sql
To enable Row-Level Security (RLS):
ALTER TABLE reviews ENABLE ROW LEVEL SECURITY;
ALTER TABLE generated_replies ENABLE ROW LEVEL SECURITY;
-- (See supabase-schema-mvp.sql for all policies)How it works:
- User selects a review from the list
- Dashboard displays review contents
- User selects language (English or Bangla)
- Backend sends review to Groq API with prompt template
- Groq generates 3 reply options in ~5-10 seconds
- User picks best reply, can edit, then copy to Facebook
Prompt Engineering:
- Different prompts for positive (4-5 star) vs negative reviews
- Tone options: professional, casual, empathetic, humorous
- Safety checks ensure compliance with Facebook policies
- Multi-language templates for consistent quality
API Endpoint:
POST /api/replies/generate
Body: {
review_id: string,
review_text: string,
rating: number,
language: 'english' | 'bangla',
tone: 'professional' | 'casual' | 'empathetic' | 'humorous'
}
Response: {
replies: [string, string, string]
}
Features:
- Real-time sync with Facebook Graph API
- Review filtering: by rating, platform, language
- Search & sort capabilities
- Review prioritization (high-impact reviews recommended first)
- Keyboard shortcuts for power users
Smart Prioritization:
- Low ratings (1-2 stars) prioritized as reputation risk
- High ratings (4-5 stars) marked for loyalty building
- Recent reviews prioritized over old ones
- Unanswered reviews flagged first
User Authentication:
- OAuth via Clerk (social login: Google, Facebook, etc.)
- JWT tokens stored in localStorage
- Auto-logout after 24 hours inactivity
Data Security:
- All API calls require valid JWT
- Facebook access tokens never stored
- Row-Level Security (RLS) on all tables
- Users can only see their own reviews/data
- HTTPS-only communication
Compliance:
- GDPR ready (data erasure on account deletion)
- Facebook ToS compliant
- No data sharing with third parties
- Privacy policy inline in app
Supported languages:
- English - Professional, international standard
- Bangla (Bengali) - Native for South Asian markets
Implementation:
- User selects language before generating reply
- Backend uses language-specific prompts
- Groq API configured for multi-language output
- Character encoding: UTF-8 for Bangla support
All user actions logged for analytics:
- Review imported: X reviews fetched from Facebook
- Reply generated: 3 options created
- Reply published: Reply copied to Facebook
- Feature usage: Guided tour viewed, keyboard shortcuts used
Endpoint:
POST /api/activity/log
Body: {
action: string,
details: object,
status: 'success' | 'error'
}
- Development:
http://localhost:5000/api - Production:
https://repugatebackend.vercel.app/api
All endpoints (except /auth/login) require:
Header: x-auth-token: <jwt_token>
GET /reviews/fetch
- Fetch reviews from Facebook for current user's page
- Query:
limit=20&pageId=<page_id> - Returns:
{ success: boolean, reviews: Review[], count: number }
GET /reviews/list
- Get all reviews for user (from Supabase cache)
- Returns:
Review[]
POST /reviews/save
- Save reviews to database
- Body:
{ pageId: string, reviews: Review[] }
POST /replies/generate
- Generate 3 AI reply options
- Body:
{ "review_text": "Great service!", "rating": 5, "language": "english", "tone": "professional" } - Returns:
{ replies: [string, string, string] }
GET /replies/list
- Get all generated replies for user
- Returns:
Reply[]
POST /replies/save
- Save generated reply to database
- Body:
{ review_id: string, text: string }
GET /providers/facebook/reviews
- Fetch real reviews from Facebook Graph API
- Headers:
x-facebook-token: <user_facebook_token> - Query:
pageId=<page_id>&limit=20
POST /providers/register-user
- Register or sync user with their Facebook page
- Body:
{ userId: string, pageId: string, pageName: string }
POST /activity/log
- Log user action for analytics
- Body:
{ "action": "review_fetched", "details": { "count": 15 }, "status": "success" }
id (UUID, primary key)
clerk_id (text, unique)
email (text)
name (text)
avatar_url (text)
created_at (timestamp)
updated_at (timestamp)id (UUID, primary key)
user_id (UUID, foreign key → users)
page_id (text, Facebook page ID)
page_name (text)
page_picture_url (text)
access_token (text encrypted)
created_at (timestamp)
updated_at (timestamp)id (UUID, primary key)
user_id (UUID, foreign key → users)
page_id (text)
reviewer_name (text)
reviewer_avatar (text)
rating (integer, 1-5)
text (text)
platform_source (text: 'facebook', 'google', 'local')
facebook_review_id (text)
published_at (timestamp)
created_at (timestamp)
has_reply (boolean)id (UUID, primary key)
user_id (UUID, foreign key → users)
review_id (UUID, foreign key → reviews)
reply_text (text)
language (text: 'english', 'bangla')
model (text: 'groq', 'openai')
created_at (timestamp)
is_published (boolean)id (UUID, primary key)
user_id (UUID, foreign key → users)
action (text)
details (jsonb)
status (text: 'success', 'error')
error_message (text, nullable)
created_at (timestamp)All tables have RLS enabled with policies:
- Users can only view/edit their own data
- Service role can bypass RLS (for admin operations)
Example policy:
CREATE POLICY "Users can view own reviews"
ON reviews FOR SELECT
USING (auth.uid() = user_id);See supabase-schema-mvp.sql for complete RLS configuration.
✅ Authentication
- OAuth via Clerk (no password management)
- JWT tokens for API authentication
- Auto-logout on inactivity
✅ Data Protection
- Supabase Row-Level Security (RLS) on all tables
- Users isolated to only their own data
- HTTPS/TLS for all communications
✅ API Security
- Helmet.js for security headers
- CORS restriction to trusted origins
- Request validation and sanitization
- Rate limiting (TODO: implement)
✅ Facebook Integration
- Access tokens never stored in logs
- Graph API v25.0 (latest stable)
- Minimal required permissions
✅ Code Security
- No hardcoded secrets
- Environment variables for all sensitive data
- Regular dependency updates
- Code reviews before deployment
Never commit .env files! Use .env.example:
# Commit this file (no secrets)
cp backend/.env.example backend/.env
# Edit with real values
nano backend/.env- Issues: Open a GitHub issue for bugs or feature requests
- Documentation: Check inline code comments and this README
- Community: [Join Slack/Discord for discussions]
- Create feature branch:
git checkout -b feature/my-feature - Make changes and test locally
- Run linter:
npm run lint - Commit:
git commit -m "feat: add new feature" - Push:
git push origin feature/my-feature - Create Pull Request with description
- Frontend: React hooks, functional components, Tailwind CSS
- Backend: Express.js, async/await, meaningful variable names
- General: ESLint rules enforced, 2-space indentation
# Frontend tests
cd frontend && npm test
# Backend tests
cd backend && npm test- Rate limiting for API endpoints
- Email notifications for low ratings
- Reply templates/drafts
- Bulk reply management
- Mobile app (React Native)
- Google Reviews integration
- Instagram Business integration
- Sentiment analysis dashboard
- Automated reply scheduling
- Team collaboration features
- Multi-business support
- Advanced analytics & reporting
- Custom AI model training
- API for third-party integrations
- Self-hosted option
MIT License - See LICENSE file for details
Website: https://repugate.vercel.app
Email: support@repugate.com
GitHub Issues: https://github.com/yourusername/repugate/issues
Built with ❤️ by the RepuGate team
-
Clone the repository
git clone <repo-url> cd passive
-
Install dependencies
# Install root dependencies npm install # Install frontend cd frontend && npm install # Install backend cd ../backend && npm install
-
Set up environment variables
- Copy
.env.localto root directory - Copy
frontend/.env.exampletofrontend/.env - Copy
backend/.env.exampletobackend/.env - Add your API keys (Groq for AI, Facebook for OAuth)
- Copy
-
Start the app
# Terminal 1: Backend (http://localhost:5000) cd backend && npm start # Terminal 2: Frontend (http://localhost:3000) cd frontend && npm start
-
Visit http://localhost:3000 and click "Get Started"
[Screenshot of hero section with scroll effects]
[Screenshot of review management interface]
[Screenshot of AI reply options with language selector]
Frontend:
- React 18 with Tailwind CSS
- Framer Motion for smooth animations
- React Router for navigation
- Lucide icons for clean UI
Backend:
- Node.js + Express server
- SQLite database
- Groq API for AI generation
- Facebook Graph API integration
- Clerk for authentication
DevOps:
- GitHub Actions for CI/CD
- Environment-based configuration
- Session persistence with sessionStorage
- Connect - Sign in with your Facebook Business Page
- Load - Fetch all recent reviews from your page
- Generate - Choose a review and select your language
- Get Options - AI creates 3 professional reply options
- Copy - Copy your favorite reply to clipboard
- Post - Paste it directly on Facebook
- Lightning Fast - Get AI replies in seconds
- No Friction - Copy-to-clipboard workflow (no API posting complications)
- Beautiful Design - Dark theme with gradients and smooth transitions
- Mobile Friendly - Responsive design works on all devices
- Stay Logged In - Sessions persist across browser refreshes
- OAuth 2.0 authentication
- Review fetching with pagination
- Multi-page support
- Fast, efficient LLM for reply generation
- Multi-language support
- Context-aware business replies
- Secure user management
- One-click signup/login
- Session management
# Facebook
FACEBOOK_APP_ID=your_app_id
FACEBOOK_APP_SECRET=your_app_secret
# Groq API
GROQ_API_KEY=your_groq_key
GROQ_MODEL=llama-3.1-8b-instant
# Clerk
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_key
CLERK_SECRET_KEY=your_clerk_secret
MIT License - feel free to use and modify
Have questions? Issues? Suggestions?
- Open an issue on GitHub
- Check existing documentation
- Review the FAQ
Built with ❤️ for business owners who care about their reputation.
Made with Framer Motion, Tailwind CSS, and AI. Simplifying business communication, one review at a time.



