Update pricing UX, billing flows, and API rules

This commit is contained in:
Dwindi Ramadhana
2026-02-12 00:52:40 +07:00
parent cf065fab1e
commit a905256353
202 changed files with 22348 additions and 301 deletions

View File

@@ -0,0 +1,188 @@
# Redirection Plan — Dewemoji Pivot (2026)
**Source of truth:** `dewemoji-direction-2026.md` (Feb 8, 2026)
This document maps the **2026 pivot** (“personal emoji library + sync”) against what we have **already built** in the rebuild app, then defines a concrete redirection plan.
---
## 1) Pivot Summary (as confirmed)
**New product north star:**
- Dewemoji is a **personal emoji library**.
- Users create private keywords in any language (including slang and nonLatin scripts), sync across devices, and **own their vocabulary**.
- Public discovery remains free (EN/ID + semantic) as a growth engine.
- No public/community submissions → no moderation burden.
**Monetization shift:**
- Free: public search only.
- Paid: private keyword library + sync + API keys + dashboard.
- Rename **Pro → Personal**.
---
## 2) What Weve Already Built (Current State)
### ✅ Built & aligned
- Public emoji discovery (JSON dataset, EN + ID keywords).
- API endpoints: `/v1/emojis`, `/v1/categories`, `/v1/emoji`, `/v1/health`.
- Frontend search + browse + emoji detail pages.
- Basic SEO + sitemap + robots.
- License verification/activation endpoints (legacystyle) and supporting services.
- The rebuild is already cachefirst (`app/data/emojis.json`).
### ⚠️ Built but **misaligned** with pivot
- **Licensebased Pro system** (Gumroad/Mayar validation).
- **Device activation** + license tables intended for legacy Pro (not Personal plan).
- “Pro” pricing page and marketing copy (old pricing, old narrative).
- API docs + support pages referencing license key flow.
### ❌ Not built yet (required by pivot)
- User accounts (register/login/session).
- Personal tier subscription model (Stripe + subscriptions table).
- API key management tied to user (generate/revoke).
- Private keyword CRUD (user keywords table).
- Personal dashboard (keywords, API keys, billing).
- Extension account linking + private keyword sync.
- Public endpoint whitelisting (origin + extension UA) + soft throttling.
---
## 3) Directional Conflicts to Resolve
| Area | Current | Pivot Requirement | Decision |
|------|---------|------------------|----------|
| Monetization | Pro license keys | Personal subscription | **Replace** license key system with account + API key model |
| Identity | None | User accounts | **Add** auth system + dashboard |
| Keywords | Public only | Private per user | **Add** `user_keywords` + blended search |
| API Access | License key | User API keys | **Replace** authorization method |
| Community | Planned public contributions | Privateonly | **Remove** community feature scope |
| Pricing | $3/mo + $27/yr + $69 lifetime | $4.99/mo + $49/yr + $99 lifetime | **Update** pricing + copy |
---
## 4) Redirection Plan (Phased)
### Phase A — Foundation (Backend) ✅ *Start here*
Goal: replace license model with **account + API key** architecture.
**Backend tasks**
- Add tables: `users`, `user_api_keys`, `user_keywords`, `subscriptions`.
- Add auth endpoints:
- `POST /v1/user/register`
- `POST /v1/user/login`
- `POST /v1/user/logout`
- Add API key endpoints:
- `GET /v1/user/apikeys`
- `POST /v1/user/apikeys`
- `DELETE /v1/user/apikeys/:key`
- Add private keyword endpoints:
- `GET /v1/keywords`
- `POST /v1/keywords`
- `DELETE /v1/keywords/:id`
- Add `GET /v1/search?private=true` to **blend private + public** results.
- Implement **origin/UA whitelist** for public endpoints and soft throttling.
**What to freeze**
- Legacy license endpoints stay online temporarily but **deprecated**.
- No new features on Gumroad/Mayar flow.
---
### Phase B — Dashboard UI (Web)
Goal: provide a **personal workspace** for private keywords and API keys.
**Frontend tasks**
- Add `/register`, `/login`, `/dashboard`.
- Dashboard tabs:
- **My Keywords** (CRUD, bulk import/export)
- **API Keys** (generate/revoke)
- **Billing** (plan status, upgrade links)
- Update emoji detail page:
- “Add to My Keywords” for Personal users.
- Show personal keywords for this emoji (if any).
---
### Phase C — Extension Integration
Goal: enable personal keywords in extension + sync.
**Extension tasks**
- “Link Account” flow in extension.
- Store API key in `chrome.storage.sync`.
- Include `Authorization: Bearer dew_…` header when logged in.
- Blend private + public results.
- Upgrade prompt on missing keyword: “Create this in Personal?”
---
### Phase D — Payments + Plan Rename
Goal: Personal tier + billing system.
**Billing tasks**
- PayPal subscription plan (Monthly/Annual) + webhook handler.
- Keep pricing **admincontrolled** (see Admin Dashboard plan).
- Webhooks → populate `subscriptions`.
- Plan rename everywhere: **Pro → Personal**.
- Pricing page update.
---
### Phase E — Deprecate Legacy Licenses
Goal: cut off old Gumroad model cleanly.
**Migration tasks**
- “Paste license → autocreate account → grant Personal (lifetime)” tool.
- Email existing license users.
- Sunset date for legacy validation.
---
## 5) Immediate File Updates (Recommended Next)
- Update **API docs** to mention account/API keys (not licenses).
- Update **Pricing page** to Personal tier and new price points.
- Update **Support/Terms/Privacy** copy with Personal tier language.
- Update **community-plan.md** (already aligned with privateonly direction).
---
## 6) Risk Notes
- The pivot **removes public contribution features** and their associated moderation burden. This is consistent with the new revenue model but changes the original story. Make sure homepage and extension copy reflect **personal library** first.
- Referrer whitelist + soft throttle is required to keep free endpoints open without abuse.
- **Public unlimited usage** should only be granted to **real extension installs**. Plan: use Chrome Verified Access / `chrome.identity.getCertificationToken()` to prove the request is from a legitimate Web Store install before allowing unlimited public access.
- **Private keywords + sync** always require **user authentication** (magiclink/OTP) — no exceptions.
---
## 7) Quick Comparison Snapshot
**What we should keep:**
- Public emoji search + dataset caching.
- Site UI/SEO baseline.
- API response contract (minus license semantics).
**What we should replace:**
- Gumroad/Mayar license verification.
- Pro/lifetime license activation.
- Community submissions/voting.
**What we should add:**
- User accounts + API keys.
- Private keyword library + sync.
- Dashboard + billing.
---
## 8) Decision Checkpoints
Before coding Phase A, confirm:
1. **Plan name** is officially “Personal” (not Pro).
2. **API key format** (`dew_…`) accepted.
3. Public endpoints remain unlimited for **dewemoji.com + extension**.
4. Stripe is the primary payment provider.
---
If you want, I can immediately convert this into a task checklist by repo folder (backend, web, extension) and start Phase A scaffolding.