Mobayilo Architecture & UX Audit
Mobayilo Architecture & UX Audit
Section titled “Mobayilo Architecture & UX Audit”Task 1: Architecture Review
Section titled “Task 1: Architecture Review”1. UI Consistency
Section titled “1. UI Consistency”- Configuration: The project leverages a CSS-first configuration in
app/assets/stylesheets/application.tailwind.cssusing the@themedirective, rather than a roottailwind.config.js. - Design System: There is a centralized token system defining semantic colors (e.g.,
--color-action-green: #22C55E,--color-dark-bg,--color-card). - Entry Point:
app/assets/stylesheets/application.tailwind.cssis the single source of truth for global styles and theme variables.
2. Interactive Patterns
Section titled “2. Interactive Patterns”- VoIP Integration: The core logic resides in
app/javascript/controllers/twilio_dialer_controller.js. - State Management:
- It uses
localStorage(mobayilo_dialer_online) to persist “Online” status across page reloads. - It relies on auto-reconnection logic on page load rather than a persistent frame (like a global Turbo Frame) to keep calls alive during navigation.
- It uses
- Key Controllers:
twilio_dialer_controllerhandles the calling logic, whilecountry_select_controllermanages international prefix logic.
3. Layouts
Section titled “3. Layouts”- Main Layout:
app/views/layouts/application.html.erb. - Responsive Strategy: It uses a “Mobile-First” approach where the desktop
navbarandfooterare hidden on mobile, replaced by ashared/mobile_navpartial. - Persistence: Navigation does not persist sidebars or players visually; the layout re-renders shared partials on every Turbo visit.
Task 2: Inconsistency Deep-Dive (UI Debt)
Section titled “Task 2: Inconsistency Deep-Dive (UI Debt)”1. Hardcoded Colors & Spacing (Theme Violations)
Section titled “1. Hardcoded Colors & Spacing (Theme Violations)”- Landing Page (
home.html.erb):- CRITICAL: Line 62 uses
bg-[oklch(98.5%_0.002_247.839)]. This raw value should be replaced with a token (e.g.,--color-gray-50).
- CRITICAL: Line 62 uses
- Credits Page (
credits.html.erb):- Uses
border-gray-200(Light mode gray) in a Dark mode context (lines 109, 122), clashing with theborder-white/10used elsewhere.
- Uses
- Dialer Component (
_iphone_dialer.html.erb):- Uses a specific hardcoded shadow:
shadow-[0_25px_60px_-20px_rgba(15,23,42,0.7)]. - Dialpad buttons use
bg-white/10directly instead of a semantic token like--color-keypad-btn.
- Uses a specific hardcoded shadow:
2. Inconsistent Button/Form Styles
Section titled “2. Inconsistent Button/Form Styles”- Borders:
- Sign In: Uses
border-gray-600for inputs. - Credits/Dashboard: Uses
border-white/10(translucent white). This creates a visual disconnect between “Auth” and “App” states.
- Sign In: Uses
- Inputs:
- Sign In: Inputs have a solid
bg-dark-bg. - Credits: Inputs have
bg-dark-bgbut differ in border opacity and placeholder colors (gray-500vsgray-400).
- Sign In: Inputs have a solid
3. VoIP Specific Deviations
Section titled “3. VoIP Specific Deviations”- Skeuomorphism vs Flat: The iPhone Dialer component uses
md:rounded-[48px]to mimic a phone, contrasting with therounded-2xlorrounded-xlused for cards and buttons elsewhere. - Overlay Consistency: The “Go Online” overlay in the dialer correctly uses
backdrop-blur-sm, but the “Sign In to view balance” overlay in the Credits page lacks this, using only a simple dashed border.
Task 3: Senior Front-end Engineer Prompt
Section titled “Task 3: Senior Front-end Engineer Prompt”Role: Senior Front-end Engineer (Rails 8 / Tailwind CSS / Hotwire / ViewComponent)
Objective: Create a high-conversion Landing Page for “Mobayilo” to onboard our first beta testers. The page must strictly adhere to our existing “Action Green” Dark Mode aesthetic and act as a polished wrapper for our VoIP functionality.
Context:
We have an existing codebase using Rails 8, Tailwind CSS (configured via CSS variables in application.tailwind.css), and Stimulus.
- Core Color: Action Green (
#22C55E/--color-action-green) - Background: Dark Slate (
#0F172A/--color-dark-bg) - Cards: Dark Card (
#1E293B/--color-dark-card) or Translucent (bg-white/5withborder-white/10) - Typography: ‘Cormorant Garamond’ (Headings) and ‘Inconsolata’ (Body)
Requirements:
-
Visual Style (Strict Adherence):
- Backgrounds: MUST use
bg-dark-bgfor the main page background. - Borders: MUST use
border-white/10for subtle dividers and cards (Avoidgray-200or explicit light-mode grays). - Buttons: Primary buttons must be
bg-action-green text-dark-bg rounded-2xl font-semibold. - Typography: Use
font-headingfor all section titles andfont-sans(Inconsolata) for body text.
- Backgrounds: MUST use
-
Page Structure:
- Hero Section:
- Headline: “The Future of Browser Calling.”
- Subtext: “Join the exclusive beta.”
- Call to Action: An email capture form styled as a dark input (
bg-dark-bg border-white/10 text-white) with an Action Green submit button.
- Live Demo Container:
- Incorporate the existing
shared/iphone_dialerpartial concept. - Visual Constraint: Ensure the container holding the dialer maintains the
md:rounded-[48px]“phone silhouette” style to match the existing component’s look and feel.
- Incorporate the existing
- Feature Grid:
- 3-column layout highlighting: “No Apps Required,” “Crystal Clear Audio,” and “Pay-as-you-go.”
- Cards should use
bg-dark-cardorbg-white/5withborder border-white/10.
- Hero Section:
-
Technical Constraints:
- Output pure HTML/ERB that can be pasted into
app/views/pages/landing.html.erb. - Do NOT use hardcoded hex values. Use our Tailwind utility classes (e.g.,
text-gray-400,text-white,text-action-green). - Respect the application layout: the page will be rendered inside
layouts/application.html.erb, so assume the shared navbar is present (or hide it if you prefer a dedicated landing layout).
- Output pure HTML/ERB that can be pasted into
-
Beta Access Form:
- Build a simple
form_withblock for capturing the email. - Ensure input focus states match the existing app (
focus:border-action-green focus:ring-action-green).
- Build a simple
Deliverable:
Provide the complete ERB code for app/views/pages/landing.html.erb.