A full-stack distributed Airbnb platform with an intelligent AI-powered travel concierge service. This system includes separate host and traveler applications, backend APIs, and an AI agent for personalized travel planning.
agentic-airbnb/
├── agent/ # AI Agent Backend (FastAPI + Python)
├── backend/
│ ├── host/ # Host Backend API (Node.js + Express)
│ └── traveller/ # Traveller Backend API (Node.js + Express)
├── frontend/
│ ├── host/ # Host Frontend (React + Vite)
│ └── traveller/ # Traveller Frontend (React + Vite)
└── README.md # This file
Before you begin, ensure you have:
- Node.js (v16 or higher) installed
- Python (3.8 or higher) installed
- MySQL running on localhost:3306
- OpenAI API Key (for AI agent features)
- npm or yarn package manager
cd "/Users/spartan/Documents/Distributed Systems Lab/agentic-airbnb"Create backend/host/.env:
PORT=4000
NODE_ENV=development
DB_HOST=localhost
DB_PORT=3306
DB_USER=root
DB_PASSWORD=your_mysql_password
DB_NAME=airbnb_core
SESSION_SECRET=host-secret-key-change-me
SESSION_COOKIE_NAME=airbnb_host.sid
WEB_ORIGIN=http://localhost:5174
UPLOAD_DIR=uploads
MAX_FILE_SIZE=5242880Create backend/traveller/.env:
PORT=5001
NODE_ENV=development
DB_HOST=localhost
DB_PORT=3306
DB_USER=root
DB_PASSWORD=your_mysql_password
DB_NAME=airbnb_core
SESSION_SECRET=traveller-secret-key-change-me
WEB_ORIGIN=http://localhost:5173
UPLOAD_DIR=uploads
MAX_FILE_SIZE=5242880Create frontend/host/.env:
VITE_HOST_API=http://localhost:4000
VITE_AGENT_API=http://localhost:8000Create frontend/traveller/.env:
VITE_API_URL=http://localhost:5001
VITE_AGENT_API_URL=http://localhost:8000Create agent/.env:
# OpenAI API Key (required for AI features)
OPENAI_API_KEY=sk-your-openai-api-key
# Tavily API Key (provided - for web search)
TAVILY_API_KEY=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
# Server Configuration
HOST=0.0.0.0
PORT=8000your_mysql_password with your actual MySQL root password.
Run the database migration to create the schema:
mysql -u root -p airbnb_core < backend/host/sql/unify_schemas.sqlEnter your MySQL password when prompted.
# Host Backend
cd backend/host
npm install
cd ../..
# Traveller Backend
cd backend/traveller
npm install
cd ../..# Host Frontend
cd frontend/host
npm install
cd ../..
# Traveller Frontend
cd frontend/traveller
npm install
cd ../..# AI Agent
cd agent
pip3 install -r requirements.txt
# Optional: Setup database
python3 setup_sqlite.py
cd ..Open 5 separate terminal windows/tabs and run the following commands:
cd "/Users/spartan/Documents/Distributed Systems Lab/agentic-airbnb/backend/host"
npm run dev✅ Expected: Host API on http://localhost:4000
cd "/Users/spartan/Documents/Distributed Systems Lab/agentic-airbnb/backend/traveller"
npm run dev✅ Expected: Traveler API running on http://localhost:5001
cd "/Users/spartan/Documents/Distributed Systems Lab/agentic-airbnb/frontend/host"
npm run dev✅ Expected: Local: http://localhost:5174/
cd "/Users/spartan/Documents/Distributed Systems Lab/agentic-airbnb/frontend/traveller"
npm run dev✅ Expected: Local: http://localhost:5173/
cd "/Users/spartan/Documents/Distributed Systems Lab/agentic-airbnb/agent"
python3 run_server_sqlite.py✅ Expected: Server running on http://localhost:8000
Alternative for AI Agent:
# Using the startup script
cd "/Users/spartan/Documents/Distributed Systems Lab/agentic-airbnb"
bash START_AI_AGENT.shOnce all servers are running, you can access:
- Host Frontend: http://localhost:5174
- Traveller Frontend: http://localhost:5173
- Host Backend API: http://localhost:4000
- Traveller Backend API: http://localhost:5001
- AI Agent API: http://localhost:8000
- AI Agent Documentation: http://localhost:8000/docs
- Property listing management
- Booking requests management
- Profile management
- Photo uploads
- Property search and discovery
- Booking management
- AI-powered travel concierge
- Personalized recommendations
- Day-by-day itinerary planning
- Natural language travel planning
- Personalized activity recommendations
- Restaurant suggestions
- Weather-aware packing lists
- Real-time web search integration
-
Create Host Account
- Open http://localhost:5174
- Sign up as a host
- Create a property listing
-
Create Traveller Account
- Open http://localhost:5173
- Sign up as a traveller
- Search for properties
-
Make a Booking
- Select a property
- Choose dates and guests
- Complete booking (status: PENDING)
-
Host Approves Booking
- Go to host dashboard (http://localhost:5174)
- Navigate to Bookings
- Accept the booking request
-
Traveller Sees Confirmation
- Go to traveller bookings page
- Status should update to CONFIRMED
-
Test AI Agent
- In traveller app, open the AI chat panel
- Ask travel questions like: "Plan a 3-day trip to Paris"
- Get personalized recommendations
# Kill processes on specific ports
lsof -ti:4000 | xargs kill -9 # Host backend
lsof -ti:5001 | xargs kill -9 # Traveller backend
lsof -ti:5173 | xargs kill -9 # Traveller frontend
lsof -ti:5174 | xargs kill -9 # Host frontend
lsof -ti:8000 | xargs kill -9 # AI Agent# Check if MySQL is running
mysql -u root -p -e "SELECT 1"
# Start MySQL (macOS)
brew services start mysql
# Start MySQL (Linux)
sudo systemctl start mysql# Reinstall backend dependencies
cd backend/host && npm install
cd ../traveller && npm install
# Reinstall frontend dependencies
cd ../frontend/host && npm install
cd ../traveller && npm install
# Reinstall AI agent dependencies
cd ../../agent && pip3 install -r requirements.txt- Verify all
.envfiles are created in the correct directories - Check that MySQL password is correct
- Ensure OpenAI API key is set for AI agent features
- Frontend: React 18, Vite, Bootstrap
- Backend: Node.js, Express, MySQL
- AI Agent: FastAPI, Python, LangChain, OpenAI, Tavily
- Database: MySQL (shared), SQLite (AI agent)
- Authentication: Express Sessions, Firebase (optional)
- Quick Start Guide - Detailed integration guide
- AI Agent Documentation - AI agent details
- API Documentation - API reference
- Testing Guide - Testing instructions
┌─────────────────┐ ┌─────────────────┐
│ Host Frontend │ │ Traveller Frontend│
│ (Port 5174) │ │ (Port 5173) │
└────────┬────────┘ └────────┬─────────┘
│ │
│ HTTP │ HTTP
│ │
▼ ▼
┌─────────────────┐ ┌─────────────────┐
│ Host Backend │ │ Traveller Backend│
│ (Port 4000) │ │ (Port 5001) │
└────────┬────────┘ └────────┬─────────┘
│ │
│ │
└────────────┬───────────────┘
│
▼
┌──────────────────┐
│ MySQL Database │
│ airbnb_core │
└──────────────────┘
┌──────────────────────────────────────┐
│ AI Agent Server │
│ (Port 8000) │
│ FastAPI + LangChain + OpenAI │
└──────────────────────────────────────┘
For issues or questions:
- Check the troubleshooting section above
- Review individual component READMEs
- Check the documentation files in the root directory
Built with ❤️ for intelligent travel planning