Skip to main content
Tayyab Manan
Home
Projects
Blog
About
Contact
Resume
Tayyab Manan
HomeProjectsBlogAboutContactResume
  1. Home
  2. Projects
  3. TeacherRank

Web Application · January 2025

TeacherRank

Student-Driven Teacher Review Platform

Built with React · TypeScript · Supabase · TanStack Query · React Router · Tailwind CSS · DaisyUI · Vite · React Hook Form · Zod

Live DemoSource Code
Previous projectEV Suitability AnalysisNext project WaterTrace Pakistan
Back to all projects
HomeProjectsBlogAboutContactResume
 

Islamabad, Pakistan · UTC+5

Tayyab Manan

©

    Overview

    TeacherRank is a web app where students rate and review their teachers across several dimensions instead of reducing them to one number. It scores teaching quality, communication, helpfulness, and course difficulty separately, with live data sync and a responsive interface. The point is to help students pick courses with better information, and to give institutions feedback they can use.

    Read the full write-up →

    the live index · 377 teachers, 59 reviews, ranked
    the live index · 377 teachers, 59 reviews, ranked

    Features

    Ratings are split into four dimensions: teaching quality, communication, helpfulness, and course difficulty. Students can search by name, subject, institution, or rating with results updating as they type, browse teachers grouped by institution, and open a profile page with the ratings breakdown, student reviews, and teaching statistics. Accounts run on Supabase auth with email verification and password recovery. New reviews sync live through Supabase subscriptions with TanStack Query cache invalidation. Admins get a panel for managing teachers, reviews, and user reports. The interface is built for phones first, desktops second.

    Technical architecture

    React 18 and TypeScript, with Vite for builds and hot module replacement. Supabase handles the backend: authentication, the real-time database, and row-level security at the PostgreSQL level. TanStack Query manages server state with stale-while-revalidate caching. The UI uses Tailwind CSS and DaisyUI components.

    Performance

    OptimizationImpact
    Code SplittingRoute-based lazy loading cuts initial bundle size by 60%
    Virtual ScrollingRenders only visible teacher cards using @tanstack/react-virtual
    Image OptimizationLazy loading with WebP support and responsive sizing
    Caching StrategyStale-while-revalidate pattern via TanStack Query
    Bundle CompressionBrotli compression reducing asset sizes by up to 80%
    PWA FeaturesService worker for offline functionality

    User experience

    FeatureDescription
    Protected RoutesAuth-gated access for review submission and admin features
    Form ValidationReact Hook Form with Zod schemas for type-safe validation
    Error BoundariesFriendly error states with retry options instead of white screens
    SEODynamic meta tags with React Helmet
    AccessibilityWCAG 2.1 compliant with keyboard navigation and screen reader support
    Dark ModeRespects OS theme preference by default

    Database design

    TablePurpose
    TeachersEducator profiles with department and contact info
    ReviewsStudent feedback with four-dimensional ratings and timestamps
    InstitutionsEducational organizations with hierarchical structure
    UsersProfiles with role-based access (student vs admin)
    Row-Level SecurityPostgreSQL policies enforcing permissions at the data layer

    Security

    FeatureDescription
    AuthenticationJWT tokens with refresh token rotation (1hr access, 30-day refresh)
    Input SanitizationDOMPurify for XSS protection, Zod for schema validation
    Rate LimitingMax 5 reviews/hour, 20/day per user
    HTTPS + HSTSEnforced encrypted connections
    Content Security PolicyStrict CSP headers for script execution control

    Monitoring

    ToolPurpose
    Vercel AnalyticsTraffic and performance metrics
    Speed InsightsCore Web Vitals monitoring
    SentryError tracking and performance monitoring in production

    What's next

    Sentiment analysis on review text, to surface patterns the numeric ratings miss. Collaborative filtering to recommend professors based on what similar students liked. Anomaly detection to flag suspicious review clusters. I'd also like automatic topic classification (teaching style, grading, workload) so students can filter reviews by what they care about, and eventually a natural language query interface using RAG so a student can ask "Which Data Structures professors have high ratings with manageable workload?"