Check a chat message, comment or review for abuse, hate, threats and sexual harassment on the device itself (Android, iOS, desktop or the web), in about a millisecond. English, Hindi, Tamil, Telugu, Malayalam, Kannada, Hinglish and more, in a 4 MB library.
Free up to 10k monthly active devices · No API key · On Maven Central · Android, iOS, desktop, web
This is the actual Gatekeeper library, compiled to WebAssembly and running in your browser. Type a message, in English or Indian languages, and see whether it would be flagged. Your text never leaves this page.
No server, no API key, no per-message bill. A small Kotlin library that you can read, test and ship.
Understands native Hindi, Tamil, Telugu, Malayalam and Kannada, romanised Hinglish and Tanglish, and English, plus about 15 other languages. Catches misspellings like f*ck and chutiyaaa.
Normal chat passes: 98.8% of everyday messages are not flagged. Slang like "this movie killed me" or "bhai tu toh kamaal hai" stays clean.
Pure Kotlin inference. There is no ONNX Runtime, TFLite, ML Kit or native code, and it runs on Android (minSdk 21), iOS, macOS, JVM desktop, JavaScript and WebAssembly, from Kotlin or Java.
The model ships inside the library on every platform. It makes no network calls, needs no permissions and sends no telemetry, so messages never leave the phone.
Real output from the sample app on an Android emulator. These are not mockups.
"bhai tu toh kamaal hai 🔥" → Looks fine
"tujhe jaan se maar dunga" → Flagged · Threat
"you are a stupid idiot" → Flagged · Insult
The Kotlin Multiplatform sample app, built from the published artifacts, gives the same result on Android, iOS, desktop and the web.

you are a stupid idiot → Flagged · Insult 99%

you are a stupid idiot → Flagged · Insult 99%

you are a stupid idiot → Flagged · Insult 99%

