Skip to content

Ayushi536/PGLens

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

42 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PGLens Logo

🏠 PGLens

See your PG before you sign the lease.

An AI-Powered Transparency Platform for Student Accommodation in India

Made with React Backend Database AI License


Built as a semester Full-Stack + AI/ML project β€” but designed like something real.


πŸ€” Why PGLens Exists

Every student who has looked for a PG knows the drill β€” glossy photos on the listing, a landlord who swears the food is "home-cooked", and then you move in and find out the WiFi barely loads a webpage and the bathroom hasn't been cleaned since 2019.

PGLens was built to fix exactly that.

We built a platform where student reviews aren't just star ratings β€” they're analysed by AI, cross-checked against what the owner claimed, and turned into a transparent scorecard that tells you exactly what you're walking into. No more guessing. No more getting burned on a 6-month lease.


✨ What PGLens Can Do

πŸ“Š Transparency Scorecard

Every PG gets a score across 5 dimensions β€” Hygiene, Food, Safety, Amenities, and Pricing β€” calculated automatically from student reviews. Not a vibe. Actual weighted data.

🧠 AI-Powered Review Analysis

When a student submits a review, our Gemini-powered NLP engine reads it, extracts the sentiment (positive / negative / neutral), pulls out key phrases like "no hot water" or "amazing food", and tags it by topic. The insight shows up instantly on the PG detail page.

πŸ–ΌοΈ Image Upload & Room Verification

Owners upload photos to Cloudinary. Students can upload residency proof. Images are stored, linked to listings, and surfaced in the gallery β€” no broken links, no fake stock photos.

πŸ’° Fair Pricing Indicator

We compare a PG's listed rent against the city average and flag it as Fairly Priced, Overpriced, or Good Deal β€” so students can spot a rip-off before they pay the deposit.

πŸ” Claim vs Reality

Owners make claims β€” "24/7 security", "vegetarian food available", "high-speed WiFi". We track those claims and match them against what students actually report in reviews. The mismatches show up on the scorecard.

πŸ—ΊοΈ Distance from College

Find PGs near your college using map-based distance filtering. We use OpenStreetMap + Leaflet to calculate how far each PG is from a given set of coordinates.

⭐ Verified Student Reviews

Before a student's review goes live, they can verify residency by uploading proof. Verified reviews get a badge β€” and carry more weight in the scorecard algorithm.

πŸ›‘οΈ Admin Moderation Panel

Admins can approve/reject PG listings, manage pending residency verifications, and moderate reviews β€” with a full filter view (All / Approved / Flagged / Removed) and live NLP sentiment badges on every review.


πŸ› οΈ Tech Stack

Layer Technology
Frontend React 18, Vite, TypeScript, Tailwind CSS, shadcn/ui
Backend Node.js, Express.js, REST API
Database PostgreSQL (with raw SQL β€” no ORM)
Auth JWT, bcrypt, Google OAuth (Passport.js)
AI / NLP Google Gemini 1.5 Flash API
Image Storage Cloudinary
Maps OpenStreetMap + Leaflet (react-leaflet)
Animations Framer Motion
Dev Tools Nodemon, dotenv, CORS

🧱 How It All Connects

Student submits a review
        ↓
Express backend saves it to PostgreSQL
        ↓
Gemini API analyses the text β†’ sentiment + keywords stored
        ↓
Scorecard engine recalculates weighted scores for that PG
        ↓
Frontend fetches updated scorecard + NLP insights
        ↓
Student sees a transparent, AI-backed report on the PG detail page

Owner claims β†’ stored at listing creation Student reviews β†’ cross-referenced against claims Admin panel β†’ moderation + approval layer on top of everything


πŸ—‚οΈ Project Structure

PGLens/
β”œβ”€β”€ Frontend/               # React + Vite app
β”‚   └── src/
β”‚       β”œβ”€β”€ pages/          # Home, Explore, PGDetail, Dashboards
β”‚       β”œβ”€β”€ components/     # Navbar, ScoreCard, PGCard, ImageUploader
β”‚       └── lib/
β”‚           └── api.ts      # All backend calls in one place
β”‚
β”œβ”€β”€ backend/                # Node.js + Express API
β”‚   └── src/
β”‚       β”œβ”€β”€ routes/         # auth, pgs, reviews, admin, images
β”‚       β”œβ”€β”€ controllers/    # Business logic per resource
β”‚       β”œβ”€β”€ config/         # DB, Cloudinary, NLP (Gemini), Passport
β”‚       └── middleware/     # JWT protect, role-based restrictTo
β”‚
└── nlp_service/            # Python NLP microservice (experimental)

πŸš€ Running Locally

Prerequisites

Backend

cd backend
npm install
# Create your .env (see below)
npm start

Frontend

cd Frontend
npm install
npm run dev

Environment Variables β€” backend/.env

PORT=5000
DATABASE_URL=postgresql://user:password@localhost:5432/pglens
JWT_SECRET=your_jwt_secret
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
GEMINI_API_KEY=your_gemini_key

πŸ“Œ Roadmap

  • Auth β€” register, login, JWT, role-based guards (student / owner / admin)
  • PG listing creation, image upload, admin approval flow
  • Transparency scorecard β€” weighted scores from student reviews
  • NLP sentiment analysis on review text (Gemini API)
  • Admin review moderation panel with sentiment badges
  • Residency verification for trusted reviews
  • Owner reply to reviews
  • Saved PGs for students
  • Map view on Explore page (react-leaflet)
  • Claim vs Reality display on PG detail page
  • Computer Vision analysis on uploaded room images
  • Homepage live stats from real database
  • Mobile-responsive polish pass

πŸ‘©β€πŸ’» The Team

We're three CS students who got tired of bad PG experiences and decided to build the thing we wished existed.


Ayushi Sharma
@Ayushi536

Kritika Kanchan
@Kritika-Kanchan-dev

Navya Garg
@Navya-Garg1105

🎯 Impact We're Going For

The Indian PG market is massive, unregulated, and deeply opaque β€” especially for students moving to a new city for the first time. PGLens won't fix all of that overnight, but it takes a real swing at the core problem: information asymmetry.

When students can see verified reviews, AI-extracted insights, and owner claim comparisons side by side β€” they make better decisions. And when owners know their PG will be held accountable by real data, they have a reason to actually improve.

That's the idea. We're building it one feature at a time.


πŸ”­ What's Next (Future Scope)

  • πŸ“± Mobile app (React Native)
  • πŸ”– Online booking + waitlist system
  • πŸ’³ Deposit escrow & dispute resolution
  • 🀝 Roommate compatibility matching
  • 🏫 College & institutional partnerships
  • 🚨 Advanced fraud detection on listings

Made with chai, late nights, and a genuine hatred of misleading PG listings.

⭐ If you find this useful, give the repo a star β€” it means a lot to a student project.

About

PGLens is an AI-powered PG transparency platform that helps students make informed accommodation decisions using verified reviews, image analysis, price fairness prediction, and location intelligence. Built with a full-stack architecture and AIML for trust and transparency in student housing.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors