Roommates and Housing Matching for Virginia Tech
Bed-A-Thon helps VT students find compatible roommates and discover apartments that fit their preferences (budget, bedrooms, distance, amenities). It combines a modern Next.js frontend with a FastAPI backend, Supabase integration, and a local SQLite fallback for development.
- ๐ Roommate matching based on lifestyle preferences, budget, year, and major
- ๐ Apartment matching by distance to VT, bedrooms, budget fit, and amenity overlap
- ๐จ Clean, responsive UI built with Shadcn UI + Tailwind CSS
- ๐ OAuth sign-in with Google (via Supabase Auth)
- ๐ Supabase profiles with optional local SQLite for development
- ๐ Voice call integration (optional) to โget the latest infoโ from an apartment
Frontend (frontend/)
- Framework: Next.js (App Router), React, TypeScript
- Styling: Tailwind CSS + Shadcn UI
- Auth: Supabase Auth
Backend (backend/)
- Framework: FastAPI (Uvicorn)
- Data: Supabase (production) or SQLite (development fallback)
- Matching: Python algorithms for roommates and apartments
Data Sources
- Apartment data: imported from VT JSON sources or Supabase DB
- Profiles: stored in Supabase
profilestable via backend APIs
Roommate Matching (default weights)
- Lifestyle vector (cleanliness, noise, study, social, sleep): 50%
- Budget proximity: 25%
- Year match: 10%
- Major similarity: 15%
Formula:
score = 0.50*lifestyle + 0.25*budget + 0.10*year + 0.15*major
Apartment Matching (default weights)
- Price fit: 35% (best within ยฑ10% of budget)
- Distance to VT: 30% (best near 0.5 miles)
- Amenity overlap: 20% (Laundry, Parking, WiFi bonuses)
- Study-friendliness: 10% (WiFi + no pool if study-focused)
- Parking: 5%
- Node.js 18+
- Python 3.10+
- Supabase project (optional for local dev; required for full profiles)
- macOS/Linux recommended
Create:
frontend/.env.localbackend/.env
๐ก For local dev, omit DATABASE_URL to use sqlite:///./bedathon.db.
Backend
cd backend
pip install -r requirements.txt
uvicorn main:app --reloadFrontend
cd frontend
npm install
npm run devcd backend
python import_apartments_to_db.py- Click "Sign in with Google" on the landing page
- Complete onboarding form (budget, bedrooms, preferences)
- Backend creates/updates Supabase profile
- Access Roommate Matches and Apartment Matches tabs
Base URL: http://localhost:8000
GET /healthโ Health checkPOST /profilesโ Create/update profileGET /profiles/meโ Fetch current profilePUT /profiles/meโ Update profile
POST /matching/roommate-preferencesโ Save preferencesPOST /matching/roommate-matchesโ Get roommate matchesPOST /matching/apartment-matches-for-preferencesโ Get apartment matchesGET /matching/apartment-matches/{profile_id}?limit=100โ Matches for profileGET /matching/apartmentsโ All apartments
Note: Voice call endpoint exists in codebase but may be disabled.
HokieNest includes an intelligent AI agent that streamlines the apartment hunting process:
- Automated Calling โ Agent calls apartments that roommates have selected
- Information Gathering โ Collects current pricing, bedroom availability, amenities, and lease terms
- Summary Generation โ Creates comprehensive email summaries with all collected details
- Real-time Updates โ Ensures apartment information is current and accurate
The AI agent eliminates the need for students to make multiple phone calls, saving time and providing standardized information across all potential housing options.
- Onboarding โ Form for budget, bedrooms, lifestyle preferences
- Roommate Matches โ Grid with compatibility badges
- Apartment Matches โ Price, distance, amenity badges + "why it matches" reasons
- Next.js auto-increments ports (3000 โ 3001โฆ)
- Ensure
NEXT_PUBLIC_BACKEND_URLmatches backend (default: 8000)
- SQLite: Omit
DATABASE_URLfor local SQLite - Reset: Delete/recreate
bedathon.dbif errors occur - Supabase Postgres: Use actual DB credentials, not service role key
- If
/profilesreturns 401, re-login and check Bearer token is sent
| Script | Purpose |
|---|---|
backend/import_apartments_to_db.py |
Import JSON apartments |
backend/comprehensive_data_scraper.py |
Scrape VT housing data |
backend/update_apartments_from_vt_sheet.py |
Sync from sheet |
backend/test_matching_api.py |
Sample API calls |
- Save/Like apartments and roommate profiles
- Group-based housing recommendations
- Map view with filters by distance/amenities
- Availability and contact integration per apartment
Add screenshots to
frontend/public/and embed them here:



- Fork this repo
- Create a feature branch (
git checkout -b feature/my-feature) - Run linters/tests before pushing
- Open a PR with description + screenshots if UI changes
MIT (or your preferred license)
- Next.js
- Tailwind CSS
- Shadcn UI
- FastAPI
- SQLModel / SQLAlchemy
- Supabase
- VT community datasets and housing resources
Built with โค๏ธ for the Virginia Tech community
Go Hokies! ๐ฆ