Inspiration

The housing affordability crisis affects 131 million Americans. Over 50% of renters are rent-burdened, paying more than 30% of their income on housing. First-time homebuyers struggle with down payments and hidden costs. Tenants don't know their rights and face exploitation. Existing tools are fragmented, confusing, or nonexistent. I built ShelterRights to provide a centralized, AI-powered platform that helps people understand their housing situation, know their rights, and organize for change.

What it does

ShelterRights is a comprehensive housing advocacy platform with three modes: RENTER MODE provides a rent burden calculator with AI-powered financial analysis, a tenant rights chatbot that answers state-specific legal questions using Google Gemini AI, a community organizer for creating and signing housing justice petitions, and an AI property search that calculates true affordability.

BUYER MODE offers a buying power calculator comparing bank approval versus realistic affordability, a rent vs buy analyzer with break-even point calculations, a down payment assistance finder connecting users to FHA, VA, and state programs, and property search with mortgage calculations.

OWNER MODE includes property tax burden tracking with future projections, refinance analysis to identify savings opportunities, HOA abuse tracking to spot excessive fee increases, and foreclosure prevention resources with assistance program connections.

The platform uses AI throughout to provide personalized recommendations, generate campaign descriptions, analyze properties, and answer questions about tenant rights in all 50 states.

How we built it

FRONTEND: React 18 with TypeScript for type safety, Vite for lightning-fast builds, Tailwind CSS and shadcn/ui for beautiful accessible components, Zustand for lightweight state management, React Hook Form with Zod for form validation, Recharts for data visualizations, and Framer Motion for smooth animations.

BACKEND: Node.js with Express and TypeScript, Supabase for PostgreSQL database and authentication with Row Level Security policies on all tables, Google Gemini AI (gemini-1.5-flash model) for intelligent analysis and chat responses, CORS and Helmet for security, and Morgan for request logging.

DATABASE: Seven main tables (user_profiles, rent_calculations, buyer_calculations, chat_history, campaigns, signatures, saved_properties) with automatic profile creation triggers, foreign key relationships, and timestamp tracking. All tables have Row Level Security ensuring users only access their own data.

ARCHITECTURE: RESTful API with JWT authentication, protected routes for authenticated users, mode-based feature access (renter/buyer/owner), graceful AI fallbacks if API fails, and responsive mobile-first design.

Challenges we ran into

AUTHENTICATION FLOW: Integrating Supabase Auth with custom user profiles required setting up database triggers to auto-create profiles on signup and ensuring Row Level Security policies worked correctly with JWT tokens.

AI INTEGRATION: Google Gemini API has rate limits and occasional failures. I implemented try-catch blocks with meaningful fallback messages so the app never crashes. AI analysis is helpful but not required for core functionality.

MODE SWITCHING: Building a single app that serves three different user types (renters, buyers, owners) required careful state management and conditional rendering. The mode switcher updates both the database and local state, then refreshes the dashboard to show relevant features.

DATABASE DESIGN: Balancing data normalization with query performance was tricky. I used separate tables for renter_data and buyer_data while keeping shared functionality in user_profiles. Indexes on frequently queried columns improved performance.

PROPERTY SEARCH: I wanted to scrape live data from Zillow and Realtor.com, but their APIs are not free and web scraping would violate terms of service. I built a smart mock data system that generates realistic properties based on the user's search location and filters. This demonstrates the feature while staying ethical.

RESPONSIVE DESIGN: Making complex calculators and charts work on mobile required extensive testing. I used Tailwind's responsive utilities and made forms stack vertically on small screens. The mode switcher collapses into a dropdown on mobile.

Accomplishments that we're proud of

COMPREHENSIVE SOLUTION: I built 12+ features across three user modes in one month, creating a complete platform rather than just a single tool. The scope rivals commercial housing apps.

AI INTEGRATION: Successfully integrated Google Gemini AI for four different use cases (rent analysis, buyer analysis, tenant rights chat, property analysis) with smart fallbacks that keep the app working even when AI fails.

REAL DATA PERSISTENCE: Everything saves to Supabase with proper security. Users can return days later and see their calculation history, chat history, and signed campaigns. Row Level Security ensures data privacy.

BEAUTIFUL UI: The interface looks professional with consistent design system, smooth animations, and full mobile responsiveness. I used shadcn/ui components styled with Tailwind for a modern, accessible experience.

COMMUNITY ORGANIZING: The campaign feature connects individual struggles into collective action. Users can see others facing similar issues and organize together, turning ShelterRights into a movement, not just an app.

MODE FLEXIBILITY: Users can be both renters and buyers simultaneously, switching modes with one click. This reflects real life where someone might be renting while house hunting.

What we learned

AI PROMPT ENGINEERING: Writing effective prompts for Gemini required iteration. I learned to be specific about output format, word count, and tone. Adding context about the user's situation improved response quality significantly.

DATABASE SECURITY: Implementing Row Level Security policies taught me how PostgreSQL handles user isolation. Every query automatically filters by authenticated user ID, preventing data leaks without extra code.

STATE MANAGEMENT: Zustand proved lighter than Redux while still handling complex state. I learned to separate auth state (user login) from profile state (user data) for cleaner code.

USER EXPERIENCE: Housing anxiety is real. I learned to present scary numbers (50% rent burden) with empathy and actionable advice. The AI analysis always ends with hope and next steps.

FULL-STACK DEVELOPMENT: Building both frontend and backend taught me how APIs, authentication, and databases connect. Understanding the entire stack helped me debug issues faster.

TIME MANAGEMENT: Building 12 features required ruthless prioritization. I focused on making 4-5 features excellent rather than 12 features mediocre. Polish matters more than quantity.

What's next for ShelterRights

LIVE PROPERTY SCRAPING: Partner with real estate APIs or build an ethical web scraper to show actual listings from Zillow, Apartments.com, and Craigslist. Calculate true affordability on real properties.

LANDLORD REVIEW SYSTEM: Let renters rate landlords on maintenance, communication, and fairness. Build a public database so people can avoid bad landlords before signing leases.

POLICY TRACKER: Show upcoming rent control votes, housing bills, and zoning changes. Alert users when legislation affects them and help them contact representatives.

EMAIL CAMPAIGNS: Automate petition emails to city councils and state representatives. Make it one-click easy to advocate for housing justice.

MOBILE APP: Build native iOS and Android apps using React Native. Enable push notifications for campaign updates and new assistance programs.

PARTNERSHIP WITH LEGAL AID: Connect users facing serious issues (illegal evictions, discrimination) directly to pro bono lawyers in their area.

FINANCIAL PLANNING TOOLS: Add savings calculators, debt payoff strategies, and credit improvement roadmaps to help users become ready for homeownership.

MULTILINGUAL SUPPORT: Translate the entire platform into Spanish, Mandarin, and other languages to serve immigrant communities who face additional housing barriers.

EXPANSION TO COMMERCIAL TENANTS: Help small business owners with commercial lease negotiations, tenant improvement allowances, and rent abatement during renovations.

Built With

Share this project:

Updates