India's first comprehensive professor and college rating platform with privacy-first anonymous reviews and advanced moderation
Live Platform: Visit RateMyProf.in โข API Docs: API Documentation
Windows:
start-dev.batPowerShell:
.\start-dev.ps1This will start:
- ๐ Frontend: http://localhost:3000
- ๐ก Backend API: http://localhost:8000
- ๐ API Docs: http://localhost:8000/docs
Start Here:
- ๐ EXECUTIVE_SUMMARY.md - One-page project overview
- ๐ VISUAL_PROJECT_MAP.md - Visual guide with diagrams
- ๐ PROJECT_STATUS_OVERVIEW.md - Complete detailed status
Technical Documentation:
- SYSTEM_DOCUMENTATION.md - Full architecture
- NEW_FEATURES_DOCUMENTATION.md - Recent features
- PRIORITY_2-5_IMPLEMENTATION_COMPLETE.md - Admin features
- ๐ Dual Rating System
- Rate professors on multiple dimensions (Overall, Clarity, Helpfulness, Difficulty)
- Rate colleges on facilities, teaching, opportunities, and more
- ๐ Privacy-First Anonymous Reviews
- Submit reviews without revealing your identity
- Secure mapping tables separate authorship from content
- ๐ณ๏ธ Community-Driven Voting
- Upvote/downvote helpful reviews
- Flag inappropriate content
- โ Contribute to Database
- Add professors not yet listed
- Add colleges to the platform
- ๏ฟฝ User Dashboard
- Manage all your reviews in one place
- Track your contributions
- ๐ Smart Search & Filters
- Find professors by name, department, or college
- Filter by ratings and review count
- ๐ค AI-Powered Content Moderation
- Automatic profanity detection
- Spam and low-quality review filtering
- Sentiment analysis
- ๐ Comprehensive Analytics
- User activity tracking
- Review statistics and trends
- Platform health metrics
- โก Bulk Operations
- Approve/reject multiple reviews at once
- Mass user management
- ๐ง User Communication
- Automated notification system
- Ban/warn users with reasons
- Handle appeals professionally
- ๐ Advanced Moderation Tools
- Review flagging system
- User activity logs
- Rate limiting controls
- ๐ College Profiles
- Aggregate ratings across all dimensions
- Student reviews and feedback
- Department-wise professor listings
- ๏ฟฝ Reputation Management
- Real-time feedback from students
- Transparent rating system
- Appeal process for disputed reviews
- Framework: Next.js 14 with App Router
- Language: TypeScript
- Styling: Tailwind CSS
- UI Components: Custom components + Lucide icons
- State Management: React Hooks + Context API
- API Client: Axios
- Authentication: Supabase Auth
- Forms: React Hook Form
- Notifications: React Hot Toast
- Framework: FastAPI (Python 3.11+)
- API Documentation: OpenAPI/Swagger (auto-generated)
- Validation: Pydantic v2
- Server: Uvicorn with auto-reload
- Authentication: JWT tokens via Supabase
- CORS: Configured for cross-origin requests
- Database: PostgreSQL (via Supabase)
- Authentication: Supabase Auth
- Storage: Supabase Storage (for future uploads)
- Real-time: Supabase Realtime (potential)
- Row Level Security (RLS): Enabled for privacy
- Text Analysis: TextBlob (sentiment analysis)
- Profanity Filter: better-profanity
- ML Framework: scikit-learn (spam detection)
- Auto-Flagging: Custom rule-based system
- Version Control: Git + GitHub
- CI/CD: GitHub Actions
- Frontend Hosting: GitHub Pages (static export)
- Backend Hosting: Railway.app / Render.com (recommended)
- Domain: Custom domain via Namecheap
- SSL/TLS: GitHub Pages auto-SSL
- Node.js 18+ and npm 9+
- Python 3.11 or higher
- Git for version control
- Supabase Account (free tier works!)
git clone https://github.com/NihaallX/ratemyprof.git
cd ratemyprofcd backend
# Install dependencies
pip install -r requirements.txt
# or
pip install -e .
# Create environment file
cp .env.example .env
# Edit .env with your credentials:
# - SUPABASE_URL (from Supabase project settings)
# - SUPABASE_SERVICE_ROLE_KEY (from Supabase API settings)
# - ADMIN_USERNAME and ADMIN_PASSWORDcd ../frontend
# Install dependencies
npm install
# Create environment file
cp .env.local.example .env.local
# Edit .env.local with:
# - NEXT_PUBLIC_SUPABASE_URL
# - NEXT_PUBLIC_SUPABASE_ANON_KEY
# - NEXT_PUBLIC_API_URL (http://localhost:8000/v1 for dev)Run the SQL scripts in your Supabase SQL Editor in this order:
# 1. Create tables
scripts/create_users_table.sql
scripts/create_missing_tables.sql
scripts/create_auto_flagging_tables.sql
scripts/create_user_activities_table.sql
scripts/create_user_communication_tables.sql
scripts/create_college_review_author_mappings.sql
scripts/create_college_review_moderation_tables.sql
# 2. Migrate to anonymous reviews (if upgrading)
scripts/migrate_to_anonymous_reviews.sqlOr use the Python setup script:
python backend/setup_database.pyOption A: Both servers at once (Recommended)
# Windows
start-dev.bat
# PowerShell
.\start-dev.ps1Option B: Separate terminals
# Terminal 1 - Backend
cd backend
uvicorn src.main:app --reload --port 8000
# Terminal 2 - Frontend
cd frontend
npm run devAccess the application:
- ๐ Frontend: http://localhost:3000
- ๐ก Backend API: http://localhost:8000/v1
- ๐ API Docs: http://localhost:8000/docs
- ๐ Alternative Docs: http://localhost:8000/redoc
The frontend is configured for static export and automatic deployment via GitHub Actions.
See detailed guide: GITHUB_PAGES_SETUP.md
Quick Steps:
- Configure GitHub Pages in repository settings (Source: GitHub Actions)
- Add secrets:
NEXT_PUBLIC_SUPABASE_URL,NEXT_PUBLIC_SUPABASE_ANON_KEY,NEXT_PUBLIC_API_URL - Configure custom domain in Namecheap DNS
- Push to
mainbranch - auto-deploys!
Recommended: Railway.app
# 1. Install Railway CLI
npm i -g @railway/cli
# 2. Login
railway login
# 3. Initialize project
railway init
# 4. Deploy backend
cd backend
railway up
# 5. Add environment variables in Railway dashboard
# - DATABASE_URL (Supabase connection string)
# - SUPABASE_URL
# - SUPABASE_SERVICE_ROLE_KEY
# - ADMIN_USERNAME
# - ADMIN_PASSWORDAlternative: Render.com
- Connect GitHub repository
- Create new Web Service
- Set root directory to
backend - Set build command:
pip install -r requirements.txt - Set start command:
uvicorn src.main:app --host 0.0.0.0 --port $PORT - Add environment variables
After backend deployment:
- Copy your backend URL (e.g.,
https://ratemyprof-api.railway.app) - Update GitHub secret
NEXT_PUBLIC_API_URLtohttps://your-backend-url/v1 - Re-deploy frontend (automatic on next push)
In Namecheap:
- Add A records:
185.199.108.153,185.199.109.153,185.199.110.153,185.199.111.153 - Add CNAME record:
wwwโNihaallX.github.io
In GitHub:
- Settings โ Pages โ Custom domain โ Enter your domain
- Wait 24-48 hours for DNS propagation
- Enable "Enforce HTTPS"
ratemyprof/
โโโ ๐ฑ frontend/ # Next.js 14 Application
โ โโโ src/
โ โ โโโ components/ # React Components
โ โ โ โโโ AdminPanel.tsx # Admin dashboard
โ โ โ โโโ CollegeReviewForm.tsx
โ โ โ โโโ ReviewSubmissionForm.tsx
โ โ โ โโโ UserDropdown.tsx # "Hey {username}" greeting
โ โ โ โโโ ...
โ โ โโโ contexts/ # React Context Providers
โ โ โ โโโ AuthContext.tsx # Authentication state
โ โ โ โโโ NotificationContext.tsx
โ โ โโโ pages/ # Next.js Pages
โ โ โ โโโ auth/ # Login, Signup, Verify
โ โ โ โโโ professors/[id].tsx # Professor details
โ โ โ โโโ colleges/[id].tsx # College details
โ โ โ โโโ admin.tsx # Admin panel
โ โ โ โโโ profile.tsx # User profile
โ โ โ โโโ my-reviews.tsx # User's reviews
โ โ โ โโโ privacy.tsx # Legal pages
โ โ โ โโโ terms.tsx
โ โ โ โโโ ...
โ โ โโโ services/ # API Client Layer
โ โ โ โโโ api.ts
โ โ โโโ lib/
โ โ โโโ supabase.ts # Supabase client
โ โโโ public/ # Static Assets
โ โ โโโ .nojekyll # GitHub Pages config
โ โโโ next.config.js # Next.js configuration
โ โโโ tailwind.config.js # Tailwind CSS config
โ โโโ package.json
โ
โโโ ๐ backend/ # FastAPI Application
โ โโโ src/
โ โ โโโ api/ # API Endpoints
โ โ โ โโโ auth.py # Authentication
โ โ โ โโโ professors.py # Professor CRUD
โ โ โ โโโ professors_simple.py # Simplified APIs + Bayesian ranking
โ โ โ โโโ colleges.py # College CRUD
โ โ โ โโโ reviews.py # Professor reviews (fixed RLS)
โ โ โ โโโ college_reviews.py # College reviews (mapping table)
โ โ โ โโโ moderation.py # Content moderation
โ โ โ โโโ college_review_moderation.py # College review moderation
โ โ โ โโโ user_limits.py # Rate limiting
โ โ โโโ models/ # Pydantic Models
โ โ โ โโโ review.py
โ โ โ โโโ college_review.py
โ โ โ โโโ professor.py
โ โ โ โโโ college.py
โ โ โ โโโ user.py
โ โ โโโ services/ # Business Logic
โ โ โ โโโ content_filter.py # AI content filtering
โ โ โ โโโ auto_flagging.py # Auto-flag system
โ โ โ โโโ user_communication.py
โ โ โโโ lib/ # Utilities
โ โ โ โโโ database.py # Supabase clients
โ โ โ โโโ auth.py # JWT verification
โ โ โ โโโ bayesian_ranking.py # Advanced ranking algorithm
โ โ โ โโโ cache.py # Response caching
โ โ โ โโโ rate_limiting.py # Rate limiting
โ โ โ โโโ notification_events.py # Event system
โ โ โ โโโ notification_templates.py # Email templates
โ โ โโโ main.py # FastAPI App Entry
โ โโโ tests/ # Test Suite
โ โ โโโ test_bayesian_ranking.py # Ranking algorithm tests
โ โ โโโ ...
โ โโโ scripts/ # Database scripts
โ โโโ pyproject.toml # Python dependencies
โ
โโโ ๐ scripts/ # Database Setup Scripts
โ โโโ create_users_table.sql
โ โโโ create_college_review_author_mappings.sql
โ โโโ create_auto_flagging_tables.sql
โ โโโ create_user_activities_table.sql
โ โโโ create_user_communication_tables.sql
โ โโโ migrate_to_anonymous_reviews.sql
โ โโโ ...
โ
โโโ ๐ง .github/
โ โโโ workflows/
โ โโโ ci.yml # CI/CD pipeline
โ โโโ deploy-github-pages.yml # Auto-deployment
โ
โโโ ๐ Documentation
โ โโโ README.md # This file!
โ โโโ GITHUB_PAGES_SETUP.md # Deployment guide
โ โโโ SYSTEM_DOCUMENTATION.md # Architecture
โ โโโ NEW_FEATURES_DOCUMENTATION.md
โ โโโ ...
โ
โโโ start-dev.bat # Windows dev server launcher
โโโ start-dev.ps1 # PowerShell dev launcher
โโโ .gitignore
Frontend:
next.config.js- Configured for static export (output: 'export')src/components/UserDropdown.tsx- Shows "Hey {username}" greetingsrc/components/CollegeReviewForm.tsx- Fixed data structure for nested ratingssrc/pages/auth/*- Complete authentication flow
Backend:
src/api/reviews.py- Usessupabase_adminclient to bypass RLSsrc/api/college_reviews.py- Anonymous reviews with mapping tablesrc/services/content_filter.py- AI-powered moderationsrc/lib/database.py- Exports bothsupabase(anon) andsupabase_adminclients
Database:
review_author_mappings- Maps professor reviews to authors (privacy)college_review_author_mappings- Maps college reviews to authors- Both tables have RLS policies allowing only service role access
cd backend
# Run all tests
pytest
# Run with coverage
pytest --cov=src --cov-report=html
# Run specific test file
pytest tests/test_reviews.py
# Run with verbose output
pytest -vcd frontend
# Run unit tests
npm test
# Run with coverage
npm run test:coverage
# Run in watch mode
npm run test:watch
# Run E2E tests with Playwright
npm run test:e2e
# Run E2E with UI
npm run test:e2e:ui# Test review submission flow
python backend/test_review_submit.py
# Test content filter
python backend/test_content_filter.py
# Test admin login
python backend/test_admin_login.pyUser submits review
โ
1. Insert review (NO user_id) โ Get UUID
โ
2. Insert mapping (review_id + author_id) in private table
โ
3. If mapping fails โ Delete review (rollback)
โ
โ
Review is public, authorship is private
Key Implementation:
- Reviews table has NO
user_idcolumn (fully anonymous) - Separate
*_author_mappingstables store authorship - Only service role (backend) can access mapping tables
- RLS policies prevent users from seeing other authors
- Users can still manage their own reviews via mapping
1. User signs up โ Supabase Auth creates user
2. User logs in โ Receives JWT token
3. Token stored in localStorage (frontend)
4. Every API request includes: Authorization: Bearer <token>
5. Backend verifies token via Supabase
6. Grants/denies access based on user role
Review Submitted
โ
1. Profanity Filter (better-profanity)
โ
2. Sentiment Analysis (TextBlob)
โ
3. Spam Detection (ML classifier)
โ
4. Auto-flag if suspicious
โ
5. Admin review if flagged
โ
6. Publish if approved
Overall Project Status: ๐ข Production Ready - 92% Complete
November 25, 2025:
- โ
Bayesian Ranking System - Implemented sophisticated ranking algorithm for professors
- Balances rating quality (avg_rating) and quantity (total_reviews)
- Formula:
score = (C ร global_mean + reviews ร rating) / (C + reviews) - Prevents gaming: 1 perfect review can't outrank 50 reviews at 4.8
- Optional recency weighting with exponential decay
- Configurable confidence parameter (default C=10)
- Comprehensive test suite with 6 test cases (all passing)
- See
backend/src/lib/BAYESIAN_RANKING_README.mdfor details
- โ
Dark Mode Support - Added complete dark mode styling to college reviews section
- Rating categories grid, review cards, and all text elements
- Smooth transitions and proper contrast
- Uses Tailwind's
dark:classes
- โ API Improvements - Fixed validation errors and reduced limit to 200 (from 1000)
- โ Frontend Build - Successfully built and deployed with all dependencies
October 20, 2025:
- โ Configured GitHub Pages deployment with custom domain support
- โ Updated Next.js config for static export
- โ Created comprehensive deployment documentation
- โ
Added
.nojekyllfor GitHub Pages compatibility
Earlier Updates:
- โ Fixed review submission (RLS bypass with admin client)
- โ Created college review system with anonymous mapping
- โ Added "Hey {username}" greeting to UI
- โ Built complete authentication pages (login, signup, verify)
- โ Created legal compliance pages (DPDP Act, Privacy, Terms)
- โ Developed admin panel with moderation tools
- โ Implemented AI-powered content filtering
- โ Added review voting and flagging system
- Database schema design
- Backend API development
- Frontend UI/UX
- Professor rating system
- College rating system
- User authentication
- Anonymous review system
- Admin authentication
- Content filtering (profanity, spam)
- Auto-flagging system
- Review moderation dashboard
- User management
- Appeals system
- GitHub Actions CI/CD
- Frontend deployment (GitHub Pages)
- Backend deployment (Railway/Render)
- Custom domain configuration
- SSL/HTTPS setup
- Performance optimization
- Security audit
- Invite beta users
- Gather feedback
- Fix bugs and issues
- Optimize performance
- Improve UX based on feedback
- Marketing campaign
- Social media presence
- SEO optimization
- Analytics setup (Google Analytics)
- Error monitoring (Sentry)
- User onboarding flow
- Mobile app (React Native)
- Advanced search (Elasticsearch/Algolia)
- Email notifications
- AI review summarization
- Multi-language support (Hindi, etc.)
- Course reviews
- Professor comparison tool
- College comparison tool
- Verified student badges
- Premium features for colleges
We welcome contributions from the community! Whether it's bug fixes, new features, or documentation improvements.
-
Fork the repository
# Click "Fork" on GitHub, then clone your fork git clone https://github.com/YOUR-USERNAME/ratemyprof.git cd ratemyprof
-
Create a feature branch
git checkout -b feature/amazing-feature
-
Make your changes
- Write clean, readable code
- Follow existing code style
- Add tests if applicable
- Update documentation
-
Test your changes
# Backend tests cd backend && pytest # Frontend tests cd frontend && npm test
-
Commit with clear messages
git add . git commit -m "feat: Add amazing feature" # Use conventional commits: # feat: New feature # fix: Bug fix # docs: Documentation # style: Formatting # refactor: Code restructuring # test: Adding tests # chore: Maintenance
-
Push and create Pull Request
git push origin feature/amazing-feature
Then open a PR on GitHub with:
- Clear title and description
- Screenshots (if UI changes)
- Link to related issue (if applicable)
- Code Style: Follow PEP 8 (Python), Airbnb style guide (TypeScript)
- Testing: Add tests for new features
- Documentation: Update README and inline comments
- Commits: Use conventional commit messages
- PRs: One feature per PR, keep them focused
- ๐งช Testing: Increase test coverage
- ๐ฑ Mobile: React Native app development
- ๐ Translations: Hindi and regional language support
- ๐จ Design: UI/UX improvements
- ๐ Documentation: Tutorials and guides
- ๐ Bug Fixes: Check open issues
- Check if it's already reported in Issues
- If not, create a new issue with:
- Clear title
- Steps to reproduce
- Expected vs actual behavior
- Screenshots/logs if applicable
- Your environment (OS, browser, etc.)
- Check Discussions
- Create a new discussion with:
- Problem you're trying to solve
- Proposed solution
- Alternative approaches considered
- Mockups/examples if applicable
This project is licensed under the MIT License - see the LICENSE file for details.
- โ Commercial use allowed
- โ Modification allowed
- โ Distribution allowed
- โ Private use allowed
โ ๏ธ Liability and warranty not provided
- Creator & Lead Developer: NihaallX
- Repository: github.com/NihaallX/ratemyprof
- Current Branch:
001-ratemyprof-india-platform - Contributors: See all contributors
- ๐ Website: [Your Domain Here]
- ๐ง Email: [Contact Email]
- ๏ฟฝ Discussions: GitHub Discussions
- ๏ฟฝ Bug Reports: GitHub Issues
- ๐ฑ Social Media: [Links to be added]
- Documentation: Start with this README, then see SYSTEM_DOCUMENTATION.md
- Deployment Guide: GITHUB_PAGES_SETUP.md
- Feature Docs: NEW_FEATURES_DOCUMENTATION.md
- Community: Join GitHub Discussions for questions
Indian Universities - Starting with Vishwakarma University (VU) Pune
- All beta testers and early users
- Contributors to open-source dependencies
- Supabase for excellent BaaS platform
- Next.js team for amazing React framework
- FastAPI team for amazing Python framework
This platform complies with:
- ๐ฎ๐ณ Digital Personal Data Protection Act (DPDP) 2023
- ๐ Information Technology Act, 2000
- ๐ Privacy by Design principles
- ๐ Executive Summary - One-page overview
- ๐บ๏ธ Visual Project Map - Architecture diagrams
- ๐ Project Status - Detailed status
- ๐๏ธ System Documentation - Full technical docs
- โจ New Features - Feature documentation
- ๐ Deployment Guide - Deploy to production
- ๐ง Admin Panel Guide - Admin features
- Supabase - Backend as a Service
- Next.js - React Framework
- FastAPI - Python Web Framework
- Tailwind CSS - Utility-first CSS
If you find this project helpful, please consider giving it a star! โญ
Empowering students to make informed decisions about their education
๐ Home โข ๐ Docs โข โจ Features โข ๐ Deploy โข ๐ค Contribute โข ๐ฌ Discussions
โญ Star us on GitHub โ it helps!
Report Bug โข Request Feature โข Ask Question
ยฉ 2025 RateMyProf India. Built with โค๏ธ by the community.