Transform PSA's Global Insights dashboard data into actionable business intelligence through natural conversational interaction
Wharffle is an intelligent multi-agent chatbot platform designed to revolutionize how PSA's Global Insights dashboard data is accessed and interpreted. By combining advanced AI capabilities with a modular agent architecture, Wharffle automates complex port performance analysis and enables fast, informed decision-making aligned with PSA's global strategy.
Port operators and managers spend significant time manually interpreting complex visual data from multiple dashboards. This process is time-consuming, error-prone, and delays critical operational decisions.
Wharffle acts as an intelligent intermediary, translating complex visual data into clear, actionable business language. Users simply ask questions through a natural chat interface, and specialized AI agents collaborate behind the scenes to provide timely, accurate insights.
- Specialized Agents: Each agent is an expert in specific data domains (vessel operations, metrics analysis, sustainability, business insights, scheduling)
- Dynamic Activation: Only relevant agents engage per query, optimizing speed and computational efficiency
- Smart Coordination: Agents work together seamlessly to provide comprehensive answers
- Natural Language: Users interact using simple, conversational language—no technical knowledge required
- Context Awareness: The system maintains conversation context and understands follow-up questions
- Real-Time Response: Streaming responses keep users engaged with instant feedback
- Trend Analysis: Automatically identifies patterns and anomalies in operational metrics (berth times, arrival accuracy, carbon savings)
- Proactive Insights: Continuously analyzes data to generate key insights without waiting for manual requests
- Drag & Drop Integration: Users can drag insights directly from the dashboard into Wharffle
- Deep Dive Analysis: Trigger follow-up questions and deeper analysis on specific insights
- Contextual Inquiry: Personalize inquiries based on specific dashboard data
Frontend:
- React 19+: Modern UI framework with latest hooks and features
- TypeScript: Type-safe development with excellent IDE support
- Vite: Lightning-fast build tool and development server
- Tailwind CSS: Utility-first CSS framework for responsive design
- Shadcn UI: Accessible component primitives
Communication:
- WebSocket: Real-time bidirectional communication with the backend
- Reconnecting WebSocket: Automatic reconnection with exponential backoff
Styling & UI:
- Shadcn UI: Modern User Interface Library
- Lucide React: Modern icon library
- Sonner: Toast notifications
- React Markdown: Rich text rendering with syntax highlighting (Shiki)
- Dark Mode Support: Next Themes integration
Build & Tooling:
- Bun: Fast JavaScript runtime and package manager
- ESLint: Code quality and consistency
- TypeScript Compiler: Strict type checking
- Bun (v1.0+): Install Bun
- Node.js (v18+): For TypeScript compilation
- WebSocket Backend: Wharffle backend service running on
ws://localhost:8080
-
Clone the repository
git clone https://github.com/Spchdt/Wharffle.git cd Warffle -
Install dependencies
bun install
-
Set up environment variables (if needed) Create a
.env.localfile:VITE_WS_URL=ws://localhost:8080/ws
Start the development server with hot module replacement:
bun run devThe application will be available at http://localhost:5173
bun run buildThis will:
- Compile TypeScript code
- Bundle with Vite
- Generate optimized production assets in
dist/
bun run previewCheck code quality:
bun run lintWharffle uses a structured WebSocket protocol for real-time communication:
{
"type": 1,
"data": {
"status": 1, // 1=agent selection, 2=generating, 3=complete
"response": "...", // AI-generated response
"agentUsage": [2, 5] // IDs of agents used
}
}{
"type": 2,
"data": {
"insights": [
{
"title": "Peak Load Alert",
"content": "...",
"agents": [1, 2]
}
],
"status": 0
}
}{
"type": 3,
"data": {
"cards": [...],
"status": 0
}
}{
"type": 4,
"data": {
"error": "Connection timeout",
"code": "TIMEOUT"
}
}The client automatically handles:
- Connection establishment: Triggered on app load
- Reconnection: Exponential backoff (500ms → 8000ms) on disconnect
- Message parsing: Robust error handling for malformed messages
- Status tracking: Real-time connection state updates
Wharffle deploys specialized agents for different operational domains:
| Agent ID | Name | Specialty |
|---|---|---|
| 1 | Vessel Agent | Vessel operations and logistics |
| 2 | Metrics Agent | Performance metrics and analytics |
| 3 | Sustainability Agent | Carbon footprint and sustainability data |
| 4 | Business Agent | Business intelligence and strategy |
| 5 | Schedule Agent | Scheduling and planning |
- User Query: User submits a question
- Query Analysis: System determines which agents are needed
- Agent Activation: Only relevant agents are activated
- Collaborative Analysis: Agents analyze relevant data
- Response Generation: Synthesized response combining agent insights
- Delivery: Response streamed to user with agent usage information
Built with ❤️ by the Kopibara Team