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:
- Backend service for Hans’s social platforms and influencer engagement modules
- Public API product for developers/creators
Tech Stack
| Layer | Technology |
|---|---|
| Backend | Go 1.22+ with Gin framework |
| Frontend | React + TypeScript + Tailwind CSS |
| Cache | Redis 7+ (rate limiting + result caching) |
| Data | JSON-based lexicons and emoji cluster mappings |
| LM | KenLM 5-gram model for fluency scoring |
| Deployment | Docker on Hetzner VPS via Coolify |
| Proxy | Nginx or Caddy reverse proxy |
Core Algorithm (7-Step Pipeline)
- Tag Retrieval — Each emoji maps to 5–8 thematic clusters with weighted tags
- Cluster Fusion — Normalize and sum weights across emojis; apply diversity penalty for repeats
- Word Selection — Pick 1–2 adjectives + 1 noun maximizing coverage, register compatibility, semantic distance (τ=0.35)
- Template Selection — Weighted softmax across ~12 templates (T=0.8)
- Phrase Assembly — Apply morphology, ensure euphony, generate 5–10 candidates
- Scoring — KenLM 5-gram fluency scoring × diversity × register weights; filter bottom 90%
- Output — Return top-k phrases; cache result; update Bloom filter
API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/v1/convert | POST | Core: convert emoji triplets to phrases |
/v1/status | GET | Health check + system stats |
/v1/docs | GET | API documentation (JSON) |
/v1/playground | GET | Interactive 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
| Metric | Value |
|---|---|
| Emojis mapped | 883+ |
| Adjectives | 1,457 |
| Nouns | 613 |
| Adverbs | 198 |
| Templates | 12 |
| Semantic clusters | 120 |
| Possible combinations | 600M+ |
Data pack structure: packs/seiro.en.v1/ — emojis.json, lexicon files, templates.json, morphology.json, registers.json, banned.json
Performance Targets
| Metric | Target |
|---|---|
| Latency P50 | < 5ms |
| Latency P99 | < 15ms |
| Memory | < 500MB per instance |
| Throughput | 100k 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
| Version | Feature |
|---|---|
| v1.1 | Multi-language packs (Japanese, Spanish) |
| v1.2 | Style Packs (marketing, gaming, romance) |
| v1.3 | Dynamic model updates — hot-reload JSONs |
| v1.4 | Partner dashboard with usage analytics |
| v2.0 | AI-assisted phrase refinement (distilled 200M-param model) |
Remaining Before Production
- Add basic tests (backend Go tests, optional frontend Vitest)
- Local integration testing
- Set
JWT_SECRETenvironment 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 documentREADME.md— Quick start and architecture overviewNEXT-STEPS.md— Status tracker and deployment checklistdocs/API.md— Complete API referencedocs/DEPLOYMENT.md— Deployment guide (Docker, Coolify, manual)docs/TREND-TRACKING.md— Lexicon freshness processdocs/widgetfuture.md— Embeddable widget optionsCONTRIBUTING.md— Development guidelines