A Kotlin Multiplatform (KMP) application that analyzes text to determine the likelihood it was written by AI rather than a human.
- Multidimensional Analysis: Evaluates vocabulary, sentence structure, rhetorical patterns, and statistical properties
- Authentication: Google Sign-In with PASETO (Platform-Agnostic SEcurity TOkens) tokens across all platforms
- Real-time Stats: Live character and word count as you type
- Detailed Reports: Comprehensive breakdown of detection signals with evidence
- Cross-platform: Runs on Android, iOS, Desktop (macOS/Windows/Linux), and Web (WASM)
- Elegant UI: Editorial-inspired design with warm color palette
The analyzer looks for patterns commonly found in AI-generated text:
| Signal | Description |
|---|---|
| Sentence Uniformity | AI tends to produce uniform sentence lengths |
| Hedging Words | Excessive qualifiers like "generally", "typically" |
| Transition Phrases | Overuse of formal connectors like "Furthermore" |
| Vague Attributions | Citations without sources like "Studies show" |
| Passive Voice | Higher passive voice ratio than typical human writing |
| Vocabulary Diversity | Low unique word ratio suggests repetitive vocabulary |
| Formulaic Openings | Clichéd intros like "In today's world" |
| Conclusion Telegraphing | Explicit markers like "In conclusion" |
- JDK 17+
- Android Studio Hedgehog+ (for Android)
- Xcode 15+ (for iOS)
To enable Google Sign-In, you need to set up a Google Web Client ID.
- Go to the Google Cloud Console.
- Select your project (the same one used for Firebase).
- Navigate to APIs & Services > Credentials.
- If you haven't configured the OAuth consent screen, complete that first under the OAuth consent screen tab.
- Click + CREATE CREDENTIALS and select OAuth client ID.
- Choose Web application as the Application type.
- Name your client (e.g.,
AI Writing Detector Web). - Add Authorized JavaScript origins (e.g.,
http://localhost:8080for local web development). - Click Create and copy the Client ID.
Add the copied Client ID to your local.properties file in the project root:
GOOGLE_WEB_CLIENT_ID=your_google_web_client_id_here./gradlew :composeApp:assembleDebugOr open in Android Studio and run.
./gradlew :composeApp:run./gradlew :composeApp:wasmJsBrowserDevelopmentRunOpen iosApp/iosApp.xcodeproj in Xcode and run on a simulator or device.
The project follows Clean Architecture principles with a multi-layered structure:
├── data/ # Data layer (Repositories, DB, Auth)
│ ├── auth/ # Auth implementations (Google, Token Storage)
│ ├── db/ # SQLDelight database & platform drivers
│ └── repository/ # Repository implementations
├── domain/ # Business logic layer
│ ├── analyzer/ # Core analysis logic & pattern dictionaries
│ ├── auth/ # Auth interfaces & domain models
│ ├── model/ # Domain models (AnalysisResult, TextStats)
│ ├── usecase/ # Business logic & Interactors
│ └── util/ # Shared domain utilities (NumberFormat)
├── presentation/ # UI layer (Compose Multiplatform)
│ ├── components/ # Reusable UI components
│ ├── screen/ # UI screens (Login, Splash, Detector, etc.)
│ ├── theme/ # Design system (Colors, Typography)
│ └── viewmodel/ # MVI ViewModels
├── di/ # Koin dependency injection modules
└── App.kt # Main Compose entry point
- UI: Compose Multiplatform
- Architecture: MVI + Clean Architecture
- DI: Koin 4.0
- Navigation: Voyager
- Async: Kotlin Coroutines
The detector calculates a weighted score from 0.0 (definitely human) to 1.0 (definitely AI):
Final Score = Σ (weight × signal_score) / Σ weights
Each signal produces a score based on thresholds derived from linguistic research.
| Score Range | Verdict |
|---|---|
| 0.00 - 0.25 | Likely Human |
| 0.25 - 0.40 | Possibly Human |
| 0.40 - 0.60 | Inconclusive |
| 0.60 - 0.75 | Possibly AI |
| 0.75 - 1.00 | Likely AI |
This is an educational project demonstrating text analysis techniques. Important caveats:
- No detector is perfect: AI writing detection is fundamentally challenging
- False positives: Human academic/formal writing may trigger AI signals
- Model evolution: As LLMs improve, their writing becomes less detectable
- Context matters: Technical documentation naturally has different patterns than creative writing
Try testing the detector on famous texts that pre-date LLMs (before 2017) to see how challenging detection truly is!
MIT License - see LICENSE for details.
Contributions welcome! Please read CONTRIBUTING.md first.
Built with ❤️ using Kotlin Multiplatform








