Chat interface built with React and Material-UI, featuring real-time message formatting and API integration.
- Frontend: React 18, Material-UI
- Tools: Vite, Axios
- Package Manager: npm
frontend/
├── src/
│ ├── features/
│ │ └── chat/
│ │ ├── components/
│ │ │ ├── ChatWindow.jsx
│ │ │ ├── ChatHeader.jsx
│ │ │ ├── MessageList.jsx
│ │ │ ├── ChatInput.jsx
│ │ │ └── FormattedMessage.jsx
│ │ ├── services/
│ │ │ └── chatService.js
│ │ └── pages/
│ │ └── Chat.jsx
│ ├── theme/
│ │ └── theme.js
│ └── App.jsx
- 💬 Real-time chat interface
- 🎨 Material Design components
- 📝 JSON message formatting
- ⚡️ Loading states and animations
- 🔄 API integration
- 🛠 Error handling
- Node.js (v16+)
- npm (v8+)
- Clone and install frontend dependencies:
git clone https://github.com/coderTtxi12/frontend.git
cd frontend
npm installStart the frontend development server:
npm run devVisit http://localhost:5173 in your browser.
- Endpoint:
/generate - Method:
POST - Body:
{
"question": "string"
}{
"answer": "string",
"timestamp": "ISO-8601 string"
}- Create a feature branch:
git checkout -b feature/your-feature-name- Commit your changes:
git commit -m "feat: add some feature"- Push to the branch:
git push origin feature/your-feature-name- Submit a pull request
- Development:
npm run dev - Build:
npm run build - Preview:
npm run preview
The application includes comprehensive error handling:
- API communication errors
- Network connectivity issues
- Loading state management
- Custom Material-UI theme
- Responsive design
- Modern chat interface
- Loading animations
- JSON message formatting
MIT