Inspiration
Choosing an apartment also means choosing your daily commute, your walk home after a late lab, and the transport costs that come with both.
For USC students, the information needed to make that decision is scattered across housing websites, LAPD incident data, streetlight reports, DPS patrol maps, and USC Lyft boundaries. Students have to connect those sources themselves before signing a lease.
Our project dataset made that gap concrete:
- Of 5,339 LAPD-reported incidents around UPC and HSC, approximately 60% occurred during the day.
- 1,025 incidents occurred at homes and apartments, compared with 1,403 on streets.
- 606 streetlight outage reports were open when we collected the data.
- Of 119 listings, 92 were inside the USC Lyft zone and 95 were inside DPS patrol boundaries.
These figures describe our collected dataset, rather than current conditions or predictions of individual safety. They showed us how much relevant information a rental listing leaves out.
We built TrojanScout to help students understand what living somewhere would mean for their actual week.
See your week before you sign the lease.
What it does
TrojanScout connects housing search with monthly costs, campus transport, and location-specific information.
Smart housing search
Students describe what they need in everyday language:
“Private room under $1,200, a 10-minute walk to Leavey, inside DPS.”
TrojanScout converts the request into editable filters, searches the listings, and ranks results against the student’s preferences.
Each listing brings together:
- DPS patrol and USC Lyft zone coverage.
- Recorded LAPD incidents within 150 metres.
- Street-network walking times to selected class buildings.
- Per-person rent and a True Trojan Cost estimate.
- Reasons explaining its position in the recommendations.
Changing preferences changes the ranking, allowing students to compare listings against their own priorities.
True Trojan Cost
The advertised rent is only part of the monthly budget. TrojanScout estimates each student’s share of rent and utilities, then adds estimated late-night transport costs.
$$ \text{Monthly cost per person} = \frac{\text{Whole-unit rent} + \text{Estimated whole-unit utilities}}{\text{Number of occupants}} + \text{Estimated rides per person} $$
All terms represent monthly amounts in dollars. For whole-unit listings, our utility estimate is:
$$ \text{Estimated utilities} = 60 + 30 \times \text{Number of bedrooms} $$
Students can switch between having their own bedroom and sharing one. A two-bedroom apartment splits between two occupants with private bedrooms or four occupants with shared bedrooms.
USC Lyft coverage informs the transport estimate, subject to operating hours, eligible trips, and program conditions. Students can change their expected late nights to see how their budget changes.
Time-aware routes
TrojanScout compares routes using the selected departure time, recorded incidents, reported streetlight outages, and DPS coverage.
Students can inspect the trade-off between the fastest route and a route with a lower weighted exposure score. These scores support comparison and do not guarantee safety.
Book Ride
Students can find other Trojans travelling in a similar direction at a similar time and coordinate a shared ride.
Riders initially appear under anonymous labels such as “Trojan AFFC.” Exact pickup and drop-off locations remain hidden until both riders accept.
Students choose whether everyone, friends, or selected friend lists can see them. Visibility is mutual.
Scout, the AI assistant
Scout makes its workflow visible. Students can watch it interpret a request, search listings, check location information, and rank the results.
They can also ask about a particular building:
“How’s the Lorenzo?”
Scout uses the building’s available report and retrieved records to explain the answer. Its tools supply the underlying facts, including prices, walking times, zone coverage, and incident counts.
Free & Safe, Emergency, and Reports
TrojanScout brings together 33 researched support programs, campus opportunities, emergency contacts, and student reporting tools.
Program cards link to official sources and show relevant eligibility or availability information. The reporting flow checks descriptions for profiling, personal information, and vague language before posting.
AI moderation reviews the content of a report. It does not establish that the reported incident occurred.
How we built it
Frontend
We built the interface with React 19, TypeScript, Vite, and Tailwind CSS.
Leaflet handles maps, Zustand manages client state, and TanStack Query handles data fetching. An onboarding tour introduces the main features.
API
Our Node.js and Express API, written in TypeScript, handles listings, cost calculations, routing, reports, and accounts.
Ride matching uses Server-Sent Events for live updates. Sign-in uses emailed one-time codes for USC addresses, with an architecture prepared for a future USC SSO integration.
AI service
A separate Python and FastAPI service handles AI tasks.
Search combines FAISS vector retrieval with BM25 keyword ranking. bge-small embeddings run through ONNX Runtime, while LangGraph coordinates Scout’s tool calls and visible execution steps.
The production language model runs through Groq, with Qwen in our current setup and Ollama available locally.
Data and deployment
We combine housing listings with LAPD NIBRS records, MyLA311 streetlight cases, DPS patrol boundaries, USC Lyft boundaries, and official program pages.
The frontend runs on Vercel, the API and AI service run on Render, and Brevo delivers sign-in emails.
Our central design decision was to compute factual values in code and give those results to the language model to explain. When records are missing, Scout should communicate that limitation rather than supply an unsupported answer.
Challenges we ran into
Fitting AI into 512 MB. Our initial PyTorch embedding setup exceeded the free host’s memory budget. We switched to ONNX through fastembed, built the search index during deployment, and limited concurrent model work.
Handling cold starts. Free services sleep when idle. We added service warming, automatic retries, and a “waking up” message so students can understand the delay.
Adapting to model availability. Our original Groq model became unavailable to free accounts during development. We added model discovery and fallback selection.
Reducing invented numbers. Early responses included unsupported rent estimates. We moved numerical calculations into code and constrained responses around retrieved records.
Making maps work after deployment. Some tile providers worked locally but required credentials on the deployed domain. We changed providers and checked the deployed tiles directly.
Protecting ride locations. Matching students requires location information, but displaying it immediately exposes sensitive details. Mutual acceptance and visibility controls helped us separate matching from location disclosure.
Building sign-in without collecting NetID passwords. We use email codes for USC addresses. Official USC SSO remains a future integration requiring registration with USC ITS.
Accomplishments that we’re proud of
- Connecting housing search, cost estimates, maps, routes, ride coordination, and an AI assistant in a deployed prototype.
- Making recommendation reasons and Scout’s execution steps visible.
- Supporting per-person pricing that reflects private and shared bedrooms.
- Building location privacy into the ride-matching flow.
- Helping students discover existing USC and community resources through official source links.
- Running the prototype within free hosting constraints.
What we learned
Explanations need traceable inputs. A recommendation becomes easier to assess when students can inspect the facts and preferences behind it.
Language models need clear boundaries. Retrieval and code should supply factual values. The model can then help explain those results.
Data preparation is product work. Inconsistent addresses, outdated pages, and retired programs affect the usefulness of the experience as much as interface design.
Deployment constraints shape architecture. Limited memory and sleeping services pushed us toward smaller runtimes, precomputed indexes, and clearer recovery states.
What’s next for TrojanScout
Our next engineering priorities are persistent database storage, automated tests, and API rate limits.
We also plan to pursue:
- Official USC SSO, subject to USC ITS registration.
- More housing sources and deeper coverage around HSC.
- More timely updates for DPS alerts and streetlight report status.
- Mobile notifications for ride matches and relevant changes.
- A proposed student pilot to evaluate usability, recommendation quality, and whether students find useful resources before choosing housing.
- Potential collaboration with USC and USG to keep program information current.
TrojanScout helps students connect an apartment listing to the life they would actually live there.
Built With
- bm25
- brevo
- express.js
- faiss
- fastapi
- groq
- javascript
- langchain
- langgraph
- lapd-open-data
- leaflet.js
- node.js
- ollama
- onnx-runtime
- openstreetmap
- python
- qwen
- rag
- react
- render
- tailwind-css
- typescript
- vercel
- vite