Inspiration

( Client ID - O-bUq0ZuvhPHOddlLFVngA )

Have you ever been surprised by a restaurant bill that was way higher than expected? Or wondered if it's safe to eat somewhere with your allergies? Or wanted to plan a date night but didn't know where to start?

LocalAI was born from these everyday frustrations. We realized that while Yelp has amazing data, people need specialized tools for specific decisions—not just generic search results. So we built six AI-powered tools that each solve a unique problem in local discovery.

What It Does

LocalAI is a comprehensive platform featuring 6 specialized AI tools:

  1. TruePrice - Shows the real cost of dining out (menu + tax + tip + parking), not just menu prices. Filter by budget to find restaurants you can actually afford.

  2. SafeEats - Calculates allergy safety scores (0-100) by analyzing restaurant types, ingredients, and cross-contamination risks. Warns about dangerous combinations and highlights safe options.

  3. WaitWise - Predicts wait times based on popularity, time of day, party size, and day of week. Shows which restaurants are actually open right now using real business hours.

  4. DateStack - Plans complete date nights in one click. Select budget and vibe (Romantic/Fun/Chill/Adventurous), get dinner + activity recommendations that fit your budget perfectly.

  5. SoloSafe - Scores restaurants for solo dining safety (bar seating, lighting, atmosphere). Includes emergency features: fake call button and location sharing with trusted contacts.

  6. QuickFind - Natural language search for any local service. Just describe what you need: "plumber near me" or "pet-friendly cafes."

How I Built It

Tech Stack:

  • Frontend: Next.js 14 (App Router), React, TypeScript, Tailwind CSS
  • API Integration: Yelp AI API (Chat v2) for business data and contextual information
  • Deployment: Vercel (ready for production)

Architecture Highlights:

  1. Smart API Usage: We make strategic calls to Yelp's AI API, requesting specific contextual information (business hours, photos, reservation availability) for each tool.

  2. Intelligent Fallbacks: When API rate limits are hit, the app gracefully falls back to realistic sample data, ensuring demos always work.

  3. Custom Algorithms: Each tool has specialized logic:

    • TruePrice estimates costs based on restaurant type, rating, and location
    • SafeEats uses category analysis and keyword detection for allergy warnings
    • WaitWise calculates wait times using: \( \text{Wait Time} = \text{Popularity} \times \text{Time Multiplier} \times \text{Party Size} \)
    • DateStack splits budgets 60/40 between dinner and activities
  4. Real-time Geocoding: OpenStreetMap Nominatim API for location input

Challenges I Faced

Challenge 1: Yelp API Data Limitations

Problem: Yelp AI API doesn't return exact prices or detailed allergen information.

Solution: Built smart estimation algorithms. For TruePrice, we analyze restaurant names, categories, and ratings to estimate costs. For SafeEats, we use keyword analysis and category matching to identify allergy risks.

Challenge 2: Business Hours Parsing

Problem: Business hours data from Yelp came in complex datetime strings that crossed midnight and varied by day.

Solution: Created a robust parser that handles:

  • Overnight hours (e.g., 11 PM → 2 AM)
  • Day-of-week matching
  • Current time comparison
  • Fallback messaging when hours are unavailable

Challenge 3: Rate Limiting During Development

Problem: Hit API rate limits frequently while testing all six tools.

Solution: Implemented intelligent caching and graceful degradation. The app now:

  • Caches geocoding results
  • Falls back to sample data when rate limited
  • Displays clear user messages about data source
  • Continues to function fully even without API access

Challenge 4: Natural Language Understanding

Problem: QuickFind needed to distinguish between restaurant searches ("pizza") and service searches ("plumber").

Solution: Built a keyword detection system that analyzes context:

const serviceKeywords = ["plumber", "electrician", "repair", "fix", "install"];
const isService = serviceKeywords.some(k => query.toLowerCase().includes(k));

Challenge 5: Solo Safety Scoring

Problem: No objective "safety score" exists for restaurants.

Solution: Created a weighted scoring system based on verifiable factors:

  • Bar/counter seating: +15 points (easier to dine alone)
  • Well-lit environment: +10 points
  • High foot traffic: +10 points
  • Friendly atmosphere: +10 points
  • Rating 4.5+: +10 points

What I Learned

  1. API Design Matters: Working with Yelp's AI API taught us how to extract maximum value from limited data through creative prompting and contextual requests.

  2. User Experience First: We learned that specialized tools beat general search. Users don't want to browse—they want answers to specific questions.

  3. Graceful Degradation: Building for API failures made our app more robust. The fallback systems ensure it always works, even during demos.

  4. Real Problems Need Real Solutions: Each tool solves an actual pain point we've experienced. TruePrice came from budget surprises, SafeEats from allergic reactions, WaitWise from long waits.

  5. TypeScript is Worth It: Strong typing caught countless bugs early and made refactoring across six tools manageable.

What's Next for LocalAI

Immediate Goals:

  • Add user accounts and saved favorites
  • Implement actual caching to reduce API calls
  • Create mobile-responsive progressive web app
  • Add more tools (GroupPick for group decisions, KidFriendly for family dining)

Long-term Vision:

  • Partner with restaurants for real-time wait time data
  • Integrate reservation systems for one-click booking
  • Add personalization: learn user preferences over time
  • Expand to more cities with local business APIs
  • Build iOS/Android native apps

Monetization Ideas:

  • Premium features: unlimited searches, advanced filters
  • Restaurant partnerships: featured placements
  • API access for other developers

Try It Out!

LocalAI proves that the future of local discovery isn't just better search—it's specialized AI tools for specific decisions. Whether you're planning a date, managing allergies, or dining solo, LocalAI has a tool that makes your decision easier.

Built With

Share this project:

Updates