Textguard docs
v1.0.0
Get help
● Documentation · Flutter · Node.js

Textguard
from download to your own spam filter app.

Textguard is an Android and iOS app that checks a text message against written rules and shows which words and links gave it away. It uses no AI and sends no message anywhere. This guide takes you from the download to a branded build in the stores, step by step. Read it top to bottom the first time; after that, press / and search.

v1.0.0Flutter · Android · iOS 16+Optional Node.js 26 LTS serverOperator console

01What you bought

Textguard is a complete, white-label mobile app source code plus an optional small server. The user pastes, shares or selects a text. The app compares it with a pack of rules (keywords, patterns, sender rules and link rules), underlines the words that matched, numbers them and writes a plain note for each rule. The verdict is No red flags found, Suspicious or Looks like a scam; it never says a text is safe. On iPhone an offline Message Filter extension also sorts texts from unknown senders into Junk, Promotions and Transactions. The operator edits the rule packs, report contacts and lessons in a console without a new build, and can sell a Pro unlock through in-app purchases.

Read this first: two honest limits

Android cannot filter incoming SMS unless the app is the user's default SMS app, which Google Play allows only in narrow cases. The Android build therefore checks text the user shares, selects (Check with Textguard) or pastes, and asks for no SMS permission. The iOS filter only sees texts from unknown senders; iOS never shows it messages from saved contacts. Describe your app the same way in your store listing. See Android and iOS limits.

No AI

Textguard uses no AI, no model and no cloud service to judge a message. The same text always gives the same answer, and every flag points to a rule you can read and edit.

PartFolderWhat it is
Mobile appapp/Flutter project for Android and iOS. Works fully offline, with no server.
iOS filterapp/ios/TextguardFilter/Swift Message Filter extension with the same rule engine, offline.
Server (optional)server/Node.js backend with an operator console: edit rule packs, report contacts and lessons, the paywall limits, scoring thresholds, announcements and force update without a new build; optionally confirm purchases with the stores and expand short links.
Contractcontract/The API between app and server, the rule engine specification and the shared test vectors used by Dart, Swift and the server.
Result with flagged words underlined and numbered
Proof-sheet result · sample data

02Folder map

PathWhat is inside
app/lib/brand.dartApp name, tagline, accent colour, fonts, support/privacy/terms links, default store product ids, server address, App Group, channel name. The one file for rebranding.
app/lib/src/Dart code: core/ (rule engine, normalisation, link read-out, regex safety check, config), services/ (controller, purchases, config client, ping, link expander client), ui/screens/ (Check, Result, Learn, Report, Settings, Filter guide, Paywall, Onboarding, Update).
app/android/Android project and the small Kotlin MainActivity.kt that receives shared and selected text.
app/ios/iOS project, PrivacyInfo.xcprivacy, the Swift app delegate and TextguardFilter/, the Message Filter extension.
app/assets/defaults/The bundled rule pack, report contacts and lessons: what the app uses with no server.
app/assets/fonts/Newsreader and Atkinson Hyperlegible Next fonts with their licence texts.
app/tool/make_icon.py (icon), check_swift_engine.sh (runs the shared vectors against the Swift engine), sync_defaults.sh.
app/test/Automated tests, including the shared engine vectors.
server/src/TypeScript server: app.ts (routes), content.ts (rules, contacts, lessons), regex-safety.ts, expander.ts, purchases/, admin/manifest.ts (what the console shows).
server/seed/The starter rule pack (46 rules), 9 report offices and 6 lessons, as JSON.
server/packages/admin-kit/The operator console (MIKODES Admin Kit), licensed with this item.
server/.env.example, server/DockerfileEvery server setting with comments; container build.

03How it fits together

The app works alone. The server is optional: the app asks it for settings and rules, can report an opt-in count, can send a purchase proof for checking and, only if you switch it on, ask it where a short link ends. Arrows point from the part that calls to the part that answers.

Textguard architecture The phone app runs the rule engine on the device and keeps only a verdict and date in history. The iOS Message Filter extension reads the rule pack the app hands over through an App Group. The app calls three routes on the optional Node server: GET /v1/config, POST /v1/ping and POST /v1/purchases/verify, and an optional POST /v1/expand. The operator console at /admin edits the rule packs, contacts, lessons and settings. The server calls the Apple App Store Server API and the Google Play Developer API to verify purchases if switched on. Phone app (Android, iOS) Rule engine, proof-sheet result, iOS filter. Works fully offline. app/lib/ ios/TextguardFilter/ Apple and Google stores In-app purchase: lifetime, yearly, restore (in_app_purchase). buy, restore Your server (optional) server/src/ Node.js, Hono GET /v1/config (rules, contacts) POST /v1/ping (opt-in) POST /v1/purchases/verify SQLite files in data/DATABASE_PATH Operator console Browser, /admin. Sign-in with two-factor. Rule packs, lessons, paywall, scoring. edits settings AppleApp Store Server API GooglePlay Developer API Link target (optional)expander follows redirects Message text never leaves the phone. Only the opt-in usage ping, optional purchase checks and the optional link expander reach your server.
Architecture: app, optional server, console and store APIs

04Quick start (about 20 minutes)

Windows users

Flutter runs natively on Windows: use PowerShell for the flutter commands and Android builds (iOS builds need a Mac). For the server, either install Node.js 22.12+ for Windows and use PowerShell (replace cp .env.example .env with Copy-Item .env.example .env; there is no openssl by default, so use WSL or any random 64-character hex string), or run the commands in WSL 2 (Ubuntu) or Docker. macOS and Linux users can ignore this note.

  1. Install Flutter 3.41 or newer (see Requirements) and run flutter doctor until it shows no red items for the platform you want.
  2. Run the app. In a terminal:
    cd app
    flutter pub get
    flutter test
    flutter run
    Connect an Android phone with USB debugging on, or start an iOS simulator.
  3. Run the server (optional).
    cd server
    cp .env.example .env
    openssl rand -hex 32        # paste the result after ADMIN_SECRET_KEY= in .env
    npm ci
    npm run build
    npm start
    Open http://localhost:8787/admin and follow First sign-in.
  4. Rebrand. Follow Rename and rebrand: name, package id, bundle ids, App Group, icon, colours.
  5. Make the rules yours. Rule packs explains how to edit and test them.
  6. Create the store products and put their ids in the app or the console: Store products.
  7. Build and publish: Release builds and signing.
Demo console

A read-only demo of the operator console: Email: demo@textguard.demo · Password: textguard-demo-2026 (read-only demo account)

05AI tools

AI tools were used to assist with parts of the code, documentation and graphics of this item. The finished product contains no AI features and calls no AI service.