- HTML 49%
- TypeScript 44%
- JavaScript 5%
- CSS 2%
ManyTongues #
ManyTongues is a small web app for turning text into visual word clouds.
It has two main tools:
- Text Cloud: paste or type any text and the app sizes each word by how often it appears.
- Translator: enter a short phrase, translate it into many languages, and render those translations as a word cloud.
Both tools let you switch between the Experimental engine (wordcloud2.js, default) and Classic (react-wordcloud).
The app is built with TanStack Start, React, wordcloud2.js, and react-wordcloud.
What The App Does #
Text Cloud #
The text cloud page lets you:
- paste raw text into a text area
- optionally filter stopwords and custom exclude lists
- automatically count repeated words
- render the most common words as a word cloud (Experimental or Classic engine)
- customize the cloud with engine-specific style controls
- download the finished cloud as a PNG image
This is useful for quickly visualizing themes, repeated terms, or the dominant vocabulary in a block of text.
Translator #
The translator page lets you:
- choose a source language and enter a short phrase
- translate that phrase into many target languages
- show the original phrase and its translations together in a word cloud
- remove individual translations
- adjust each translation's weight so some languages appear larger or smaller in the cloud
- retry after a provider or rate-limit error when the server returns a recoverable failure
Translations are looked up in a Turso database first. If the phrase has already been translated before (for the same source language), the cached result is returned. If not, the app requests translations from external translation providers, stores the result, and then displays it.
Server-side rate limiting (per client IP, when DB_URL is set) protects translation APIs from abuse.
Routes #
/home page with links to all tools/text-cloudtext-to-word-cloud generator (engine switcher: Experimental / Classic)/translatephrase translator and multilingual word cloud (engine switcher: Experimental / Classic)
URL search params #
Search state for the cloud pages is serialized with Zipson (compressed JSON) plus URL-safe base64 in the query string, configured on the router in src/router.tsx. This keeps shareable URLs smaller than plain JSON.
Local Setup #
Install dependencies:
pnpm install
Start the app locally:
pnpm dev
Environment Variables #
The text cloud works without external services. The translator needs API keys and database configuration.
Create a .env file with:
DB_URL=
DB_AUTH_TOKEN=
GOOGLE_TRANSLATE_KEY=
MICROSOFT_TRANSLATE_KEY=
Notes:
DB_URLandDB_AUTH_TOKENare used for the Turso translation cache and for translator rate-limit counters.GOOGLE_TRANSLATE_KEYis the preferred variable for the Google Translate API key. The legacy nameGOOGLE_TRANSLSTEis still read as a fallback ifGOOGLE_TRANSLATE_KEYis unset.MICROSOFT_TRANSLATE_KEYis used as a fallback translation provider.
Optional (analytics) #
VITE_PUBLIC_POSTHOG_KEY=
VITE_PUBLIC_POSTHOG_HOST=https://us.i.posthog.com
Deploying to Vercel #
The app is configured for Vercel deployment with Nitro. To deploy:
- Push your repo to GitHub and import it in Vercel.
- Add the environment variables above in Project Settings → Environment Variables.
- Deploy. Vercel will auto-detect the Nitro/TanStack Start setup.
The nitro.config.ts sets the Vercel preset and proxies /ingest to PostHog for analytics.
Scripts #
pnpm dev
pnpm build
pnpm preview
pnpm test
pnpm typecheck
pnpm lint
pnpm format
pnpm check
pnpm db:generate
pnpm db:migrate
pnpm db:push
pnpm db:studio
Tech Stack #
TanStack Startfor the app frameworkTanStack Routerfor file-based routing (custom Zipson + base64 search serialization insrc/router.tsx)Reactfor UITailwind CSSfor stylingreact-wordcloud,d3-cloud, andwordcloud2.jsfor cloud layout/renderingDrizzle ORMwith@libsql/clientfor Turso persistenceVitestfor testsBiomefor linting and formatting