< 1.2s
Gemini API ResponseOptimized prompt payload with zero temperature for clinical accuracy
Optimized prompt payload with zero temperature for clinical accuracy
Granular symptom, pathology, and therapy popups across 6 conditions
Strict lexical whitelist rejecting out-of-scope health queries
Unified ecosystem: Clinical Education · Dietetics · Active Fitness
Pure vanilla web execution without runtime framework overhead
Client-side request lock preventing API quota exhaustion
Access to structured preventive healthcare education and reliable medical guidance remains a significant barrier for many everyday internet users. Too often, individuals either self-diagnose through scattered, unverified web articles or hesitate to consult medical experts due to logistical hurdles. FitSmart was built to solve this challenge by uniting four essential pillars under one lightweight, frictionless digital roof: comprehensive disease prevention, evidence-based nutrition science, athletic conditioning routines, and a direct AI-powered virtual medical consultant.
Core Mandate: Create an accessible, zero-compilation web platform that delivers actionable lifestyle medicine guidelines and real-time AI triage without intimidating users with medical jargon.
Explore the key portals of FitSmart — uniting real-time AI doctor triage, evidence-based clinical pathology breakdowns, functional superfood dietetics, and athletic conditioning.
Official launch flyer and comprehensive interface showcase for FitSmart — an all-in-one AI-driven preventive healthcare and athletic wellness platform.
FitSmart bridges the gap between complex medical literature and everyday lifestyle choices through an accessible, highly structured client architecture.
Direct REST integration with Google Gemini Pro API featuring deterministic temperature parameters, animated thinking states, and error fallback handling.
24 modular interactive popups detailing etiology, diagnostic symptoms, clinical treatments, and lifestyle prevention for 6 critical diseases.
Comprehensive dietary guidelines indexing 16+ nutrient profiles from cruciferous greens to antioxidant superfoods and cardiovascular omega-3 proteins.
Dynamic activity guides detailing sports conditioning (Basketball, Soccer, Badminton) and calisthenics routines with zero external runtime dependencies.
Each module is engineered with robust transactional boundaries, modular isolation, and comprehensive audit trails.
Interactive floating drawer assistant delivering real-time health consultations powered by Google's Gemini Pro generative LLM (v1/models/gemini-pro:generateContent).
From user symptom inquiry to actionable preventive recommendations — each consultation passes through strict client-side domain verification and deterministic LLM inference.
User submits a health inquiry via the floating consultation drawer. The client filter checks the prompt against the 11-keyword clinical whitelist and verifies the 3000ms cooldown lock.
The query is transmitted over HTTPS to Google's Gemini Pro REST API with temperature set to 0.0. The engine generates structured, non-hallucinatory preventive recommendations and lifestyle tips.
The generated response is injected into the chat stream via sanitized textContent nodes. For critical symptoms, users are advised to seek in-person professional medical evaluation.
FitSmart functions strictly as an educational and preventive wellness resource. The platform combines deterministic AI system instructions, keyword whitelist filtering, and explicit medical disclaimers to ensure algorithmic advice is never treated as a replacement for emergency clinical diagnosis.
Engineered with a clean separation between semantic HTML5 views, modular CSS styling sheets, a centralized vanilla JavaScript controller, and Google's Generative AI REST endpoint.
Multi-page semantic layout comprising 6 specialized portals (index, penyakit, konsumsi, aktifitas, login, register) with responsive Flexbox/Grid structures.
Centralized script.js managing 24 modal popup states, mobile hamburger drawer toggling, chat lifecycle rendering, and smooth scroll anchors.
Keyword whitelist verification across 11 health terms coupled with a 3000ms asynchronous mutex lock (isRequestInProgress) to prevent API spam.
Asynchronous fetch pipeline communicating directly with generativelanguage.googleapis.com, configured with zero temperature and 8,192 max output tokens.
Locally served SVG vectors, disease iconography, and embedded brand typography ensuring instant zero-latency visual rendering.
A modern engineering stack combining high-throughput user interfaces, modular backend architecture, and resilient data layers.
Clear boundary separation between system components, paired with modular schemas and structured repositories.
Defines pathological entities with title, classification (Metabolic, Cardiovascular, Infectious, Gastrointestinal, Respiratory), symptoms, clinical therapies, and preventive lifestyle habits.
Stores food classifications, macronutrient breakdowns (protein, carbs, healthy fats), micronutrients (vitamins, sulforaphane, omega-3), and recommended dietary portions.
Represents athletic regimens categorized by discipline (Basketball, Football, Badminton, Calisthenics), target muscle groups, intensity levels, and injury prevention notes.
Manages transient user consultation state: sanitized query, domain validity check, Google Gemini Pro response payload, and rate-limiting timestamp.
Multi-layered client-side security architecture combining lexical domain whitelisting, rate-limiting cooldown timers, and sanitized DOM injection.
Restricts all AI prompt submissions to 11 explicit Indonesian health terminology keywords, immediately rejecting irrelevant, malicious, or jailbreak prompts.
State-variable lock (isRequestInProgress = true) prevents multiple rapid-fire requests from triggering Google API rate-limit errors or quota exhaustion.
AI model responses are injected strictly via messageElement.textContent, mitigating Cross-Site Scripting (XSS) risks from untrusted generative tokens.
All client-to-API communication flows across TLS 1.3 encrypted HTTPS channels directly to Google Generative Language endpoints.
How critical technical bottlenecks were overcome and verified under real production conditions.
Enforcing strict medical topic boundaries in a client-side environment without backend proxies. Solved by designing an efficient substring keyword validator that screens incoming prompts across clinical terms ('sehat', 'dokter', 'penyakit', 'nutrisi', 'olahraga'), immediately routing out-of-scope queries to a polite guidance fallback.
Managing 24 independent diagnostic modal dialogs across 6 distinct disease categories without introducing UI state clutter. Engineered independent show/hide controller functions with backdrop overlay coordination, allowing users to inspect deep symptom profiles without page reloads.
Balancing real-time AI responsiveness with rate-limit protection. Implemented an asynchronous mutex flag (isRequestInProgress) and automated cooldown timers to ensure clean, non-overlapping API transactions.