Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
362 changes: 362 additions & 0 deletions TRAVEL_PACKING_LIST_PLAN.md

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions deepseek-travels-chat/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue,css,scss,sass,less,styl}]
charset = utf-8
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
end_of_line = lf
max_line_length = 100
1 change: 1 addition & 0 deletions deepseek-travels-chat/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
30 changes: 30 additions & 0 deletions deepseek-travels-chat/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
.DS_Store
dist
dist-ssr
coverage
*.local

/cypress/videos/
/cypress/screenshots/

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

*.tsbuildinfo
6 changes: 6 additions & 0 deletions deepseek-travels-chat/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://json.schemastore.org/prettierrc",
"semi": false,
"singleQuote": true,
"printWidth": 100
}
9 changes: 9 additions & 0 deletions deepseek-travels-chat/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"recommendations": [
"Vue.volar",
"vitest.explorer",
"dbaeumer.vscode-eslint",
"EditorConfig.EditorConfig",
"esbenp.prettier-vscode"
]
}
173 changes: 173 additions & 0 deletions deepseek-travels-chat/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
# DeepseekTravels Chat App

A modern Vue3 + TypeScript chat interface for the DeepseekTravels intelligent packing assistant. This app provides a user-friendly web interface for the MCP-based travel packing system.

## Features

🧳 **Intelligent Packing Lists** - Generate smart packing recommendations based on destination, weather, and activities
🌦️ **Weather Integration** - Real-time weather forecasts to inform packing decisions
✈️ **Travel Requirements** - Visa, documentation, and security restriction checking
🏨 **Booking Suggestions** - Flight, hotel, and activity recommendations
📱 **Mobile-Friendly** - Responsive design optimized for all devices
🎯 **Keep-It-Simple Mode** - Quick, printable checklists for fast planning

## Quick Start

### Prerequisites

- Node.js 20.19+ (or compatible version)
- The MCP servers from the parent project running

### Installation

```bash
# Install dependencies
npm install

# Start development server
npm run dev

# Build for production
npm run build
```

### Full Stack Setup

The app now uses a FastAPI backend that replicates the Jupyter notebook functionality. Here's how to run everything:

**Step 1: Start MCP Servers**
```bash
# Start all MCP servers (run this first!)
./start-servers.sh
```

**Step 2: Start Backend API**
```bash
# Start the FastAPI backend server
./start-backend.sh
```

**Step 3: Start Frontend**
```bash
# Start the Vue3 frontend (in a new terminal)
npm run dev
```

The app will show server connection status in the header - all should be green when working properly.

## Architecture

### Full Stack Components

**Frontend (Vue3 + TypeScript)**
- **ChatInterface.vue** - Main chat component with message history and input
- **Message rendering** - Supports markdown-like formatting
- **Typing indicators** - Shows when the assistant is processing
- **Server status** - Real-time connection monitoring

**Backend (FastAPI + Python)**
- **main.py** - FastAPI server with LangChain agent from notebook
- **Agent setup** - Azure OpenAI integration with MCP tools
- **Session management** - Persistent conversation memory
- **Health monitoring** - Real-time MCP server status checks

**Services & Integration**
- **chatService.ts** - Frontend HTTP client for FastAPI backend
- **MCP Integration** - LangChain MCP adapters for tool calling
- **CORS handling** - Proper cross-origin request support

## Usage Examples

Try these example queries in the chat:

- "What should I pack for a week in Tokyo in November?"
- "Beach weekend in Lisbon - keep it simple!"
- "Business trip to Singapore, 28L backpack, flying ANA"
- "Patagonia hiking for 10 days, 65L pack, 20kg limit"
- "What's the weather like in Paris?"
- "Do I need a visa for Japan?"

## Development

### Project Structure

```
deepseek-travels-chat/
├── backend/ # FastAPI Backend
│ ├── main.py # FastAPI app with LangChain agent
│ ├── requirements.txt # Python dependencies
│ └── .env # Environment variables (copied from agent)
├── src/ # Vue3 Frontend
│ ├── components/ # Vue components
│ │ └── ChatInterface.vue
│ ├── services/ # HTTP client services
│ │ └── chatService.ts
│ ├── composables/ # Vue composables
│ │ └── useServerStatus.ts
│ ├── types/ # TypeScript interfaces
│ │ └── chat.ts
│ └── App.vue # Root component
├── start-servers.sh # Start all MCP servers
├── start-backend.sh # Start FastAPI backend
├── stop-servers.sh # Stop MCP servers
└── package.json # Frontend dependencies
```

### Key Technologies

- **Vue 3** - Composition API with `<script setup>`
- **TypeScript** - Full type safety
- **Vite** - Fast development and building
- **CSS3** - Modern styling with gradients and animations

### Environment Variables

Configure MCP server URLs in `.env`:

```env
VITE_WEATHER_MCP_URL=http://127.0.0.1:8009
VITE_ATTRACTIONS_MCP_URL=http://127.0.0.1:8008
VITE_TRAVEL_REQUIREMENTS_MCP_URL=http://127.0.0.1:8010
VITE_BOOKING_MCP_URL=http://127.0.0.1:8011
```

## Production Deployment

```bash
# Build for production
npm run build

# Preview production build
npm run preview

# Deploy dist/ folder to your hosting platform
```

## Troubleshooting

### MCP Servers Not Connecting

1. Verify all MCP servers are running on correct ports
2. Check firewall/CORS settings
3. Review server logs for errors
4. Ensure servers are accessible at configured URLs

### Chat Not Responding

1. Check browser console for JavaScript errors
2. Verify MCP server endpoints are responding
3. Test individual server health endpoints
4. Review network tab for failed requests

## Contributing

This chat app was converted from the original Jupyter notebook (`packing_list.ipynb`) to provide a modern web interface. Key conversions:

- **Agent logic** → Service layer with intent parsing
- **MCP integration** → HTTP client with error handling
- **Interactive cells** → Real-time chat interface
- **Notebook output** → Formatted message responses

## License

Part of the NewOrbit Hackathon 2025 project.
25 changes: 25 additions & 0 deletions deepseek-travels-chat/backend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
```
uv pip install -r requirements.txt
uv run main.py
```

need a `.env` with:

```
AZURE_OPENAI_ENDPOINT=https://mkolo-mfxqosv8-eastus2.cognitiveservices.azure.com/openai/deployments/gpt-5-nano/chat/completions?api-version=2025-01-01-preview
AZURE_OPENAI_API_KEY=
AZURE_API_VERSION=2024-12-01-preview
DEPLOYMENT_NAME=gpt-5-nano
ATTRACTIONS_MCP_URL=http://127.0.0.1:8008/mcp/
WEATHER_MCP_URL=http://127.0.0.1:8009/mcp/
TRAVEL_REQUIREMENTS_MCP_URL=http://127.0.0.1:8010/mcp/
BOOKING_MCP_URL=http://127.0.0.1:8011/mcp/
```

then `POST localhost:8000/chat`

```
{
"message": "Hello! I am going to Skegness for two weeks. I have a 20L rucksack. I am going skydiving."
}
```
Loading