Skip to content

nayelr/cursathon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Concierge Service - Backend

An AI-powered concierge service for restaurant discovery, recommendations, and bookings built for the D.C. AI Hackathon.

🌟 Features

Core Functionality

  • Natural Language Chat Interface - Conversational AI powered by GPT-4/Claude
  • Restaurant Discovery - Search and filter restaurants using Yelp & Google Places APIs
  • AI Recommendations - Personalized suggestions based on preferences and context
  • Restaurant Bookings - Create, modify, and cancel reservations
  • User Preferences - Save dietary restrictions, favorite cuisines, and more
  • SMS Notifications - Booking confirmations via Twilio

Technical Highlights

  • FastAPI backend with async/await support
  • OpenAI GPT-4 & Anthropic Claude integration
  • Yelp Fusion API & Google Places API
  • JWT authentication
  • Mock booking system (production-ready architecture for real APIs)
  • Comprehensive API documentation (Swagger/OpenAPI)

🚀 Quick Start

Prerequisites

  • Python 3.9+
  • PostgreSQL (optional - using in-memory storage for demo)
  • Redis (optional - for production caching)

Installation

  1. Clone the repository
cd cursathon
  1. Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies
pip install -r requirements.txt
  1. Set up environment variables
cp env.example .env
# Edit .env with your API keys
  1. Run the application
python -m uvicorn app.main:app --reload --host 0.0.0.0 --port 8000

The API will be available at http://localhost:8000

📚 API Documentation

Once the server is running, visit:

🔑 Required API Keys

Essential (for full functionality)

  • OpenAI API Key or Anthropic API Key - For AI conversation
  • Yelp API Key - For restaurant search (free tier available)

Optional (enhanced features)

  • Google Places API Key - Fallback restaurant data
  • Twilio Credentials - SMS notifications
  • Pinecone API Key - Vector search for semantic restaurant discovery

Getting API Keys

OpenAI

  1. Visit https://platform.openai.com/
  2. Sign up and navigate to API keys
  3. Create new key and add to .env

Yelp Fusion API

  1. Visit https://www.yelp.com/developers
  2. Create an app
  3. Copy API key to .env

Twilio (optional)

  1. Visit https://www.twilio.com/
  2. Sign up for free trial
  3. Get Account SID, Auth Token, and Phone Number

📖 API Endpoints

Authentication

  • POST /api/v1/auth/register - Register new user
  • POST /api/v1/auth/login - Login and get JWT token

Chat

  • POST /api/v1/chat - Send message to AI concierge
  • GET /api/v1/chat/history/{conversation_id} - Get conversation history
  • POST /api/v1/chat/recommendations - Get AI recommendations

Restaurants

  • GET /api/v1/restaurants/search - Search restaurants
  • GET /api/v1/restaurants/{id} - Get restaurant details

Bookings

  • POST /api/v1/bookings - Create booking
  • GET /api/v1/bookings - List user bookings
  • GET /api/v1/bookings/{id} - Get booking details
  • PUT /api/v1/bookings/{id} - Update booking
  • DELETE /api/v1/bookings/{id} - Cancel booking

Users

  • GET /api/v1/users/me - Get current user
  • PUT /api/v1/users/me - Update profile
  • GET /api/v1/users/preferences - Get preferences
  • PUT /api/v1/users/preferences - Update preferences

🎯 Demo Flow

Example Conversation

User: "I need a romantic Italian restaurant for tomorrow at 7 PM"

AI: "I'd love to help you find the perfect romantic Italian restaurant! Let me search for some great options..."

System:

  1. Extracts intent: booking
  2. Extracts entities: cuisine=Italian, occasion=romantic, time=tomorrow 7 PM
  3. Searches Yelp/Google for matching restaurants
  4. AI analyzes and recommends top 3 options

AI: "I found 3 wonderful options:

  1. Bella Italia - Intimate setting, candlelit tables, highly rated ⭐ 4.5
  2. Trattoria Roma - Authentic, great ambiance ⭐ 4.7
  3. Il Forno - Cozy, perfect for couples ⭐ 4.6

Which would you prefer?"

User: "Book Bella Italia"

System:

  1. Creates booking
  2. Generates confirmation code
  3. Sends SMS notification (if configured)

AI: "Perfect! Your reservation at Bella Italia is confirmed for tomorrow at 7 PM. Confirmation code: ABC12345 I've sent the details to your phone. Have a wonderful evening! 🎉"

🏗️ Project Structure

