A real-time chat application built with React, Node.js, and WebSocket technology featuring a Bumble-inspired design.
- Real-time Messaging: Instant message delivery using WebSocket connections
- Typing Indicators: See when other users are typing
- Multi-user Simulation: Switch between different user personas (You, Alice, Bob, Charlie)
- Bumble-inspired Design: Beautiful yellow and black theme
- Responsive UI: Works seamlessly on desktop and mobile devices
- Auto-scroll: Messages automatically scroll to the latest
- Connection Status: Real-time connection indicator
- Message History: Persistent message storage with initial sample messages
- React 18 - Modern React with hooks
- Vite - Fast build tool and dev server
- Tailwind CSS - Utility-first CSS framework
- React Query - Data fetching and caching
- WebSocket - Real-time communication
- Node.js - JavaScript runtime
- Express.js - Web framework
- WebSocket (ws) - WebSocket server
- CORS - Cross-origin resource sharing
buzzing-chat/
βββ client/ # Frontend React application
β βββ src/
β β βββ components/ # Reusable UI components
β β βββ hooks/ # Custom React hooks
β β βββ pages/ # Page components
β β βββ App.jsx # Main app component
β β βββ main.jsx # React entry point
β β βββ index.css # Global styles
β βββ index.html # HTML template
βββ server/ # Backend Node.js application
β βββ index.js # Express server setup
β βββ storage.js # In-memory data storage
βββ shared/ # Shared utilities
β βββ schema.js # Data validation schemas
βββ package.json # Project dependencies and scripts
βββ vite.config.js # Vite configuration
βββ tailwind.config.js # Tailwind CSS configuration
βββ README.md # Project documentation
- Node.js 18.0.0 or higher
- npm 8.0.0 or higher
-
Clone the repository
git clone https://github.com/your-username/buzzing-chat.git cd buzzing-chat -
Install dependencies
npm install
-
Start development servers
npm run dev
-
Open your browser
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
- WebSocket: ws://localhost:5000/ws
| Script | Description |
|---|---|
npm run dev |
Start both frontend and backend in development mode |
npm run server |
Start only the backend server |
npm run client |
Start only the frontend development server |
npm run build |
Build the frontend for production |
npm run start |
Start the application in production mode |
npm run preview |
Preview the production build locally |
npm run clean |
Clean build directories |
The application uses the following environment variables:
NODE_ENV: Set todevelopmentorproductionPORT: Server port (default: 5000)
- Backend Server: 5000
- Frontend Dev Server: 3000
- WebSocket: 5000/ws
The application uses a Bumble-inspired color scheme:
- Primary Yellow:
#F7B500(Bumble yellow) - Secondary Black:
#000000(Bumble black) - Accent Orange:
#FF6B35(Gradient accent) - Background:
#FEFEFE(Clean white)
- Font Family: Inter (Google Fonts)
- Weights: 400, 500, 600, 700
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/messages |
Fetch recent messages |
POST |
/api/messages |
Send a new message |
| Event | Description |
|---|---|
message |
New message received |
typing |
User typing indicator |
initial_messages |
Initial message history |
- Open multiple browser windows/tabs
- Select different users from the dropdown in each window
- Start typing in one window to see typing indicators in others
- Send messages to see real-time updates across all windows
-
Build the frontend
npm run build
-
Start production server
npm start
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
RUN npm run build
EXPOSE 5000
CMD ["npm", "start"]This project fulfills the following requirements:
- Real-time chat functionality with WebSocket
- Typing indicators for enhanced UX
- Bumble-inspired design with yellow/black theme
- Multi-user simulation with user selection
- Professional code structure with proper organization
- Required keywords:
define-ocgandvarOcgvariables - Modern tech stack: React, Node.js, WebSocket
- Responsive design for mobile and desktop
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Bumble for design inspiration
- React and Node.js communities
- WebSocket technology for real-time communication
Built with β€ by the TaskMaster Team
