Noveira Logo
Case StudyTechnical Showcase

Boarding.lk - Real-Time Student Accommodation Marketplace

A Full-Stack Progressive Web App (PWA) that acts as a trust bridge, digitizing the entire process of finding, verifying, and communicating with landlords in Sri Lanka.

The Problem

The student accommodation market in Sri Lanka is largely unorganized. Students rely on:

  • Physical Banners: Requiring travel to specific areas.
  • Unverified Facebook Groups: Prone to scams and outdated listings.
  • Word of Mouth: Inefficient and limited in scope.

The Solution

There was no central, verified platform to connect students with landlords. Boarding.lk solves this by providing a real-time, filtered, and secure marketplace to bridge that gap.

Technical Architecture (T3 Stack)

Next.js 14Frontend / SSR
Tailwind CSSStyling
SupabasePostgreSQL DB & Auth
Leaflet.jsGeolocation

Key Technical Implementations

1. The "Optimistic" Admin Command Center

To prevent the app from feeling sluggish while waiting for DB confirmations, I implemented Optimistic UI Updates. When an admin clicks "Approve", the UI immediately removes the item. A background listener subscribes to DB changes—if the request fails, the UI automatically reverts.

2. Custom Relational Chat System

Built from scratch without paid SDKs. It uses a relational schema (Conversations parent, Messages child). The interface uses a useEffect hook to subscribe to INSERT events via Supabase WebSockets for real-time delivery.

3. Advanced Search & Filtering

Search logic happens client-side for speed after an initial server fetch. Properties are filtered based on 5 dimensions (Location, Gender, Price, Facilities, Text Match) and sorted to prioritize available beds.

Database-Level Security (RLS)

Security is enforced directly at the database layer using PostgreSQL Row Level Security policies, ensuring data safety regardless of API middleware.

Policy NameSQL Logic
Public Read Activestatus = 'active'
Owner Edit Ownauth.uid() = owner_id
Admin God Modeauth.jwt() ->> 'email' = 'admin@boarding.lk'