Summary
Add a character stats endpoint at app/api/routes-f/char-stats/route.ts. Count characters by Unicode category.
Requirements
- POST body { text }
- Return { total, letters, digits, whitespace, punctuation, symbols, emoji, other, by_script: { latin, cyrillic, cjk, arabic, ... } }
- Use Unicode property regex (e.g., /\p{L}/u)
- Handle multi-codepoint emoji (ZWJ sequences)
- Cap input at 1MB
- Tests: ASCII text, mixed scripts, emoji-heavy text
Scope Constraint - READ BEFORE STARTING
All files for this task must live inside app/api/routes-f/. This includes the route handler, helpers/utilities, types, and tests. Do NOT modify, import from, or add files to lib/, utils/, types/, components/, or anywhere else outside app/api/routes-f/. If you need shared logic, duplicate it inside your subfolder. Keeping everything scoped to this folder is intentional - it keeps these tasks independent and mergeable in any order.
Summary
Add a character stats endpoint at app/api/routes-f/char-stats/route.ts. Count characters by Unicode category.
Requirements
Scope Constraint - READ BEFORE STARTING
All files for this task must live inside app/api/routes-f/. This includes the route handler, helpers/utilities, types, and tests. Do NOT modify, import from, or add files to lib/, utils/, types/, components/, or anywhere else outside app/api/routes-f/. If you need shared logic, duplicate it inside your subfolder. Keeping everything scoped to this folder is intentional - it keeps these tasks independent and mergeable in any order.