An AI-Powered Transparency Platform for Student Accommodation in India
Built as a semester Full-Stack + AI/ML project β but designed like something real.
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.
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.
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.
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.
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.
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.
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.
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.
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.
| 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 |
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
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)
- Node.js 18+
- PostgreSQL running locally
- A free Gemini API key
- A free Cloudinary account
cd backend
npm install
# Create your .env (see below)
npm startcd Frontend
npm install
npm run devPORT=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- 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
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 |
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.
- π± 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.


