Transform Conversations, Accelerate Innovation Instantly
testmate-ai.vercel.app
- π₯ Responsive UI with mobile-first design
- π¬ Chat Interface for prompt-response communication
- π Chat History Sidebar, toggleable on mobile
- ποΈ Custom Navigation Bar:
- Left: Sidebar toggle (mobile only)
- Center: App logo
- Right: Hamburger menu with dropdown links
- π¨ Glassmorphism effects using
backdrop-blur, opacity, and shadows - π§ Automatically fetches and displays chat history
- βοΈ Send messages via button or Enter key
- π§© Modular and scalable React hooks-based structure
| Layer | Tech |
|---|---|
| Frontend | React (w/ Hooks) |
| Styling | Tailwind CSS |
| HTTP Client | Axios |
| State | useState, useEffect, useRef |
| Auth Handling | JWT via localStorage |
git clone https://github.com/your-username/qa-chatbot-ui.git
cd qa-chatbot-uinpm install
# or
yarn installCreate a .env file in the root:
REACT_APP_API_BASE_URL=https://your-api-endpoint.comnpm start
# or
yarn startThis will launch the app at http://localhost:3000.
src/
βββ Chat.js # Main Chat component
βββ App.js # App entry point
βββ index.js # React DOM root
Handles the full chat interface:
-
State:
messages: Stores chat historyinput: Current user inputshowSidebar: Sidebar visibility (mobile)showMobileMenu: Right-side menu visibility
-
Lifecycle:
- Fetches history on load
- Scrolls to latest message when updated
-
Methods:
sendMessage(): Sends user input to API and updates messageshandleKeyPress(): Listens for Enter key
-
Rendering:
- Sidebar: History list with prompt-response summary
- Main Area: Chat bubbles and input box
- Header/Nav: Sidebar toggle + center logo + mobile hamburger menu
-
Mobile Sidebar Overlay: Full-screen black overlay with z-index when chat history is shown
-
Navbar:
- Left: Sidebar button on mobile
- Center: "QA ChatBot"
- Right: Hamburger icon to open dropdown
-
Glassmorphism: Achieved with Tailwind classes like
backdrop-blur-md,bg-opacity-10, and subtleshadow-md -
Message Styling:
- User: Blue bubble aligned right
- Bot: Transparent white bubble aligned left
- Requires a valid JWT in
localStorageunder the keytoken - Included in
Authorization: Bearer ...header for both GET and POST requests
Returns:
{
"history": [
{
"prompt": "How to write test cases?",
"response": "Hereβs how you start writing test cases..."
}
]
}Request:
{
"message": "Your input prompt here"
}Response:
{
"reply": "API response from the bot"
}- Keyboard-friendly input
- Semantic tags and button roles
aria-labelsrecommended for improved screen reader support
- Add dark/light theme toggle
- Animate sidebar transitions
- Persist chat history by user ID
- Add loading spinners for API calls
- Make menu items dynamic from config or API
Desktop and Mobile views with sidebar overlays and dropdown menus.
| View | Screenshot |
|---|---|
| Desktop Chat | ![]() |
| Mobile Sidebar | ![]() |
| Mobile Menu | ![]() |
MIT Β© \ Roopesh
If you need help integrating with a specific API or customizing behavior, feel free to reach out or open an issue. Dummy push


