Owner: Engineering Team | Last Updated: 2026-01-30 | Status: Current
This page defines core WWAI concepts, terminology, and their exact implementation in the codebase. Use this as a reference when reading other documentation pages or the source code.
The core product feature. Takes AI-generated text and rewrites it to appear human-written.
Controls the complexity/reading level of the output. 5 options available:
| ID | Value (API string) | Icon | Description |
|---|---|---|---|
| 2 | University |
🎓 | College/university level writing (default) |
| 1 | High School |
📚 | Simplified for high school level |
| 3 | Doctorate |
🧠 | Advanced academic/research level |
| 4 | Journalist |
📰 | Clear, journalistic style |
| 5 | Marketing |
📈 | Persuasive marketing copy style |
Free plan users can only use the first option (University). The value string is sent to the API in the readability field.
Guides the model's output style for a specific use case. 11 options available:
| ID | Value (API string) | Icon |
|---|---|---|
| 1 | General Writing |
📖 |
| 2 | Academic |
🎓 |
| 3 | Marketing Material |
📈 |
| 4 | Business Material |
💼 |
| 5 | Essay |
📝 |
| 11 | Email |
📧 |
| 6 | Legal Material |
⚖️ |
| 7 | Story |
🎤 |
| 8 | Cover Letter |
📃 |
| 9 | Report |
📂 |
| 10 | Article |
📰 |
Free plan users can only use General Writing (id: 1). The value string is sent to the API in the purpose field.
Controls how aggressively text is rewritten to bypass AI detectors. 3 levels (NOT 5):
| Level | Index | API Value | Description |
|---|---|---|---|
| Simple | 0 | "0" |
Light rewriting, preserves original structure |
| Standard | 1 | "1" |
Moderate rewriting |
| Enhanced | 2 | "2" |
Aggressive rewriting for maximum bypass |
Free plan users can only use Simple (0). Default is Enhanced (2) for paid users.
Analyzes text to determine AI-generation probability by running it against 9 external detection services.
| Detector | Score Field | Specialization |
|---|---|---|
| GPTzero | gptZero |
Academic AI detection |
| ZeroGPT | zeroGPT |
General-purpose |
| Sapling | sapling |
AI content analysis |
| Copyleaks | copyLeaks |
Plagiarism + AI |
| Writer | writer |
Content authenticity |
| Turnitin | turnitin |
Academic integrity |
| Originality | originality |
AI + plagiarism |
| Crossplag | crossPlag |
Cross-language detection |
| Content at Scale | contScale |
SEO-focused detection |
All detector scores are 0-1 decimal values. The frontend displays them as percentages:
const displayScore = (score * 100).toFixed(0) + '%'
A score of 0.85 means "85% probability of being AI-generated." Lower scores indicate more human-like text.
From next-auth.d.ts — the UserObject.plan field:
plan: 'free' | 'starter' | 'pro' | 'unlimited'
4 plan types in the codebase. Note: earlier documentation referenced 6 types (Free/Trial/Starter/Pro/Unlimited/Special) — the code only uses these 4.
period: 'Y' | 'M' | null | '3Y'
| Value | Meaning |
|---|---|
'M' |
Monthly billing |
'Y' |
Yearly billing |
'3Y' |
3-year billing |
null |
Free plan (no billing) |
interface PreviousPaidPlanDetails {
plan: 'free' | 'starter' | 'pro' | 'unlimited'
period: 'Y' | 'M'
amount: number
currency: string
limit_monthly: number
limit_per_request: number
}
Credits control how many words a user can humanize or scan. Key fields from UserObject:
| Field | Type | Description |
|---|---|---|
credit |
number | Remaining word credits (main pool) |
limit_monthly |
number | Monthly word credit cap |
limit_per_request |
number | Max words per single request |
detector_credits |
number | Separate credit pool for detector-only usage |
plan_monthly_limit |
number | Plan's monthly word limit |
plan_per_request_limit |
number | Plan's per-request word limit |
total_word_used_current_period |
number | Words used this billing period |
Effective credit balance (from frontend):
const userCredit = (session.user.credit || 0) + (session.user.referral?.credits || 0)
For unlimited plans:
if (plan === 'unlimited') {
totalWords = 'Unlimited' // Display string, not a number
}
interface Referral {
user: number
referral_id: string
credits: number // Remaining referral bonus words
referred_users: ReferredUser[]
expired_at: string | null
total_bonus_words: number // Total referral words earned
}
Referral credits are added to the main credit balance for limit checks but tracked separately.
Documents represent humanization sessions with version history:
interface DocumentListItem {
id: number
title: string
user: number
version_count: number
version_list: Version[]
created_at: string
updated_at: string
}
Each humanization produces a version:
interface Version {
id: string
input_text: string // Original AI text
output_text: string // Humanized result
like: null | boolean // User rating
action: string
word_count: number
history: number // Parent document ID
draft_list: DraftListItem[]
}
| Token | Lifetime | Purpose |
|---|---|---|
| Access token | 1 hour | API authorization (Authorization: Bearer <token>) |
| Refresh token | Long-lived | Used to obtain new access tokens |
| Extension token | Session | Browser extension authentication |
Access tokens are refreshed automatically 5 minutes before expiry via POST /api/user/refresh/.
3 authentication providers: Email/Password, Google OAuth, Facebook OAuth
TOTP-based 2FA is available for email/password authentication.
8 supported languages (i18n):
| Code | Language |
|---|---|
en |
English |
de |
German |
es |
Spanish |
fr |
French |
it |
Italian |
pt |
Portuguese |
zh |
Chinese |
nl |
Dutch |
The humanizer language field is currently hardcoded to 'English' in the frontend.
| Date | Author | Change |
|---|---|---|
| 2026-01-30 | Admin | Initial creation |
| 2026-01-30 | Docs team | Rewritten with real code: exact readability (5), purpose (11), strength (0-2) values, plan types (4), billing periods including 3Y, credit fields, score format (0-1 decimal), TypeScript interfaces |
Prev: First Day Onboarding Checklist | Next: Common Workflows | Up: General