CampusHive Frontend is a modern, responsive web application built with React and Vite that provides an intelligent AI-powered academic assistant platform. It features a sophisticated chatbot interface, comprehensive admin dashboard, and beautiful user experience designed for students, faculty, and administrators.
- Multi-Agent AI System: Advanced conversational AI with specialized agents for different academic domains
- Session Management: Persistent chat sessions with history and context preservation
- Real-time Communication: Instant responses with streaming capabilities
- Markdown Support: Rich text rendering with code blocks, tables, and formatting
- Quick Actions: Pre-defined action buttons for common academic queries
- System Monitoring: Real-time health monitoring and system statistics
- User Management: Comprehensive user administration and role management
- Vector Store Management: AI knowledge base administration and maintenance
- Exam Upload System: Bulk exam document processing and management
- System Information: Detailed system metrics and performance monitoring
- Responsive Design: Mobile-first approach with seamless cross-device experience
- Dark Theme: Beautiful dark mode with custom color schemes
- Interactive Components: Smooth animations and transitions using Framer Motion
- Accessibility: WCAG compliant with keyboard navigation and screen reader support
- Component Library: Custom UI components built with Radix UI and Tailwind CSS
- JWT Authentication: Secure token-based authentication system
- Role-Based Access Control: Different access levels for students, faculty, and admins
- Protected Routes: Secure navigation with authentication guards
- Session Management: Automatic token refresh and logout handling
- React 18.3.1 - Modern React with hooks and concurrent features
- Vite 5.4.2 - Lightning-fast build tool and development server
- React Router DOM 6.22.1 - Client-side routing and navigation
- Tailwind CSS 3.4.1 - Utility-first CSS framework
- Radix UI - Accessible, unstyled UI components
- Framer Motion 11.18.2 - Production-ready motion library
- Lucide React - Beautiful, customizable icons
- React Icons - Popular icon libraries
- React Hook Form 7.58.0 - Performant forms with easy validation
- Zod 3.25.64 - TypeScript-first schema validation
- @hookform/resolvers - Validation resolvers for React Hook Form
- React Markdown 10.1.0 - Markdown component for React
- Remark GFM - GitHub Flavored Markdown support
- ESLint - Code linting and quality assurance
- TypeScript - Static type checking
- PostCSS - CSS processing and optimization
- Autoprefixer - CSS vendor prefixing
- Node.js (v18 or higher)
- npm or yarn
- CampusHive Backend running on
http://localhost:8000
-
Clone the repository
git clone https://github.com/yourusername/campus-hive.git cd campus-hive/CampusHive-Frontend -
Install dependencies
npm install # or yarn install -
Set up environment variables
cp .env.example .env
Configure your environment variables:
VITE_API_BASE_URL=http://localhost:8000 VITE_APP_NAME=CampusHive
-
Start the development server
npm run dev # or yarn dev -
Open your browser Navigate to
http://localhost:5173to view the application.
CampusHive-Frontend/
βββ public/ # Static assets
βββ src/
β βββ assets/ # Images, icons, and static files
β βββ components/ # Reusable React components
β β βββ admin/ # Admin-specific components
β β βββ blocks/ # UI block components
β β βββ hooks/ # Custom React hooks
β β βββ ui/ # Base UI components
β βββ contexts/ # React context providers
β βββ lib/ # Utility libraries and API client
β βββ pages/ # Page components
β βββ utils/ # Helper functions
β βββ App.jsx # Main application component
β βββ main.jsx # Application entry point
βββ screenshots/ # Application screenshots
βββ docs/ # Documentation
βββ package.json # Dependencies and scripts
βββ tailwind.config.cjs # Tailwind CSS configuration
βββ vite.config.js # Vite configuration
βββ README.md # This file
# Development
npm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
npm run lint # Run ESLint
# Production
npm run build # Create optimized production buildCreate a .env file in the root directory:
# API Configuration
VITE_API_BASE_URL=http://localhost:8000
VITE_APP_NAME=CampusHive
VITE_APP_VERSION=1.0.0
# Feature Flags
VITE_ENABLE_ANALYTICS=false
VITE_ENABLE_DEBUG_MODE=falseThe project uses a custom Tailwind configuration with:
- Custom color palette
- Extended spacing and typography
- Animation utilities
- Component-specific styles
- Navbar - Responsive navigation with authentication
- Hero - Landing page hero section
- Chatbot - AI conversation interface
- AdminDashboard - Administrative control panel
- ProtectedRoute - Authentication guards
- UserManagement - User administration
- VectorStoresManagement - AI knowledge base management
- ExamUpload - Document processing system
- SystemInfo - System monitoring
- HealthMonitor - Real-time health checks
- Button - Customizable button component
- Card - Content container component
- Dialog - Modal and overlay components
- Input - Form input components
- Table - Data display component
- User Registration/Login - Secure authentication with JWT tokens
- Role-Based Access - Different interfaces for students, faculty, and admins
- Protected Routes - Automatic redirection for unauthorized access
- Session Management - Persistent login state with automatic refresh
The application is fully responsive with breakpoints:
- Mobile: < 768px
- Tablet: 768px - 1024px
- Desktop: > 1024px
npm run buildThis creates an optimized build in the dist/ directory.
# Install Vercel CLI
npm i -g vercel
# Deploy
vercel --prod# Build the project
npm run build
# Deploy dist/ folder to NetlifyWe welcome contributions! Please follow these steps:
- 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
- Follow the existing code style and conventions
- Write meaningful commit messages
- Add tests for new features
- Update documentation as needed
- Ensure all tests pass before submitting
Build Errors
# Clear node_modules and reinstall
rm -rf node_modules package-lock.json
npm installAPI Connection Issues
- Verify backend server is running on
http://localhost:8000 - Check environment variables in
.envfile - Ensure CORS is properly configured
Authentication Issues
- Clear browser storage and cookies
- Verify JWT token configuration
- Check user role permissions
This project is licensed under the MIT License - see the LICENSE file for details.
- React Team - For the amazing framework
- Vite Team - For the lightning-fast build tool
- Tailwind CSS - For the utility-first CSS framework
- Radix UI - For accessible component primitives
- Framer Motion - For smooth animations
- Email: support@campushive.com
- Documentation: docs.campushive.com
- Issues: GitHub Issues
Made with β€οΈ by the CampusHive Team
Β© 2025 CampusHive. All rights reserved.








