GradGear is a comprehensive web application that helps university students and staff discover, browse, and book various campus resources - from study spaces to technical equipment.
GradGear serves as a centralized platform for accessing various university resources, solving the common problem of scattered information about available equipment and spaces. The application features an intelligent AI assistant that helps users find exactly what they need through natural language queries.
- Resource Discovery: Browse a comprehensive catalog of university resources
- Intelligent Search: Find resources using natural language queries
- Booking System: Reserve resources directly through the platform
- AI Assistant: Get personalized recommendations through conversation
- Category Navigation: Browse resources by type (spaces, laptops, chargers, etc.)
- Frontend: React.js, Material UI
- Backend: Node.js, Express
- AI: Google Generative AI (Gemini)
- Data Storage: Local .data file
GradGear organizes resources into several categories:
- Spaces: Study rooms, meeting spaces, and classrooms
- Lockers: Power banks and storage options
- Chargers: Various device chargers (MagSafe, USB-C, Surface)
- Laptops: Computing devices (Windows, Mac, Surface)
- Accessories: Projectors, microscopes, and other equipment
- Cameras: Recording devices and photography equipment
- Vending Accessories: Smaller items like presenters and voice recorders
- GPU Computing: High-performance computing resources
The AI assistant helps users find resources through conversational interaction:
- Understands natural language queries
- Handles vague or indirect requests
- Provides personalized recommendations
- Shows relevant booking links
- Groups similar resources together in responses
- Node.js 14+ and npm
- Google AI API key for Gemini
- Clone the repository:
git clone https://github.com/yourusername/gradgear.git
cd gradgear/backend
- Install dependencies:
npm i
- Create a
.env
file with the following variables:
NODE_ENV=development
PORT=3500
CORS_ORIGIN=http://localhost:3000
IMAGES_PATH=assets/images
BASE_URL=http://localhost:3500
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your_email@gmail.com
SMTP_PASS=your_app_password_here
ADMIN_EMAIL=your_admin_email@gmail.com
GEMINI_API_KEY=your_gemini_api_key_here
- Start the backend server:
nodemon server.js
- Navigate to the frontend directory:
cd ../frontend
- Install dependencies:
npm i
- Create a
.env
file:
REACT_APP_API_URL=http://localhost:3500/api
- Start the frontend development server:
npm start
The AI chat system uses Google's Generative AI (Gemini) for semantic search and natural language understanding.
- Embedding Generation: Creates vector representations of resources and queries
- Semantic Search: Finds resources similar to user queries
- Intent Analysis: Identifies the user's needs from their query
- Response Generation: Creates helpful, formatted responses
- Resource Linking: Provides direct booking links
The system extracts meaningful information from each resource:
- Name and description
- Detailed features and use cases
- Associated tags (chips)
- Locations and availability
- Alternative names and synonyms
The AI system can understand:
- Direct queries ("I need a laptop")
- Vague requests ("My battery died")
- Category explorations ("Show me all cameras")
- Plurals and synonyms ("cams" → "cameras")
- Problem descriptions ("I need to record audio")
The AI chat system has been enhanced to:
- Handle vague and indirect queries better (e.g., "My laptop died" → suggest chargers)
- Recognize synonyms and variations (e.g., "cams", "cam", "camera", "cameras")
- Extract context from enhanced resource details
- Show all relevant options when asked about a category
- Provide elegant booking links in responses
- Group similar resources for better readability
GET /api/resources
: Get all resourcesGET /api/resources/:id
: Get a specific resourceGET /api/resources/category/:category
: Get resources by categoryPOST /api/resources
: Create a resource (admin only)PUT /api/resources/:id
: Update a resource (admin only)DELETE /api/resources/:id
: Delete a resource (admin only)
POST /api/chat
: Send a message to the AI assistant- Request body:
{ query: "user message here" }
- Response:
{ success: true, response: "AI response", relatedResources: [...] }
- Request body:
POST /api/auth/register
: Register a new userPOST /api/auth/login
: Login an existing userGET /api/auth/profile
: Get the current user's profile
GET /api/bookings
: Get user's bookingsPOST /api/bookings
: Create a new bookingDELETE /api/bookings/:id
: Cancel a booking
-
AI Service Not Responding:
- Check API key in environment variables
- Verify network connectivity to Google AI API
- Check request formatting
-
Resource Images Not Loading:
- Verify image paths in resource data
- Check BASE_URL configuration
- Ensure images exist in the correct directory
-
Chat Not Finding Resources:
- Check console logs for embedding initialization errors
- Verify that the .data file is accessible
- Try restarting the backend server
-
Email Notifications Not Sending:
- Verify SMTP settings in .env file
- Check console for SMTP connection errors
- Ensure the email templates exist
The application uses console logging for development purposes. Check your terminal for:
- Error messages
- AI chat processing logs
- Resource initialization logs
© 2025 GradGear Team. All rights reserved.