you are a stupid idiot → Flagged · Insult 99%
One line in your Gradle file, from Maven Central. Works in commonMain for Android, iOS, macOS, JVM desktop, JavaScript and WebAssembly. No API key, no account.
// build.gradle.kts: commonMain, or any platform source set
dependencies {
implementation("io.github.rajumark:gatekeeper:2.0.0")
}
// Gradle picks the right artifact per platform:
// gatekeeper-android · gatekeeper-jvm · gatekeeper-iosarm64 · gatekeeper-iossimulatorarm64
// gatekeeper-macosarm64 · gatekeeper-js · gatekeeper-wasm-js
Add Gatekeeper from rajumark to this Kotlin Multiplatform or Android project.
What it does: on-device toxic message detection. Given a chat message, comment or review, it says whether it is toxic (abuse, hate, threats, sexual harassment), with category hints. English, Hindi, Tamil, Telugu, Malayalam, Kannada, Hinglish and more. ~4 MB, no dependencies, no network.
Install (Maven Central, no extra repository):
build.gradle.kts (commonMain or any source set): implementation("io.github.rajumark:gatekeeper:2.0.0")
Platforms: Android, iOS, macOS, JVM desktop, JavaScript, WebAssembly
Usage:
val gatekeeper = Gatekeeper() // off the main thread, keep one instance
if (gatekeeper.isToxic(message)) { /* hide it, ask to rephrase, or send to review */ }
Repo: https://github.com/rajumark/gatekeeper#readme
Add the dependency, then follow the README for the exact API and current version.
Load once and reuse the instance. check() is thread-safe.
val gatekeeper = Gatekeeper()
val v = gatekeeper.check("tujhe jaan se maar dunga")
v.isToxic // true
v.score // 0.98
v.topCategory // THREAT
gatekeeper.isToxic("bhai tu toh kamaal hai") // false
gatekeeper.check(text, Sensitivity.STRICT) // catch more
gatekeeper.close()
try (Gatekeeper gk = new Gatekeeper()) {
Verdict v = gk.check("you are a stupid idiot");
if (v.isToxic()) {
// hide, blur, or ask to rephrase
}
}
Anywhere people write to each other, and before anything goes to a server.
Blur abusive incoming messages behind a "tap to show", or nudge the sender before they hit send.
"chup kar bsdk" → hiddenHold toxic comments for review instead of publishing them, with no moderation API bill.
"what a piece of shit app" → review queueCatch sexual harassment and threats in DMs before they reach the other person.
"send nudes" → Flagged · SexualUse Sensitivity.STRICT in class chats and student forums.
"tu pagal hai kya be" → FlaggedFast enough to check every message in a busy lobby on the player's own phone.
"gg noob uninstall" → fineCut what reaches your cloud moderation, and keep working offline.
98.8% of normal chat passes locallyReal problems Gatekeeper solves today. Pick one and ship it.
Chat apps · Blur abusive incoming messages behind "tap to show".
Think-before-you-send · Nudge users with "Are you sure?" when their own message is toxic.
Comments & reviews · Hold toxic comments for review instead of publishing them instantly.
Dating DMs · Catch sexual harassment and threats before they reach the other person.
Kids & edtech apps · Keep class chats and doubt forums clean with strict mode.
Game lobby chat · Fast enough to check every message in a busy lobby, on the player's phone.
Live stream chat · Hide toxic messages in fast-moving live chat without server lag.
Cheaper cloud moderation · Filter on the device first and cut your moderation API bill.
Marketplace chat · Flag threatening or abusive buyers and sellers early.
Rider–driver chat · Spot threats and harassment between riders and drivers.
Community & society groups · Keep neighbourhood and housing-society groups civil.
Workplace messaging · Flag abusive messages in team chat before they escalate.
Username & bio checks · Block abusive usernames, bios and group names at sign-up.
Chatbot input guard · Detect abuse aimed at your bot and reply calmly or end the chat.
News app comments · Keep comment sections under news articles readable.
Voice room transcripts · Check speech-to-text transcripts of audio rooms for abuse.
Live Q&A & polls · Keep toxic questions off the screen at events and webinars.
Review platforms · Allow harsh 1-star reviews, but not slurs or threats.
Parental safety · Warn a child on their own phone when an incoming message is abusive.
Offline moderation · Keep moderating when the network drops or the server is down.
Measured on held-out test sets and on hand-written chat messages. Every model gets its own tuned threshold.
| Gatekeeper | Multilingual BERT toxicity classifier | |
|---|---|---|
| Indian-language comments (hi, ta, te, ml, kn), F1 | 0.84 | 0.63 |
| Same comments typed in Latin letters, F1 | 0.83 | 0.65 |
| English comments, F1 | 0.63 | 0.50 |
| 15 world languages, F1 | 0.77 | 0.91 |
| Hand-written chat messages, accuracy | 88% | 80% |
| Everyday chat not flagged | 98.8% | 85.1% |
| Hate-speech stress test (no slurs), accuracy | 45% | 61% |
| Size | 3.8 MB | 711 MB |
| Latency, one message, 1 CPU thread (laptop) | ~0.1–0.4 ms | ~16 ms |
Gatekeeper wins on Indian languages, English, everyday chat and size/speed by a wide margin. The multilingual BERT is better on its own 15-language benchmark and on subtle group hate without slurs ("X are vermin"), which is Gatekeeper's weakest area; pair it with a server check if that matters for your app. Category scores (insult, profanity, threat, hate, sexual) are most reliable for English; decide on isToxic / score.
| Member | Description |
|---|---|
Gatekeeper() | Loads the bundled model. Implements AutoCloseable. |
check(text, sensitivity = BALANCED) | Returns a Verdict. A blank message is never toxic. |
check(text, threshold) | Same, with your own threshold (0..1). |
isToxic(text, sensitivity) · score(text) | Shortcuts for the verdict and the raw score. |
Verdict(isToxic, score, categories) | Plus topCategory: the strongest category when toxic. |
Category | INSULT, PROFANITY, THREAT, HATE, SEXUAL |
Sensitivity | STRICT (0.25) catches about 85% · BALANCED (0.42) · RELAXED (0.70) flags about 0.6% of normal chat |
No API key, no sign-up, no license file. Add Gatekeeper to your project and ship. It stays free until your product passes 10,000 monthly active devices, and there's never a limit on how often each device runs it.
For indie developers, startups and growing apps, up to 10,000 monthly active devices.
For products above 10,000 monthly active devices on any platform.
A small, fast on-device model trained for your language, domain or task.
A monthly active device is a phone, tablet or other device that runs Gatekeeper at least once in a calendar month.
The 10,000 limit applies separately to each product, each platform (Android, iOS, web…) and each Hoverfly model. Crossed it? You have 30 days to get a commercial license.
Questions about licensing? Email raju348636@gmail.com or call / WhatsApp +91 63533 21951. Full terms: Hoverfly Community License.
A Kotlin Multiplatform library (Android, iOS, macOS, JVM desktop, JavaScript, WebAssembly) that reads a message and tells you whether it is toxic: abusive, offensive, hateful, threatening or sexual harassment.
Best on English, Hindi, Tamil, Telugu, Malayalam and Kannada, in native script or typed in Latin letters (Hinglish, Tanglish). It also works in about 15 other languages including Spanish, French, German, Russian, Arabic, Japanese and Chinese, less reliably. To detect the language first, use Beacon.
BALANCED for most apps. STRICT for kids' apps or when a person reviews what gets flagged. RELAXED when you hide messages automatically and want the fewest false alarms.
Yes. Inference runs entirely on the device in plain Kotlin. It makes no server calls, needs no network permission and sends no telemetry.
Subtle hate against a group without slurs, sarcasm, and some English idioms ("I hate mondays"). Treat it as a strong first filter, not a final judge.
Features and scores match the reference implementation on all 140 test vectors (max difference 5e-7), both on the JVM and on an Android device.
Nothing for products with up to 10,000 monthly active devices per platform, including commercial apps. There is no API key or account, and no limit on how often it runs. Above that, a commercial license is needed. See Pricing.
Nothing breaks: Gatekeeper keeps working and never checks in with a server. You have 30 days to get a commercial license. Email raju348636@gmail.com or call / WhatsApp +91 63533 21951.
Yes. Hoverfly trains custom on-device models for your language, domain or task and ships them as a small library like this one. Get in touch on the same email or number.
Built by a developer, for developers.
Every model here started as a problem I hit in my own apps. I made them small, private and free to start, so you can spend your time on the part your users will love.
Eight small on-device models, one job each. Same install, same free tier, and the same promise: nothing leaves the device.