Mobayilo CLI - Product Requirements Document (PRD)
Mobayilo CLI - Product Requirements Document (PRD)
Section titled “Mobayilo CLI - Product Requirements Document (PRD)”1. Executive Summary
Section titled “1. Executive Summary”Mobayilo CLI (moby) is a developer-first terminal interface for the Mobayilo international calling platform. It allows users to authenticate, check balances, lookup rates, and initiate calls directly from their terminal.
2. Target Audience
Section titled “2. Target Audience”- Power users who spend most of their time in the terminal.
- Developers looking to integrate Mobayilo into their workflows.
- Users who prefer a fast, keyboard-driven interface over the web UI.
3. Core Features
Section titled “3. Core Features”3.1 Authentication
Section titled “3.1 Authentication”- Login: Users can authenticate via an API key or a browser-based OAuth-like flow.
- Logout: Securely remove stored credentials from the local machine (using system keychain).
- Status: Check which account is currently active.
3.2 Calling
Section titled “3.2 Calling”- Initiate Call: Trigger a call between the user’s verified Caller ID and a destination number.
- Call History: List recent calls with duration and cost.
3.3 Billing & Account
Section titled “3.3 Billing & Account”- Balance: Show current credit balance in local currency.
- Top-up: Generate a Stripe Checkout link to add credits.
- Rates: Lookup calling rates for any country by ISO code or phone prefix.
3.4 Contacts
Section titled “3.4 Contacts”- List/Search: Access Mobayilo contacts via the terminal.
- Quick Dial: Call a contact by name.
4. Technical Requirements
Section titled “4. Technical Requirements”4.1 CLI Architecture (The “moby” tool)
Section titled “4.1 CLI Architecture (The “moby” tool)”- Language: Go (1.23+).
- CLI Framework: Kong for declarative command structures.
- Secure Storage: keyring for storing API tokens.
- Output: JSON-first (for scripting) with pretty-printed tables for humans.
4.2 Backend Requirements (Mobayilo Rails App)
Section titled “4.2 Backend Requirements (Mobayilo Rails App)”- API Tokens: Implement a
PersonalAccessTokenmodel for secure CLI access. - CLI Endpoints:
POST /api/cli/tokens: Generate a token.GET /api/cli/me: Return current user/account status.POST /api/cli/calls: Trigger a “Click-to-Call” (connect user’s verified number to destination).
- CORS/Security: Ensure CLI requests are properly authenticated and rate-limited.
5. User Experience (CLI Design)
Section titled “5. User Experience (CLI Design)”# Loginmoby login
# Check balancemoby balance
# Check ratesmoby rates us
# Make a call (connects your verified phone to the target)moby call +15551234567
# Top upmoby topup 56. Success Metrics
Section titled “6. Success Metrics”- Average time to initiate a call from terminal vs web.
- Number of active CLI users.
- Percentage of top-ups initiated via CLI.