An AI-powered chatbot for answering questions about Rajshahi University of Engineering & Technology (RUET) in real-time using Google Gemini LLM.
- Overview
- Features
- Technology Stack
- Project Structure
- Installation
- Configuration
- Usage
- API Documentation
- Screenshots
- Contributing
- License
The RUET Intelligent FAQ Assistant is a comprehensive web application designed to provide instant, accurate answers about Rajshahi University of Engineering & Technology. The system uses Google's Gemini AI to understand natural language queries and provide contextual responses about:
- 🎓 Academic programs and departments
- 📝 Admission procedures and requirements
- 🏛️ Campus facilities and services
- 📍 Location and transportation information
- 🔬 Research and innovation initiatives
- 📞 Contact information and important links
- Modern Academic UI: Professional, formal design with RUET branding
- Real-time Chat Interface: Smooth, responsive chat experience
- Quick Questions: Pre-defined questions for common queries
- Conversation History: Download chat transcripts
- Responsive Design: Works seamlessly on desktop, tablet, and mobile
- Accessibility: WCAG compliant with proper semantic HTML
- Dark Mode Ready: Easy to extend with dark theme support
- AI-Powered Responses: Google Gemini integration for intelligent answers
- Context-Aware: Maintains conversation history for better responses
- RESTful API: Clean, well-documented API endpoints
- CORS Support: Configured for cross-origin requests
- Error Handling: Comprehensive error handling and logging
- Scalable Architecture: Built with FastAPI for high performance
- HTML5: Semantic markup with SEO optimization
- CSS3: Modern styling with CSS variables and animations
- JavaScript (ES6+): Vanilla JS for interactivity
- Font Awesome: Icon library
- Google Fonts: Inter & Playfair Display
- Python 3.8+: Core programming language
- FastAPI: Modern web framework for building APIs
- Google Gemini AI: Large Language Model for Q&A
- Uvicorn: ASGI server
- Pydantic: Data validation
- HTTPX: Async HTTP client
- BeautifulSoup4: Web scraping (for future enhancements)
ruetweb/
├── front/ # Frontend application
│ ├── index.html # Main HTML file
│ ├── style.css # Stylesheet
│ └── script.js # JavaScript logic
│
├── back/ # Backend application
│ ├── main.py # FastAPI application
│ ├── requirements.txt # Python dependencies
│ ├── .gitignore # Git ignore file
│ └── README.md # This file
│
└── README.md # Project documentation
- Python 3.8 or higher
- pip (Python package manager)
- A modern web browser (Chrome, Firefox, Safari, Edge)
- Google Gemini API Key (Get one here)
cd c:\ruetweb# Navigate to backend directory
cd back
# Install Python dependencies
pip install -r requirements.txtOpen back/main.py and replace the placeholder API key:
GEMINI_API_KEY = "your-actual-gemini-api-key-here"Important: Replace "api-key-here" with your actual Google Gemini API key.
# From the back directory
python main.pyThe backend server will start at http://localhost:8000
Open front/index.html in your web browser, or use a local server:
# Option 1: Using Python's built-in server
cd front
python -m http.server 3000
# Option 2: Using Node.js http-server (if installed)
cd front
npx http-server -p 3000Then open http://localhost:3000 in your browser.
Edit back/main.py to customize:
# API Configuration
GEMINI_API_KEY = "your-api-key" # Your Gemini API key
# CORS Configuration
allow_origins=["*"] # In production, specify your frontend URLEdit front/script.js to customize:
// API Configuration
const API_BASE_URL = 'http://localhost:8000'; // Backend URL
const MAX_MESSAGE_LENGTH = 500; // Maximum message length-
Start the backend server:
cd back python main.py -
Open the frontend:
- Open
front/index.htmlin your browser, or - Use a local server as described in installation
- Open
-
Start chatting:
- Type your question in the input field
- Click "Send" or press Enter
- Use quick questions for common queries
- "What is RUET and when was it established?"
- "What are the admission requirements?"
- "Tell me about the Computer Science department"
- "How can I reach RUET from Dhaka?"
- "What facilities are available on campus?"
- "What is the vision and mission of RUET?"
http://localhost:8000
GET /api/healthResponse:
{
"status": "healthy",
"service": "RUET FAQ Assistant"
}POST /api/chatRequest Body:
{
"message": "What is RUET?",
"conversation_history": [
{
"role": "user",
"content": "Previous message",
"timestamp": "2026-01-04T14:00:00Z"
}
]
}Response:
{
"response": "RUET is the 2nd oldest prestigious public Engineering University...",
"sources": [
"https://www.ruet.ac.bd/",
"https://admission.ruet.ac.bd"
]
}POST /api/feedbackRequest Body:
{
"rating": 5,
"comment": "Very helpful!",
"conversation_id": "optional-id"
}Once the backend is running, visit:
- Swagger UI:
http://localhost:8000/docs - ReDoc:
http://localhost:8000/redoc
The application features a three-column layout:
- Left sidebar: Quick questions
- Center: Chat interface
- Right sidebar: Important links and information
Responsive design that adapts to smaller screens with a single-column layout.
Edit front/style.css CSS variables:
:root {
--primary-navy: #1a2332;
--primary-blue: #2c5282;
--accent-blue: #3182ce;
/* Add your custom colors */
}Edit front/index.html:
<button class="quick-question-btn" data-question="Your question here">
<i class="fas fa-question-circle"></i>
<span>Button Label</span>
</button>Edit back/main.py to add more information to RUET_CONTEXT.
- Real-time web scraping for latest RUET updates
- Multi-language support (Bengali + English)
- Voice input/output capabilities
- User authentication and personalized responses
- Analytics dashboard for common queries
- Integration with RUET's official API (if available)
- Progressive Web App (PWA) support
- Dark mode toggle
- Chat export in multiple formats (PDF, JSON)
- Rajshahi University of Engineering & Technology (RUET)
- Google Gemini AI Team
- FastAPI Framework
- The open-source community
Powered by Avijit0001 🤖