The problem
WebBriks needed its public website to capture and support visitors directly, with an AI assistant that could answer first and escalate to a human agent without losing context.
The approach
Built the public Next.js site with a floating chat widget backed by the shared Express and MongoDB server. Visitor sessions, guests, and messages are persisted, and Socket.io carries live messaging between visitors and a dedicated support agent app.
Architecture
Next.js (App Router) public site with Socket.io-client, GSAP and Lenis for motion, and Swiper. A separate Next.js support app for agents. Shared Express, TypeScript, and MongoDB backend with chat-session, chat-message, guest, ticket, and ai-conversation collections, Google Gemini for AI replies, and AWS S3 and Cloudinary for media.
Key features
- Floating AI chat widget on the public site
- AI first-response using Google Gemini with conversation history
- Real-time visitor-to-agent handoff over Socket.io
- Dedicated support agent app with tickets and ticket messages
- Guest and session tracking for anonymous visitors
- Animated marketing site built with GSAP, Lenis, and Swiper
Tech stack
The result
Visitors get instant AI answers on the marketing site and can be escalated to a live agent in the same conversation, all on the shared WebBriks backend.