The React frontend is 100% complete with a built-in Test Mode on the login page that allows you to quickly access and test all three user roles and their respective pages without needing actual credentials or backend authentication.
Navigate to: http://localhost:3003/login (or port 3000/3001/3002)
You'll see three TEST MODE buttons at the bottom of the login card:
What it does:
- Logs in as an admin user
- Sets up admin session in localStorage
- Redirects to Admin Dashboard
- Gives full access to all admin features
What you can test:
- Documents management (upload, view, delete)
- Analytics dashboard (charts, KPIs, metrics)
- User management (create, enable/disable, delete users)
- Rate limiting configuration
- System health monitoring
- Admin sidebar navigation
- Admin navbar with user dropdown and theme toggle
localStorage State:
{
astrobot_user: { id: '1', username: 'admin', role: 'admin', fullName: 'Admin User' },
token: 'test-token'
}What it does:
- Logs in as a student user
- Sets up student session in localStorage
- Redirects to Chat Interface
- Access to chat features as a student
What you can test:
- Chat interface with AstroBot
- Sending and receiving messages
- Message history in sidebar
- Conversation persistence
- Quick suggestion boxes
- Voice recording button (UI only)
- User profile display
- Logout functionality
localStorage State:
{
astrobot_user: { id: '2', username: 'student', role: 'student', fullName: 'Student User' },
token: 'test-token'
}What it does:
- Logs in as a faculty user
- Sets up faculty session in localStorage
- Redirects to Chat Interface
- Access to chat features as a faculty member
What you can test:
- Same features as Student role
- Faculty profile display
- Faculty-specific permissions (when implemented)
localStorage State:
{
astrobot_user: { id: '3', username: 'faculty', role: 'faculty', fullName: 'Faculty User' },
token: 'test-token'
}Main Features:
- ✅ Document upload (multi-format: PDF, DOCX, XLSX, CSV, PPTX, HTML, TXT)
- ✅ Document list with search/filter
- ✅ Document deletion
- ✅ Knowledge base statistics
- ✅ AdminNavbar with user dropdown
- ✅ AdminSidebar with navigation menu
- ✅ Theme toggle (light/dark mode)
- ✅ Logout button
Sub-pages to navigate to:
-
📊 Analytics (
/admin/analytics)- KPI cards: Total Queries, Active Users, Documents, Avg Latency
- Query trends chart (line chart)
- User distribution pie chart
- API latency bar chart
- Popular questions list
-
👥 Users (
/admin/users)- User list with details
- Create new user form
- Enable/disable users
- Delete users
- User role selection
-
⚡ Rate Limiting (
/admin/rate-limiting)- View rate limit configurations
- Edit rate limits per endpoint
- Toggle rate limiting on/off
- Reset rate limits
-
⚙️ Settings (
/admin/settings)- General system settings
- Provider configuration
-
📈 Memory (
/admin/memory)- Conversation memory statistics
- Memory usage overview
-
🏥 Health (
/admin/health)- System health status
- Component availability
Main Features:
- ✅ Welcome message from AstroBot
- ✅ Message input textarea (max 500 characters)
- ✅ Send button (with loading state)
- ✅ Voice recording button (UI ready)
- ✅ Quick suggestions dropdown
- ✅ Animated typing indicator
- ✅ Message history display
- ✅ User messages (right-aligned, purple bubbles)
- ✅ Bot messages (left-aligned, with sources dropdown)
- ✅ Copy message button
- ✅ Feedback buttons (👍 / 👎 )
- ✅ Conversation sidebar (left panel)
- ✅ New conversation button
- ✅ Search conversations
- ✅ Responsive design (mobile/desktop)
Interactions to Test:
- Type a message and send (Note: API integration requires Spring Boot backend)
- Click on suggestions
- Toggle sidebar on mobile
- Use voice button (UI only - backend implementation needed)
- Click copy on bot messages
- Submit feedback (thumbs up/down)
- View message timestamps
Features:
- ✅ Logo and branding section
- ✅ Sign In tab
- ✅ Create Account tab
- ✅ Form validation (Zod + React Hook Form)
- ✅ Remember me checkbox
- ✅ Forgot password link
- ✅ Terms & Privacy footer
- ✅ Responsive design
- ✅ TEST MODE buttons (3 quick access buttons)
- ✅ Beautiful gradient background
- ✅ Smooth animations (Framer Motion)
- All colors are consistent (Purple #7C3AED for primary, Teal #14B8A6 for secondary)
- All text is readable and properly aligned
- All buttons have hover states
- Animations are smooth (Framer Motion)
- No console errors (open DevTools: F12)
- Responsive on mobile (375px), tablet (768px), desktop (1280px)
- All icons render correctly (Lucide React icons)
- Test Admin → Admin Dashboard loads
- Test Student → Chat page loads
- Test Faculty → Chat page loads
- Admin sidebar navigation works
- Can switch between admin sub-pages
- Logout redirects to login page
- Back button navigation works
- Login form validation (required fields)
- Password field is masked (dots showing)
- Tab switcher works (Sign In ↔ Create Account)
- Form errors display properly
- Loading states show on buttons
- AdminNavbar displays user info correctly
- AdminSidebar shows active nav item
- Chat sidebar shows conversation history
- Message bubbles animate in smoothly
- Typing indicator animates
- All badges render with correct colors
- Modals (if any) open/close properly
- Dropdowns open/close correctly
- Light mode is default
- Dark mode toggle works (Admin navbar)
- Colors adapt to theme
- Text remains readable in both themes
Desktop (1280px+):
- Two-column layout on login page
- Admin sidebar always visible
- Chat sidebar always visible
- All content visible without scrolling (where possible)
Tablet (768px - 1279px):
- Responsive grid adjusts
- Sidebar collapses/toggles
- Touch targets are adequate (44px minimum)
Mobile (375px - 767px):
- Single column layout
- Hamburger menu works
- Touch interactions work
- No horizontal scroll
- Buttons are easily tappable
Solution:
- Clear browser cache: DevTools → Application → Clear Storage
- Hard refresh: Ctrl+Shift+R (Windows) or Cmd+Shift+R (Mac)
- Check console for errors: F12 → Console tab
Solution:
- Check if private/incognito mode is enabled
- Check browser localStorage settings
- Clear cookies and site data
Solution:
- Verify Tailwind CSS is loaded (Network tab in DevTools)
- Check for CSS console errors
- Try different browser
Solution:
- Make sure you clicked "Test Admin" button
- Check localStorage: DevTools → Application → Local Storage → astrobot_user
- Verify role is set to "admin"
Current Status: Frontend is 100% complete and ready for backend integration
What needs Spring Boot + FastAPI:
- ❌ Login endpoint (
/api/auth/login) - ❌ Register endpoint (
/api/auth/register) - ❌ Chat endpoint (
/api/chat) - ❌ Document upload/management
- ❌ User management API
- ❌ Analytics data
- ❌ Voice transcription
How to enable real login:
- Start Spring Boot backend on port 8080
- Start FastAPI backend on port 8001
- Change test mode to real login
- Form submission will call actual API endpoints
Use this to generate metrics for PPT comparison using local embeddings + Groq as the LLM judge.
NVIDIA_API_KEYset in your environment- Optional:
NVIDIA_MODEL(default:meta/llama-3.3-70b-instruct) - Optional:
NVIDIA_BASE_URL(default:https://integrate.api.nvidia.com/v1) - Optional:
NVIDIA_TEMPERATURE(default:0.2) - If embeddings are not cached locally, allow model download once:
- PowerShell:
setx HF_HUB_OFFLINE 0
- PowerShell:
# Set NVIDIA API key for the evaluator
$env:NVIDIA_API_KEY = "your_nvidia_key"
# Hybrid retrieval run
python tests/ragas_eval.py --run-name hybrid --retrieval-mode hybrid --disable-memory
# Dense retrieval run
python tests/ragas_eval.py --run-name dense --retrieval-mode dense --disable-memoryThe script writes results to tests/ragas_outputs/:
ragas_<run>_<timestamp>_per_sample.csvragas_<run>_<timestamp>_summary.jsonragas_<run>_<timestamp>_dataset.json(questions, answers, contexts)
- Limit rows:
--max-rows 10 - Change top-k:
--top-k 5
Build Status: ✅ Production Build Ready
npm run build
# Output: dist/ folder (ready for deployment)Development Server:
npm run dev
# Runs on http://localhost:3003Key Files:
src/pages/LoginPage.jsx- Test mode buttons are heresrc/pages/ChatPage.jsx- Chat interfacesrc/components/admin/- Admin dashboard componentstailwind.config.js- Design system colorssrc/styles/globals.css- Global styles
- Test Mode is Development-Only: Remove test buttons before production (line 144-194 in LoginPage.jsx)
- localStorage Keys: Always use
astrobot_userfor consistency - API Proxy: Vite is configured to proxy
/apirequests tohttp://localhost:8080(Spring Boot) - No Actual Chat API: Messages aren't actually sent to backend in test mode
- Theme Persistence: Theme preference is saved in localStorage
Before marking the frontend as production-ready:
- All pages load without errors
- Test buttons work (Admin, Student, Faculty)
- Chat interface displays correctly
- Admin dashboard displays correctly
- No console errors or warnings
- Responsive design works on all devices
- Animations are smooth
- Colors match design system
- All text is readable
- Buttons have proper hover/active states
- Forms validate correctly
- localStorage is working
- Logout clears session
- Navigation between pages works
Last Updated: April 9, 2026
Frontend Version: 2.0.0 (UI Redesign Complete)
Status: ✅ 100% Complete - Ready for Backend Integration