Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lanai Lifestyle — Intelligence Platform

A full-stack advisor portal and client-facing portal for Lanai Lifestyle, a luxury travel concierge company. Built with React + Vite (frontend), Twenty CRM (backend CRM), and a suite of Python/Flask AI microservices powered by Ollama (local LLM).


Repository Structure

lanai/
├── lanai-portal/                  # React + Vite advisor & client portal
│   ├── client/src/
│   │   ├── pages/                 # All portal pages
│   │   │   ├── Dashboard.tsx      # Live CRM dashboard
│   │   │   ├── ClientsPage.tsx    # 1,200 CRM contacts (live GraphQL)
│   │   │   ├── TravelRequestsPage.tsx  # Pipeline opportunities (live)
│   │   │   ├── MembersPage.tsx    # Active members (live)
│   │   │   ├── ProposalEnginePage.tsx  # Streaming AI proposal co-pilot
│   │   │   ├── ClientPortalLogin.tsx   # Member-facing login (/client)
│   │   │   └── ClientPortalDashboard.tsx  # Member trip dashboard
│   │   └── components/            # Shared UI components
│   └── vite.config.ts             # Proxy config for CRM + AI services
│
├── lanai_ai/                      # Python/Flask AI microservices
│   └── pillars/
│       ├── whatsapp/app.py        # Port 5555 — WhatsApp AI triage
│       ├── proposals/app.py       # Port 5556 — Proposal engine (SSE streaming)
│       ├── intelligence/app.py    # Port 5557 — Client intelligence
│       ├── briefing/app.py        # Port 5558 — Morning briefing
│       └── chatwoot/app.py        # Port 5560 — Chatwoot unified inbox AI bridge
│
├── lanai_recommendations_presentation/  # Slide deck (HTML slides)
├── Lanai_Lifestyle_CRM_Handoff.md       # Technical handoff document
└── lanai_recommendations_outline.md     # Strategy recommendations

Features

Advisor Portal (/)

  • Dashboard — Live CRM stats: 1,200 clients, 129 open requests, 21 members, £106M pipeline
  • Clients — Searchable table of all CRM contacts (live Twenty CRM GraphQL)
  • Travel Requests — Pipeline view with stage filters (Enquiry → Booking)
  • Members — Membership dashboard with Platinum/Gold/Silver tiers
  • Proposal Co-Pilot — AI-powered proposal generator with:
    • Streaming mode: word-by-word SSE output from Ollama
    • Structured mode: expandable JSON sections
  • Client Intelligence — AI scoring and insights per client
  • Morning Briefing — Daily AI-generated digest
  • WhatsApp Inbox — AI-triaged message management
  • Chatwoot Unified Inbox — Centralized messaging across all channels (WhatsApp, web chat, email, Facebook, Twitter) with:
    • Real-time conversations from Chatwoot platform
    • AI-powered triage with intent detection, sentiment analysis, and urgency scoring
    • Smart draft replies generated by Ollama
    • CRM contact sync — automatic contact lookup and creation in Twenty CRM
    • Multi-channel support — unified view of all customer communications

Client Portal (/client)

  • Secure PIN login (email + 4-digit PIN)
  • Trip dashboard with itinerary view
  • Travel request submission form
  • WhatsApp quick-connect to advisor

Tech Stack

Layer Technology
Frontend React 19, Vite 7, Tailwind CSS 4, shadcn/ui
CRM Twenty CRM (self-hosted, GraphQL API)
AI / LLM Ollama (llama3.2:3b), Flask, SSE streaming
Routing Wouter
Styling Tailwind CSS 4, Playfair Display + Inter fonts

Local Development

Prerequisites

  • Node.js 22+, pnpm
  • Python 3.11+
  • Twenty CRM running on port 3000
  • Ollama running on port 11434 with llama3.2:3b model

Start the frontend

cd lanai-portal
pnpm install
pnpm dev
# Portal available at http://localhost:3001

Start AI microservices

cd lanai_ai/pillars/proposals && python3 app.py   # Port 5556
cd lanai_ai/pillars/intelligence && python3 app.py # Port 5557
cd lanai_ai/pillars/briefing && python3 app.py     # Port 5558
cd lanai_ai/pillars/whatsapp && python3 app.py     # Port 5555
cd lanai_ai/pillars/chatwoot && python3 app.py     # Port 5560

CRM Proxy

The Vite dev server proxies /crm/* to Twenty CRM on port 3000, injecting the API JWT token server-side. No token is exposed to the browser.


API Endpoints

Chatwoot AI Bridge (port 5560)

Method Path Description
GET /health Health check endpoint
GET /api/stats Conversation statistics
GET /api/conversations List conversations (query: status, limit, offset)
GET /api/conversations/<id>/messages Get conversation messages
POST /api/conversations/<id>/messages Send message in conversation
POST /api/conversations/<id>/ai-draft Generate AI draft reply
GET /api/contacts List Chatwoot contacts
POST /api/ai-triage Run AI triage on message
POST /api/ai-draft-reply Generate AI draft reply
POST /webhooks/chatwoot Chatwoot webhook handler

Proposal Engine (port 5556)

Method Path Description
POST /api/generate-proposal Structured JSON proposal
POST /api/generate-proposal-stream SSE streaming markdown proposal
POST /api/generate-itinerary Day-by-day itinerary JSON

SSE Streaming Format

data: {"token": "word "}
data: {"token": "by "}
data: {"token": "word"}
data: [DONE]

Presentation Deck

The lanai_recommendations_presentation/ directory contains 14 HTML slides covering:

  1. Title — The Intelligence Layer
  2. Executive framing
  3. Six-pillar framework
  4. Pillars 1–6 (WhatsApp, Proposals, Intelligence, Client Portal, Suppliers, AI Advisor)
  5. Implementation roadmap
  6. NEW: Live CRM Integration (implemented)
  7. NEW: Client Portal (implemented)
  8. NEW: Streaming Proposal Co-Pilot (implemented)
  9. Closing

Environment Variables

Portal Server

# Chatwoot Integration
CHATWOOT_URL=http://localhost:3000          # Chatwoot server URL
CHATWOOT_ACCESS_TOKEN=<chatwoot_token>      # Chatwoot API access token
CHATWOOT_ACCOUNT_ID=1                       # Chatwoot account ID
CHATWOOT_WEBHOOK_SECRET=<secret>            # Webhook verification secret
CHATWOOT_AI_BRIDGE_URL=http://localhost:5560 # Chatwoot AI bridge service

# CRM
VITE_CRM_TOKEN=<twenty_api_key>
VITE_CRM_URL=http://localhost:3000

Chatwoot AI Bridge Service

PORT=5560
CHATWOOT_URL=http://localhost:3000
CHATWOOT_ACCESS_TOKEN=<token>
CHATWOOT_ACCOUNT_ID=1
CHATWOOT_WEBHOOK_SECRET=<secret>
OLLAMA_MODEL=llama3.2:3b

Built by Manus AI for Lanai Lifestyle — June 2026

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages