Inspiration

Coaching delivers one of the highest returns on investment you can make with your time -- the right guidance at the right moment can change everything. But most people never access it. Human coaches cost $200-500+/hour, scheduling is painful, and finding the right fit takes weeks.

Simon from Better Creating has spent the last year building AI coaching systems in Notion that thousands use. His vision: a beautiful, minimal mobile app where anyone can browse, create, and share AI coaches -- no technical friction, just instant guidance.

That vision inspired CoachAI. We saw an opportunity to combine cutting-edge AI, modern mobile development, and cloud-native infrastructure to democratize coaching for everyone. We wanted to prove that a polished, production-ready AI coaching app -- complete with scalable backend, real-time AI, and monetization -- could be architected and shipped using the best tools available in 2026.

What it does

CoachAI puts premium AI coaching in your pocket:

  • Browse a coach library -- Pre-built coaches for productivity, creativity, wellness, career, and personal growth, each with distinct personalities and expertise
  • Chat instantly -- Start a conversation with any coach in seconds. AI responses are powered by GPT-4o-mini with context-aware system prompts
  • Create custom coaches -- Define expertise, personality tone, coaching style, and conversation starters for your unique needs
  • Add personal context -- Share your values, goals, and preferences so every coach tailors advice to you
  • Share coaches -- Export and import coach configurations with share codes for community sharing
  • Premium subscriptions -- RevenueCat-powered paywall with monthly ($9.99), annual ($79.99), and lifetime ($199.99) tiers
  • Free tier -- 10 messages/day and 3 custom coaches, so everyone can access coaching

How we built it

Monorepo Architecture: The project lives in a monorepo housing 7 apps, a shared Go backend, protobuf definitions, E2E test suites, and infrastructure-as-code. This monorepo-first approach enables shared tooling, consistent CI/CD, and code reuse across all apps.

Frontend -- Native Android (Kotlin + Jetpack Compose):

  • Jetpack Compose with Material 3 design system for a modern, declarative UI
  • Hilt (Dagger) for compile-time dependency injection -- ViewModels, services, and singletons are all DI-managed
  • Kotlin Coroutines + StateFlow for reactive state management with unidirectional data flow
  • Semantic design tokens (CoachAIColors, Spacing, Radii) for consistent theming across 15+ screens
  • Dark mode support with animated 300ms theme transitions
  • Full accessibility: contentDescription on all interactive elements, 48dp touch targets, sp font scaling

Backend -- Go with Connect/gRPC:

  • Go (Golang) for a fast, statically typed, and memory-efficient backend
  • Connect protocol (gRPC-compatible) with protobuf-defined services: CoachService, ChatService, ContextService, ShareService
  • Buf for protobuf management, code generation, and schema evolution
  • SQLite for lightweight, zero-config persistence with migration-based schema management
  • REST endpoints alongside gRPC for simpler mobile client integration
  • Structured logging with zerolog and middleware for request tracing

AI / LLM Integration:

  • OpenAI GPT-4o-mini via a managed proxy service for cost control and rate limiting
  • Dynamic system prompts constructed from coach personality, expertise, tone, and style
  • Personal context injection -- user values, goals, and preferences are woven into every AI interaction
  • Full conversation history maintained per session for coherent multi-turn coaching
  • Graceful fallback to intelligent mock responses when the AI service is unavailable

Cloud Infrastructure (AWS):

  • AWS EC2 for backend deployment with systemd service management
  • Automated deployment pipeline via shell scripts: cross-compile Go binary (GOOS=linux GOARCH=amd64), SCP to instance, zero-downtime restart
  • Infrastructure-as-code with Terraform for reproducible provisioning
  • Environment-based configuration (SERVER_ADDR, DATABASE_PATH, OPENAI_PROXY_URL) for dev/staging/prod parity
  • Designed for horizontal scaling -- stateless backend ready for containerization with Docker/Kubernetes

Monetization -- RevenueCat:

  • RevenueCat SDK 8.x with auto-initialized offerings on app startup
  • Three subscription tiers mapped to RevenueCat packages (MONTHLY, ANNUAL, LIFETIME)
  • Entitlement-based access control (pro entitlement) with real-time subscription state via UpdatedCustomerInfoListener
  • BuildConfig-injected API keys for environment separation (test vs production)
  • Restore purchases, error handling, and graceful fallback to default product display

Testing & Quality:

  • Playwright E2E tests -- 17 test suites with 220 test specs covering all user flows
  • Maestro native YAML flows -- 17 flows each for Android and iOS
  • Shared test fixtures with centralized test data, timeouts, viewports, and form validation patterns
  • Tests cover: home, search, chat, coach creation, sharing, import, context, navigation, responsive behavior, accessibility, performance, onboarding, featured coaches, templates, and quick context

DevOps & Tooling:

  • Monorepo with shared backend, proto definitions, and E2E tests across 7 apps
  • Buf CLI for protobuf linting, breaking change detection, and code generation
  • Gradle with version catalogs (libs.versions.toml) for dependency management
  • Cross-platform build scripts for macOS development targeting Linux deployment
  • AI-assisted development with Cursor + Claude 4.6 Opus for rapid iteration

Challenges we ran into

  1. Protobuf binary descriptor corruption -- When renaming the Go module across the entire monorepo, a mass sed replacement corrupted the embedded binary protobuf descriptors inside generated .pb.go files. The replacement changed the string length inside serialized protobuf bytes, causing slice bounds out of range panics at runtime. The fix required deleting all generated code and regenerating cleanly with buf generate.

  2. RevenueCat + Hilt initialization ordering -- The SubscriptionManager singleton was created by Hilt but its initialize() was never called, meaning the UpdatedCustomerInfoListener was never registered and offerings were never fetched. The paywall opened to an empty state every time. We solved this by adding a Kotlin init block that auto-wires the listener and triggers the initial fetch the moment Hilt creates the instance.

  3. Android SDK bootstrapping -- The build environment had no JDK, Android SDK, or build tools. We bootstrapped the entire toolchain: OpenJDK 17 via Homebrew, Android SDK via sdkmanager, platforms and build-tools for API 35. Each missing piece surfaced as a separate build error that had to be resolved sequentially.

  4. Deprecated Compose APIs -- Material 3's rememberRipple() was removed between minor versions with no deprecation period in the version we used. This caused hard compilation errors across multiple files that required migrating to the new ripple() API from androidx.compose.material3.ripple.

  5. Database migration conflicts on EC2 -- Deploying a new backend binary against an existing SQLite database with stale schema caused migration failures (no such column: user_id). We implemented a clean deployment strategy: stop service, remove stale DB, restart to let migrations run fresh.

Accomplishments that we're proud of

  • Full-stack, production-ready delivery -- Native Android app + Go gRPC backend + OpenAI integration + AWS EC2 deployment + RevenueCat subscriptions, all working end-to-end and shipping a signed AAB to Google Play
  • 7 pre-built AI coaches spanning 5 categories (Productivity, Creativity, Wellness, Career, Personal Growth), each with unique personalities, conversation starters, and context-aware responses
  • Premium design system -- Semantic color tokens, consistent spacing constants, category-colored avatars, animated theme transitions, and full dark mode give the app a polished, premium feel
  • 220 E2E test specifications across Playwright web tests and Maestro native flows, covering every major user journey
  • Monorepo architecture supporting 7 apps with shared backend, proto definitions, and test infrastructure
  • Sub-6MB release APK -- aggressive R8 shrinking and resource optimization keep the install size tiny
  • AI-assisted development velocity -- From codebase analysis to Play Store-ready build in a single intensive development session using Cursor + Claude

What we learned

  • AI coding tools are a force multiplier, not autopilot -- They dramatically compress development cycles but require careful oversight. Our protobuf corruption was caused by an AI-suggested sed that didn't account for binary content in source files.
  • Design systems pay for themselves immediately -- Investing upfront in semantic color tokens (CoachAIColors), spacing constants (Spacing), and corner radii (Radii) made building 15+ screens consistent and fast. Every new screen "just looked right."
  • RevenueCat + Hilt requires intentional wiring -- DI frameworks create singletons lazily, but subscription services need eager initialization. The gap between "object exists" and "object is ready" is a common source of bugs.
  • Jetpack Compose moves fast -- The API surface evolves quickly between minor versions. Pinning dependency versions and watching for deprecation warnings in CI is essential.
  • gRPC/Connect + REST hybrid works well for mobile -- Using Connect for service definitions while adding simple REST endpoints for chat gave us the best of both worlds: type-safe services and easy mobile integration.
  • Monorepo discipline scales -- Shared proto definitions, test fixtures, and deployment scripts across 7 apps eliminated duplication and kept every app consistent.

What's next for CoachAI

  • Streaming AI responses -- Token-by-token rendering using Server-Sent Events for a more natural, real-time chat experience
  • Conversation persistence -- Save and resume chat sessions with full history, search, and session summaries
  • Kubernetes deployment -- Containerize the Go backend with Docker and deploy to EKS for auto-scaling, health checks, and rolling updates
  • GitOps pipeline -- ArgoCD or Flux for declarative deployment from the monorepo, with environment promotion (dev -> staging -> prod)
  • Coach marketplace -- Let creators publish, share, and monetize their coach configurations with revenue sharing
  • Voice coaching -- Audio input/output using Whisper + TTS for hands-free coaching sessions
  • Multi-platform -- iOS (Swift/SwiftUI) and web (SvelteKit) clients sharing the same backend and proto definitions
  • AIOps monitoring -- Automated anomaly detection on API latency, error rates, and AI response quality using CloudWatch + custom metrics
  • Team plans -- Shared coach libraries for organizations with admin controls, usage analytics, and SSO

Built With

  • kotlin
  • jetpack-compose
  • material3
  • golang
  • grpc
  • connect-rpc
  • protobuf
  • buf
  • sqlite
  • openai
  • gpt-4o-mini
  • revenuecat
  • aws-ec2
  • terraform
  • hilt
  • dagger
  • coroutines
  • playwright
  • maestro
  • cursor
  • claude
  • monorepo
  • systemd

Built With

  • aws-ec2
  • buf
  • claude
  • connect-rpc
  • coroutines
  • cursor
  • dagger
  • golang
  • gpt-4o-mini
  • grpc
  • hilt
  • jetpack-compose
  • kotlin
  • maestro
  • material3
  • monorepo
  • openai
  • playwright
  • protobuf
  • revenuecat
  • sqlite
  • terraform
Share this project:

Updates