One chat to rule them all, one chat to find them, one chat to bring them all and in the darkness bind them
A mystical, Lord of the Rings themed real-time chat application built with modern web technologies. Experience the magic of Middle-earth through digital conversations with a beautifully crafted UI featuring golden gradients and epic styling.
To test the real-time chat functionality with multiple clients:
-
Multiple Browser Windows/Tabs:
- Open the application in multiple browser windows or tabs
- Use different usernames for each session
- Watch for join/leave notifications and real-time message updates
-
Incognito Mode:
- Use incognito/private browsing mode alongside normal mode
- This simulates different users and helps test socket reconnection logic
-
Socket Event Monitoring:
- Open browser dev tools console to see socket connection logs
- Watch for
userJoin,userLeave, andreceiveMessageevents - Monitor server-side logs for connection handling
The AI bot has multiple personalities that respond to different types of questions:
Gandalf answers Angular questions:
- "How do I use Angular signals?"
- "What's the difference between template-driven and reactive forms?"
- "How do I implement lazy loading in Angular?"
- "What are Angular lifecycle hooks?"
- "How do I use Angular's new control flow syntax?"
Sauron answers React questions:
- "How do I use React hooks?"
- "What's the difference between useState and useReducer?"
- "How do I implement context in React?"
- "What are React lifecycle methods?"
- "How do I use React Router?"
Michael Scott answers general frontend questions:
- "What are the benefits of using Tailwind CSS?"
- "How do I implement real-time features with WebSockets?"
- "What's the best way to handle state management?"
- "How do I optimize bundle size?"
- "What are some performance best practices?"
- "How do I debug WebSocket connections?"
- "How do I implement error handling in services?"
-
Start the client (Angular frontend):
npx nx serve chatBHP
-
Start the server (NestJS backend):
npx nx serve chatBHP-server
-
Open your browser and navigate to the client URL (typically
http://localhost:4200)
- Angular 16 - Modern reactive framework with signals
- Tailwind CSS - Utility-first styling with custom Lord of the Rings theme
- Socket.io - Real-time communication
- Nx Monorepo - Scalable workspace architecture
- NestJS - Progressive Node.js framework
- Socket.io - WebSocket implementation
- OpenAI Integration - AI-powered chat responses
- 🎨 Lord of the Rings Themed UI - Golden gradients and mystical styling
- 💬 Real-time Chat - Instant messaging with WebSocket
- 🤖 AI Integration - Intelligent responses powered by OpenAI
- 📱 Responsive Design - Works on all devices
- 🎯 Modern Angular - Using latest features like signals and control flow
The application features a carefully crafted Lord of the Rings aesthetic:
- Golden gradient text effects
- Themed scrollbars with amber and orange colors
- Middle-earth inspired color palette
- Epic typography and styling
chatBHP/
├── apps/
│ ├── chatBHP/ # Angular frontend
│ └── chatBHP-server/ # NestJS backend
├── libs/ # Shared libraries
│ ├── chat/ # Chat feature components
│ ├── core/ # Core services and utilities
│ └── ui/ # Reusable UI components
npx nx serve chatBHP- Start frontend dev servernpx nx serve chatBHP-server- Start backend dev servernpx nx build chatBHP- Build frontend for productionnpx nx build chatBHP-server- Build backend for productionnpx nx test chatBHP- Run frontend testsnpx nx test chatBHP-server- Run backend tests
"All we have to decide is what to do with the time that is given us." - Gandalf