Seiro — Emoji-to-Phrase Conversion API

Status: 98% Complete — Ready for Testing & Deployment
Type: API-first product
Owner: Hans
Last Updated: 2026-04-16


What It Is

Seiro is a high-performance, stateless API that converts 3 input emojis into expressive 2–3 word personality descriptors (e.g., “ardently-steadfast guardian”). Designed for gamifying identity and expression in social apps.

Two purposes:

  1. Backend service for Hans’s social platforms and influencer engagement modules
  2. Public API product for developers/creators

Tech Stack

LayerTechnology
BackendGo 1.22+ with Gin framework
FrontendReact + TypeScript + Tailwind CSS
CacheRedis 7+ (rate limiting + result caching)
DataJSON-based lexicons and emoji cluster mappings
LMKenLM 5-gram model for fluency scoring
DeploymentDocker on Hetzner VPS via Coolify
ProxyNginx or Caddy reverse proxy

Core Algorithm (7-Step Pipeline)

  1. Tag Retrieval — Each emoji maps to 5–8 thematic clusters with weighted tags
  2. Cluster Fusion — Normalize and sum weights across emojis; apply diversity penalty for repeats
  3. Word Selection — Pick 1–2 adjectives + 1 noun maximizing coverage, register compatibility, semantic distance (τ=0.35)
  4. Template Selection — Weighted softmax across ~12 templates (T=0.8)
  5. Phrase Assembly — Apply morphology, ensure euphony, generate 5–10 candidates
  6. Scoring — KenLM 5-gram fluency scoring × diversity × register weights; filter bottom 90%
  7. Output — Return top-k phrases; cache result; update Bloom filter

API Endpoints

EndpointMethodDescription
/v1/convertPOSTCore: convert emoji triplets to phrases
/v1/statusGETHealth check + system stats
/v1/docsGETAPI documentation (JSON)
/v1/playgroundGETInteractive web playground

Convert Request:

{
  "triplets": [["🔥", "💘", "🌊"]],
  "mode": "epic",       // "epic" | "cool" | "playful"
  "k": 3,               // variants (1-10)
  "seed": 42            // optional, for reproducibility
}

Auth: JWT Bearer tokens (planned tiers: Developer 60 req/min, Partner 600 req/min, Internal unlimited)


Data & Content Scale

MetricValue
Emojis mapped883+
Adjectives1,457
Nouns613
Adverbs198
Templates12
Semantic clusters120
Possible combinations600M+

Data pack structure: packs/seiro.en.v1/ — emojis.json, lexicon files, templates.json, morphology.json, registers.json, banned.json


Performance Targets

MetricTarget
Latency P50< 5ms
Latency P99< 15ms
Memory< 500MB per instance
Throughput100k req/min (horizontal scaling)
Cold start< 1s
Cache hit rate> 85%

Deployment

  • Primary: Docker Compose on Hetzner VPS (4–8GB RAM) via Coolify
  • Scaling: Horizontal via DNS round-robin or Nginx/HAProxy load balancer
  • Cost: ~€5–20/month on Hetzner depending on tier
  • Domains: seiro.app (frontend), api.seiro.app (backend)

Repetition & Diversity Logic

  • Triple same emoji (🔥🔥🔥) = intensity amplification, not redundancy
  • Per-user Bloom filter (7–30d TTL) prevents déjà vu
  • Global Bloom filter suppresses overused variants
  • Anti-echo: duplicate stem removal, cosine distance > 0.35 between adjectives

Trend Word Tracking

Monthly lexicon freshness process:

  • Monitor TikTok, Twitter/X, Urban Dictionary, Reddit for trending slang
  • Word lifecycle: Emerging → Trending → Established → Declining
  • Current additions: demure, mindful, sigma, gigachad, based, valid
  • Deprecated: yolo, on-fleek, bae

Embeddable Widget (Future)

4 options evaluated; recommended: JavaScript embed (single <script> tag, Shadow DOM isolation). Also considered: Web Component, iframe, copy-paste snippet.


Roadmap

VersionFeature
v1.1Multi-language packs (Japanese, Spanish)
v1.2Style Packs (marketing, gaming, romance)
v1.3Dynamic model updates — hot-reload JSONs
v1.4Partner dashboard with usage analytics
v2.0AI-assisted phrase refinement (distilled 200M-param model)

Remaining Before Production

  • Add basic tests (backend Go tests, optional frontend Vitest)
  • Local integration testing
  • Set JWT_SECRET environment variable
  • Build Docker images and deploy to staging
  • Staging validation then production deploy

Estimated time to production: 2–4 hours


Key Files

  • prd.md — Full product requirements document
  • README.md — Quick start and architecture overview
  • NEXT-STEPS.md — Status tracker and deployment checklist
  • docs/API.md — Complete API reference
  • docs/DEPLOYMENT.md — Deployment guide (Docker, Coolify, manual)
  • docs/TREND-TRACKING.md — Lexicon freshness process
  • docs/widgetfuture.md — Embeddable widget options
  • CONTRIBUTING.md — Development guidelines

0 items under this folder.