Repository navigation
Version 1.0.0 - "Phoenix"
Release Notes: Version 1.0.0 - "Phoenix"
Date: 17/07/2025
Codename: Phoenix
This is the first stable version of AI Assistant for LMS hosted on Blogger, an intelligent Q&A system designed to integrate seamlessly into Blogger's TTKT posts. This version focuses on delivering a seamless, secure, and production-ready Q&A experience.
Key Features
-
Integrated AI Q&A based on context: The system uses Google Gemini to analyze the content of a specific article and answer students' questions based only on that context, ensuring accuracy and relevance to the lesson content.
-
Iframe Chat Interface: Provides a modern, responsive chat interface that can be easily embedded into Blogger through a simple JavaScript code. The interface is friendly to both desktop and mobile.
-
Dynamic Data Crawl: The API is capable of automatically crawling and extracting the main content of the article from the provided URL, removing redundant components such as navigation bars, sidebars, and footers.
-
Security based on Whitelist Domain: The core security mechanism is based on authenticating the URL of the article. Only domains pre-configured in
allowedDomainsare allowed to use the AI service, effectively preventing API abuse from unwanted websites. -
Health Check Endpoint: Provide the
/healthzendpoint for hosting services (such as Render) to monitor the application's health status, ensuring high availability.
Security and Stability Improvements (Improvements & Fixes)
-
FIXED -
Not allowed by CORS: Completely fix the CORS bug by changing the security strategy. Instead of relying on untrustedOrigin/Refererheaders, the system has switched to the "Open CORS, tighten URL validation" model, allowing iframes to be embedded anywhere but only handling requests with valid URLs. -
FIXED -
Unexpected token 'S', ... is not valid JSON: Standardize all API error responses to JSON format. Frontend logic is also enhanced to handle these errors smoothly and display friendly messages to users instead of causing crashes. -
IMPROVED - Rate Limiting: Implement a
rate limitingmechanism for API endpoints, helping to prevent denial of service (DoS) attacks and basic abuse. -
IMPROVED - Immunity Health Check: Separate the
/healthzendpoint from security middleware, ensuring that automated monitoring systems can accurately check application health without being blocked by CORS or other authentication mechanisms. -
IMPROVED - Content Caching: Add a simple server-side cache mechanism to store crawled post content, which helps reduce the number of requests to the blog page and speed up responses to repeated queries over a period of time.
-
IMPROVED - Project Structure: The source code is organized in a clear structure, separating
routes,services, andmiddleware, making maintenance and future expansion easier.
Deployment and Configuration Guide
-
Environment Variable Configuration: Create a
.envfile and provideGEMINI_API_KEY, or you can use 'Environment Varriable' in Render. -
Whitelist Configuration: Edit the
allowedDomainsarray in theconfig.jsfile to add the blog domains you want to support. -
Deployment: The application is ready to deploy on platforms like Render, Heroku via the
package.jsonfile. -
Integrate into Blogger: Use the provided
iframeembed code to add the AI chat button to your blog page.
Version 1.0.0 "Phoenix" lays a solid foundation for the development of future advanced features, such as full website crawling, support for more AI models, and deeper analysis of user interactions.