cursathon/
├── app/
│   ├── main.py                 # FastAPI application
│   ├── core/
│   │   ├── config.py          # Configuration
│   │   └── security.py        # Auth & JWT
│   ├── models/
│   │   └── database.py        # SQLAlchemy models
│   ├── schemas/
│   │   ├── user.py            # Pydantic schemas
│   │   ├── restaurant.py
│   │   ├── booking.py
│   │   └── chat.py
│   ├── services/
│   │   ├── llm_service.py     # OpenAI/Claude integration
│   │   ├── restaurant_service.py  # Yelp/Google Places
│   │   ├── booking_service.py     # Booking logic
│   │   └── notification_service.py # Twilio SMS
│   └── api/
│       └── v1/
│           ├── router.py
│           └── endpoints/
│               ├── auth.py
│               ├── chat.py
│               ├── restaurants.py
│               ├── bookings.py
│               └── users.py
├── requirements.txt
├── env.example
├── README.md
└── TECHNICAL_ROADMAP.md

🔧 Configuration

Mock Mode

For demo purposes without API keys, the system can run in mock mode:

  • Set MOCK_RESTAURANT_API=True to use mock restaurant data
  • Set MOCK_BOOKING_API=True to simulate bookings (default)
  • LLM will use fallback responses if no API key is provided

Production Mode

  1. Set all API keys in .env
  2. Configure PostgreSQL database
  3. Set up Redis for caching
  4. Deploy to Vercel, Railway, or similar platform

🚀 Deployment

Vercel (Recommended)

# Install Vercel CLI
npm i -g vercel

# Deploy
vercel

Railway

# Install Railway CLI
npm i -g railway

# Login and deploy
railway login
railway init
railway up

Docker (coming soon)

docker build -t ai-concierge .
docker run -p 8000:8000 ai-concierge

📊 Sponsors & Technologies Used

AI/LLM

  • OpenAI GPT-4 - Primary LLM for conversations
  • Anthropic Claude - Alternative LLM option

APIs & Data

  • Yelp Fusion API - Restaurant data and reviews
  • Google Places API - Location and restaurant info

Communication

  • Twilio - SMS notifications and confirmations

Infrastructure

  • FastAPI - Modern Python web framework
  • PostgreSQL - Relational database
  • Redis - Caching and session management

Optional Enhancements

  • Pinecone - Vector database for semantic search
  • Supabase - Alternative to PostgreSQL + Auth
  • Stripe - Payment processing (future feature)
  • Sentry - Error monitoring

🧪 Testing

Manual Testing

Use the Swagger UI at /docs to test endpoints interactively.

Example cURL Commands

Search Restaurants:

curl -X GET "http://localhost:8000/api/v1/restaurants/search?cuisine=Italian&location=Washington%2C%20DC"

Chat with AI:

curl -X POST "http://localhost:8000/api/v1/chat" \
  -H "Content-Type: application/json" \
  -d '{"message": "Find me a romantic Italian restaurant"}'

Create Booking:

curl -X POST "http://localhost:8000/api/v1/bookings" \
  -H "Content-Type: application/json" \
  -d '{
    "restaurant_id": "mock-1",
    "booking_date": "2024-02-01T19:00:00",
    "party_size": 2,
    "occasion": "anniversary"
  }'

🎨 Frontend Integration

This backend is designed to work with a V0-generated frontend. Key integration points:

WebSocket Support (Future)

Real-time chat updates via WebSocket connection

REST API

All endpoints return JSON and follow RESTful conventions

Authentication

Use JWT tokens in Authorization header:

Authorization: Bearer <token>

🤝 Contributing

This is a hackathon project. Feel free to:

  • Report issues
  • Suggest features
  • Submit pull requests

📝 License

MIT License - feel free to use this for your projects!

🏆 Hackathon Submission

Project: AI Concierge Service Hackathon: D.C. AI Hackathon 2026 Category: AI Applications / Consumer Services

What Makes This Special

  • Practical Use Case - Real-world problem with AI solution
  • Multiple API Integrations - Demonstrates technical breadth
  • Production-Ready Architecture - Can scale to real users
  • AI-First Design - Natural language as primary interface
  • Demo-Friendly - Works with or without real API keys

📞 Support

For questions or issues:

  • Check the /docs endpoint for API documentation
  • Review TECHNICAL_ROADMAP.md for architecture details
  • Test in mock mode if APIs are not working

Built with ❤️ for the D.C. AI Hackathon

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages