Gatekeeper · by Hoverfly

Catch toxic messages
before anyone reads them.

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.

Get started View source

Free up to 10k monthly active devices · No API key · On Maven Central · Android, iOS, desktop, web

gatekeeper.check(message)
you are a stupid idiotHidden · Insult
Flagged · Insultscore 0.99
Live demo

Try the real model, right here

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.

Loading the model (~4 MB)…
Sensitivity
Updates as you type
Why Gatekeeper

Moderation that fits in your app

No server, no API key, no per-message bill. A small Kotlin library that you can read, test and ship.

Made for Indian chat

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.

Few false alarms

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.

No dependencies

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.

Private & offline

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.

~1ms
Per message
Android emulator, once warm
~4MB
On-device
model + tokenizer
20+
Languages
native and romanised Indic
0
Dependencies
no native code
On device

Type a message, see the verdict

Real output from the sample app on an Android emulator. These are not mockups.

Gatekeeper says a friendly Hinglish message looks fine

Slang passes

"bhai tu toh kamaal hai 🔥" → Looks fine

Gatekeeper flags a Hinglish threat

Threat caught

"tujhe jaan se maar dunga" → Flagged · Threat

Gatekeeper flags an English insult

Insult caught

"you are a stupid idiot" → Flagged · Insult

Same library on every platform

The Kotlin Multiplatform sample app, built from the published artifacts, gives the same result on Android, iOS, desktop and the web.

Gatekeeper sample on Android

Android

you are a stupid idiot → Flagged · Insult 99%

Gatekeeper sample on iOS

iOS

you are a stupid idiot → Flagged · Insult 99%

Gatekeeper sample on Desktop (JVM)

Desktop (JVM)

you are a stupid idiot → Flagged · Insult 99%

Gatekeeper sample on Web (Wasm)

Web (Wasm)

you are a stupid idiot → Flagged · Insult 99%

Install

Add it to your build

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.

Maven Central live
// 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
Build with a prompt
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.
Usage

One call per message

Load once and reuse the instance. check() is thread-safe.

Kotlin
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()
Java
try (Gatekeeper gk = new Gatekeeper()) {
    Verdict v = gk.check("you are a stupid idiot");
    if (v.isToxic()) {
        // hide, blur, or ask to rephrase
    }
}
Use cases

Where Gatekeeper fits

Anywhere people write to each other, and before anything goes to a server.

Chat & community apps

Blur abusive incoming messages behind a "tap to show", or nudge the sender before they hit send.

"chup kar bsdk" → hidden

Comments & reviews

Hold toxic comments for review instead of publishing them, with no moderation API bill.

"what a piece of shit app" → review queue

Dating & social apps

Catch sexual harassment and threats in DMs before they reach the other person.

"send nudes" → Flagged · Sexual

Kids & education apps

Use Sensitivity.STRICT in class chats and student forums.

"tu pagal hai kya be" → Flagged

Games & live chat

Fast enough to check every message in a busy lobby on the player's own phone.

"gg noob uninstall" → fine

A first filter before the server

Cut what reaches your cloud moderation, and keep working offline.

98.8% of normal chat passes locally
App ideas

20 apps you could build with Gatekeeper

Real 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.

Quality

Honest numbers

Measured on held-out test sets and on hand-written chat messages. Every model gets its own tuned threshold.

GatekeeperMultilingual BERT toxicity classifier
Indian-language comments (hi, ta, te, ml, kn), F10.840.63
Same comments typed in Latin letters, F10.830.65
English comments, F10.630.50
15 world languages, F10.770.91
Hand-written chat messages, accuracy88%80%
Everyday chat not flagged98.8%85.1%
Hate-speech stress test (no slurs), accuracy45%61%
Size3.8 MB711 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.

Reference

API at a glance

MemberDescription
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.
CategoryINSULT, PROFANITY, THREAT, HATE, SEXUAL
SensitivitySTRICT (0.25) catches about 85% · BALANCED (0.42) · RELAXED (0.70) flags about 0.6% of normal chat
Pricing & license

Free until you're big.

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.

Commercial
Let's talk

For products above 10,000 monthly active devices on any platform.

  • One license per product, per model
  • Pricing that fits your scale
  • Direct support from the people who built it
  • Early access to model updates
Custom models
Built for you

A small, fast on-device model trained for your language, domain or task.

  • Moderation, classification, detection, replies and more
  • Tuned on your use case and your users' languages
  • Shipped as a plain Kotlin library, like Gatekeeper
  • Private: your model runs on your users' devices

How devices are counted

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.

What the license does not allow

  • Selling or redistributing Gatekeeper or its model on its own, or inside another SDK
  • Extracting, modifying or fine-tuning the model weights
  • Using the model or its outputs to train or distill another model
  • Reverse engineering the model or its file format
  • Offering it as a hosted API for others

Questions about licensing? Email raju348636@gmail.com or call / WhatsApp +91 63533 21951. Full terms: Hoverfly Community License.

FAQ

Questions

What is Gatekeeper?

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.

Which languages does it support?

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.

Which sensitivity should I use?

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.

Does it run on device?

Yes. Inference runs entirely on the device in plain Kotlin. It makes no server calls, needs no network permission and sends no telemetry.

Where does it fall short?

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.

Is the Kotlin port exact?

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.

How much does Gatekeeper cost?

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.

What happens when my app passes 10,000 monthly active devices?

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.

Can you build a model for my app?

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.

A note from the creator

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.

Raju ShingadiyaAndroid developer · creator of Hoverfly
Meet the maker
The Hoverfly family

Gatekeeper is one of eight.

Eight small on-device models, one job each. Same install, same free tier, and the same promise: nothing leaves the device.

MojiEmoji suggestionsThe right emoji for any message, in 22 languages. BeaconLanguage detectionLanguage and script of any text, Hinglish included. CommaPunctuationTurns voice-typed text into readable sentences. ComebackSmart repliesThree tap-to-send replies for every message. EmotionEmotion detection28 emotions and an overall mood, per message.
GatekeeperToxicity detectionCatches abuse and threats in Indian chat.You're here
HideoutPersonal info hidingHides phones, UPI, Aadhaar and more. ChalkDoodle recognitionGuesses 345 things from pen strokes, live.
View all models Hoverfly home