Swastik725/PolyLingo
Project Overview
PolyLingo
A web-based translator that uses Google Gemini to return translations plus meaning, pronunciation, and example sentences.
True Intent (AI Assessment)
A personal/portfolio project that wraps the Gemini API in a polished translation UI with contextual language-learning output.
README Accuracy
Notes
README claims match the code. The frontend was clearly generated from Figma Make (leftover markers and package name), which the README does not disclose. Backend has no error handling on Gemini responses and no auth/rate limiting, but nothing malicious.
PolyLingo is a full-stack web application consisting of a React/TypeScript frontend and a FastAPI Python backend. The backend exposes a single `/translate` endpoint that forwards user text to Google's Gemini 2.5 Flash model with a structured prompt, then parses the JSON response into translation, meaning, pronunciation, and example fields.
The problem it addresses is the limitation of plain text-to-text translators. Traditional tools like Google Translate give a literal translation but rarely explain context, pronunciation, or usage. PolyLingo tries to bundle those learning-oriented artifacts into a single API call, marketing itself as a translation-plus-comprehension tool.
The intended users are language learners and casual translators who want more than a one-word output. The UX flow is straightforward: a landing page with animated hero, a translation panel with source/target language selectors, a history panel backed by localStorage (capped at 50 entries), and a settings panel for theme and animation preferences.
Under the hood, the frontend is a Vite + React 18 app using Radix UI primitives, Tailwind CSS v4, Motion for animations, and shadcn-style components. The backend is minimal: FastAPI with CORS locked to localhost:5173, one Pydantic model, one route, and a service module that calls `google.generativeai` and strips markdown code fences from the response before parsing JSON.
Notable observations: the frontend package.json is named `@figma/my-make-file` and vite.config.ts contains a `figmaAssetResolver` plugin plus a `MARKER-MAKE-KIT-INVOKED` comment in App.tsx, indicating the UI was scaffolded via Figma Make. The backend JSON parsing is naive (a single `json.loads` with no error handling), and there is no test suite, no license file, and no rate limiting on the API endpoint.
| Languages | TypeScript, Python, CSS, HTML |
| Runtime | Node.js (Vite) + Python 3 |
| Framework | React 18 (frontend), FastAPI (backend) |
| Database | None (localStorage for history) |
| Package Manager | pnpm/npm (frontend), pip (backend) |
| Key Dependencies | react, vite, motion, tailwindcss, radix-ui, fastapi, google-generativeai, pydantic |
| Build Tool | Vite |
| Test Framework | None detected |