Skip to content

malbers/genztranslator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SLANG TRANSLATOR

A free, single-page web app that translates between plain English and current Gen-Z slang — and back. Paste in what your kid texted you, hit Translate, get something you can actually reply with. Or write something normal and get the Gen-Z version to send. One button, auto-copies to clipboard.

Built in a few hours with Claude Code, OpenAI, Netlify.

Stack

  • Vanilla JS + Tailwind CDN (no build step)
  • Netlify Function (Node 20) — one endpoint: POST /api/translate
  • Netlify Blobs — IP-based rate limiting, 20 req/IP/day
  • OpenAI gpt-4o-mini — fast + cheap for slang translation

Cost

~$0.0001 per translation. 20 req/IP/day cap. Worst-case ~$3/day at 1,000 active users.

Setup (forking)

  1. Clone the repo
  2. npm install
  3. Connect the repo to a new Netlify site (Netlify UI → "Add new site" → "Import from GitHub")
  4. In Netlify site settings → Environment variables, add:
    • OPENAI_API_KEY — your OpenAI API key
  5. Netlify deploys automatically from main. That's it.

No build command needed. The function bundler handles netlify/functions/translate.js automatically.

Local dev

npm install -g netlify-cli
netlify dev

Set OPENAI_API_KEY in a .env file at the repo root (gitignored). Netlify Blobs works locally via the CLI dev server.

License

MIT

About

GenzTranslator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors