ContextAI ⚡
ContextAI is an AI messaging assistant that lets you translate, fact-check, and decode slang in real-time, right inside your chat interface for smarter, boundary-free communication.
🚀 Key Features
- ⚡ Direct message actions: Single-click any message to instantly Translate (Hindi, Hinglish, Marathi, Spanish, French, German, English), Fact-Check claims, or request an Explanation.
- 🔍 Slang Decoder: Decodes Gen-Z and internet slang on the fly, displaying meaning, cultural context, and intensity levels.
- 🖱️ Smart selection toolbar: Highlight any text inside a message to trigger on-demand translation or definition popups.
- 🤖 Writing assistant: Refines draft messages before sending (options to fix grammar, translate, shorten, or switch to a formal tone).
🛠️ Tech Stack & Flow
┌────────────────────────────────────────────────────────┐
│ FRONTEND │
│ [JSP / HTML5] ──► [CSS Glassmorphism] ──► [JS] │
└───────────────────────────┬────────────────────────────┘
│ (JSON Fetch API)
▼
┌────────────────────────────────────────────────────────┐
│ BACKEND │
│ [Java Servlets (Jakarta EE)] ◄──► [GeminiUtil API] │
└───────────────────────────┬────────────────────────────┘
│ (Secure Env Creds)
▼
┌────────────────────────────────────────────────────────┐
│ AI ENGINE │
│ [Google Gemini 2.5 Flash] │
└────────────────────────────────────────────────────────┘
- Backend: Java (Jakarta EE Servlets) for request routing and backend logic.
- Frontend: Vanilla JSP, interactive JavaScript, and modern glassmorphism CSS.
- AI Engine: Google Gemini API (
gemini-2.5-flashmodel) for fast, context-aware responses. - Security: API credentials loaded securely using environment variables link ---
🚧 Challenges & Learning
- Structured Outputs: Prompted Gemini to return strict JSON for the Slang Decoder and built client-side sanitizers.
- Natural Hinglish: Optimized prompt guidelines to make translation outputs sound conversationally natural instead of literal.
- File Locks: Resolved OS-level file locks on Windows during compilation by optimizing the build-and-run pipeline.
🔮 What's Next
Currently ContextAI grammar improvement, formal rewriting, translation, explanation aur fact-checking provide karta hai. Future me hum context-aware reply suggestions, meeting aur chat summarization, smart action recommendations, voice-based assistance aur multi-platform integration par kaam karna chahte hain. Humara vision sirf AI-powered messaging nahi hai, balki aisi communication create karna hai jahan AI har conversation ko more clear, productive aur intelligent bana sake.
Built With
- css
- geminiapi
- java
- javascript
- jsp
- maven
- servlet
Log in or sign up for Devpost to join the conversation.