mobile-saas-planning/SKILL.md
Create comprehensive planning documentation for a native mobile app (Android or iOS) that integrates with an existing web-based SaaS platform. Use when building a mobile companion app for any SaaS — ERP, CRM, POS, logistics, healthcare, fintech...
npx skillsauth add peterbamuhigire/skills-web-dev mobile-saas-planningInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
mobile-saas-planning or would be better handled by a more specific companion skill.references only as needed.SKILL.md first, then load only the referenced deep-dive files that are necessary for the task.references/ directory for deep detail after reading the core workflow below.Generate a complete, implementation-ready documentation suite for a native mobile app (Android or iOS) that serves as a mobile client for an existing web-based SaaS system.
commonMain.
Testing Strategy will reference kmp-tdd for shared module tests alongside
android-tdd and ios-tdd for platform UI testsBefore generating ANY documents, the agent must have or discover:
| Field | What to Find | | ------------- | ------------------------------------------------- | | Product name | Brand name and domain | | Domain | ERP, CRM, POS, Healthcare, Fintech, etc. | | Target market | Region, language, currency, payment methods | | Backend stack | PHP/MySQL, Node/PostgreSQL, Django, Laravel, etc. | | API base URL | Per environment (see standard 3-env setup below) | | Auth model | JWT, OAuth2, session-based, API keys | | Multi-tenancy | Tenant ID in JWT, subdomain, DB-per-tenant | | Target platform | Android, iOS, or both |
Audit the web app to identify all modules. For each module determine:
The user may request a subset of modules. Respect their selection:
Android constraints:
iOS constraints:
Shared constraints:
localhost); iOS Simulator can use localhost directlyAll SaaS companion apps target these three backend environments:
| Environment | OS | Database | API Base URL Pattern |
|---|---|---|---|
| Development | Windows 11 (WAMP) | MySQL 8.4.7 | http://{LAN_IP}:{port}/{project}/api/ |
| Staging | Ubuntu VPS | MySQL 8.x | https://staging.{domain}/api/ |
| Production | Debian VPS | MySQL 8.x | https://{domain}/api/ |
Android: Use Gradle build flavors to manage per-environment base URLs.
iOS: Use Xcode build configurations and .xcconfig files to manage per-environment base URLs.
All backends use utf8mb4_unicode_ci collation and MySQL 8.x. Always plan API contracts that work identically across all environments.
Every mobile SaaS app MUST start with Phase 1: Login + Dashboard + Empty Tabs.
This is the proven foundation pattern. Before planning any business features, the first implementation phase always delivers:
| Component | Android | iOS | Backend | |---|---|---|---| | Auth | LoginScreen, LoginViewModel, AuthRepository, AuthApiService, TokenManager, interceptors | LoginView, AuthService, TokenManager, KeychainHelper | mobile-login.php, mobile-refresh.php, mobile-logout.php, MobileAuthHelper, ApiAuthMiddleware | | Dashboard | DashboardScreen, DashboardViewModel, DashboardRepository, Room cache | DashboardView, DashboardService, SwiftData cache | dashboard-stats.php (dual auth) | | Navigation | 5-tab BottomBar, NavGraph, PlaceholderScreen for future tabs | 5-tab TabView, NavigationStack | — | | Infrastructure | DI modules, theme, encrypted prefs, network monitor | SPM packages, theme, Keychain | refresh_tokens table, .env loading | | Tests | 40+ unit tests (JUnit 5/MockK) | 40+ unit tests (XCTest/Swift Testing) | curl/Postman endpoint verification |
When auditing modules, group them into a maximum of 5 bottom navigation tabs. Common patterns:
| App Type | Tab 1 | Tab 2 | Tab 3 | Tab 4 | Tab 5 | | ------------------- | ----- | ------------ | --------- | --------- | -------- | | MLM/Distributor | Home | Sales | Network | Knowledge | Training | | ERP/Business | Home | Sales | Inventory | Reports | Settings | | CRM | Home | Contacts | Deals | Tasks | Settings | | POS/Retail | Home | Sales | Products | Customers | Reports | | Healthcare | Home | Patients | Schedule | Records | Settings | | Fintech | Home | Transactions | Cards | Savings | Settings |
If more than 5 sections exist, nest sub-sections within tabs or use drawer navigation for secondary items.
Android — The Phase 1 plan MUST be structured as 11 sections:
docs/plans/phase-1-login-dashboard/
├── 00-build-variants.md # Dev/Staging/Prod flavors
├── 01-project-bootstrap.md # Gradle, manifest, strings, packages
├── 02-backend-api.md # PHP JWT endpoints + DB migration
├── 03-core-infrastructure.md # DI, security, network, interceptors
├── 04-authentication-feature.md # Login vertical slice (DTO->Entity->Domain)
├── 05-dashboard-feature.md # Dashboard with offline-first Room caching
├── 06-navigation-tabs.md # Bottom nav + placeholder screens
├── 07-room-database.md # Database class, converters, module
├── 08-theme-ui-components.md # Material 3 theme + reusable components
├── 09-testing.md # 40+ unit tests across all layers
└── 10-verification.md # Backend curl tests + Android manual checklist
iOS — The Phase 1 plan MUST be structured as 11 sections:
docs/plans/ios-phase-1-login-dashboard/
├── 00-xcode-setup.md # Build configs, .xcconfig, schemes
├── 01-project-bootstrap.md # SPM packages, Info.plist, project structure
├── 02-backend-api.md # PHP JWT endpoints + DB migration (shared with Android)
├── 03-core-infrastructure.md # Networking, security, Keychain, monitors
├── 04-authentication-feature.md # Login vertical slice (DTO->Model->Domain)
├── 05-dashboard-feature.md # Dashboard with offline-first SwiftData caching
├── 06-navigation-tabs.md # TabView + NavigationStack + placeholder screens
├── 07-swiftdata-persistence.md # SwiftData models, containers, queries
├── 08-theme-ui-components.md # Custom theme + reusable SwiftUI components
├── 09-testing.md # 40+ unit tests across all layers
└── 10-verification.md # Backend curl tests + iOS manual checklist
Only after Phase 1 is fully implemented, tested, and verified E2E should Phase 2 features be planned. Phase 2 fills in the placeholder tabs with real functionality, reusing all the infrastructure from Phase 1.
Generate documents one at a time, in order. Each document builds on the previous.
Before writing any documents:
| Order | Document | Index File | Sub-files Directory |
| ----- | --------------------- | ------------------------ | -------------------------- |
| 1 | README | README.md | — |
| 2 | Product Requirements | 01_PRD.md | prd/ |
| 3 | Software Requirements | 02_SRS.md | srs/ |
| 4 | Software Design | 03_SDS.md | sds/ |
| 5 | API Contract | 04_API_CONTRACT.md | api-contract/ |
| 6 | User Journeys | 05_USER_JOURNEYS.md | — (or split if >500 lines) |
| 7 | Testing Strategy | 06_TESTING_STRATEGY.md | testing/ |
| 8 | Release Plan | 07_RELEASE_PLAN.md | — |
After all documents are generated, verify:
FR-AUTH-001, NFR-PERF-003, etc.Use these unless the project context requires alternatives:
| Layer | Technology | Version | | ------------- | ------------------------------------------- | ----------------------------------- | | Language | Kotlin | 2.0+ | | UI | Jetpack Compose + Material 3 | BOM 2024.06+ | | Icons | Custom PNGs (no icon libraries) | Use placeholders + PROJECT_ICONS.md | | Reports | Table-first for >25 rows | Use android-report-tables | | Architecture | MVVM + Clean Architecture | — | | DI | Dagger Hilt | 2.51+ | | Networking | Retrofit + OkHttp + Moshi | 2.11+ / 4.12+ | | Local DB | Room | 2.6+ | | Async | Coroutines + Flow | 1.8+ | | Background | WorkManager | 2.9+ | | Navigation | Navigation Compose | 2.7+ | | Image Loading | Coil | 2.6+ | | Charting | Vico (Compose-first) | Use guide | | Security | EncryptedSharedPreferences, BiometricPrompt | AndroidX | | Logging | Timber | 5.0+ | | Testing | JUnit 5, MockK, Turbine, Compose UI Testing | — | | CI/CD | GitHub Actions | — |
Use these unless the project context requires alternatives:
| Layer | Technology | Version | | ------------- | --------------------------------------- | ------------------ | | Language | Swift | 6.0+ | | UI | SwiftUI | iOS 17+ | | Icons | Custom PNGs (no SF Symbols) | Asset Catalogs + PROJECT_ICONS.md | | Reports | Table-first for >25 rows | Use mobile-report-tables | | Architecture | MVVM + Clean Architecture | — | | DI | Swift native / Factory pattern | — | | Networking | URLSession + async/await | — | | JSON | Codable | — | | Local DB | SwiftData | iOS 17+ | | Async | Swift Concurrency (async/await) | — | | Background | BGTaskScheduler | — | | Navigation | NavigationStack | — | | Image Loading | AsyncImage / Kingfisher | — | | Charting | Swift Charts | iOS 16+ | | Security | Keychain Services, LocalAuthentication | — | | Logging | os.Logger | — | | Testing | XCTest, Swift Testing | — | | CI/CD | GitHub Actions + Xcode Cloud | — |
Detailed templates for each document are in references/document-templates.md.
Architecture and code patterns are in references/architecture-patterns.md.
API integration patterns are in references/api-integration-patterns.md.
01_PRD — Vision, personas (3-5), user stories (5+ per module), MVP scope with release phases, competitive analysis, success metrics, risk register, glossary
02_SRS — Numbered functional requirements (10+ per core module), non-functional requirements (performance, security, offline, accessibility, localization), local entity definitions (Room/SwiftData), traceability matrix
03_SDS — Architecture layers, complete build config (Gradle for Android, Xcode for iOS), project structure, DI setup, security implementation (cert pinning, encrypted storage, biometrics, code obfuscation), offline sync (Room DAOs or SwiftData queries, SyncWorker/BGTaskScheduler, conflict resolution, staleness budgets), networking layer, CI/CD workflows
04_API_CONTRACT — Base URLs, auth model, JWT structure, every endpoint with method + path + request JSON + response JSON + validation rules + error responses, pagination model, rate limits, error code reference
05_USER_JOURNEYS — 8-12 journeys with ASCII flow diagrams, step-by-step breakdowns, error paths, offline behavior. Must include: first-time setup, login, primary transaction, offline transaction, search, dashboard, error recovery
06_TESTING_STRATEGY — Test pyramid (60/25/10/5), unit test examples (ViewModel/Service tests, UseCase, Repository), UI test examples (Compose/SwiftUI), integration tests, security tests, performance benchmarks, CI gates, test data fixtures
07_RELEASE_PLAN — Store setup (Play Store and/or App Store), signing strategy, release channels with staged rollout, versioning, privacy policy checklist, app store listing, in-app update strategy, release checklist, rollback procedure, post-launch monitoring
When the user requests only specific modules:
If the user says offline support is not needed:
If modules are subscription-gated:
If all modules are available to all users:
Adapt to target market:
Load these skills alongside for deeper implementation guidance:
android-development — Kotlin/Android coding standardsandroid-tdd — Test-driven development workflowandroid-data-persistence — Room, DataStore, offline-first patternsjetpack-compose-ui — Compose UI standards and Material 3ios-development — Swift/iOS coding standards (when created)swiftui-design — SwiftUI UI standards (when created)dual-auth-rbac — Authentication and permission systemapi-error-handling — API error response patternsmodular-saas-architecture — Module toggle and subscription gatingmulti-tenant-saas-architecture — Tenant isolation patternsdata-ai
Use when adding AI-powered analytics to a SaaS platform — semantic search over business data, natural language queries, trend detection, anomaly alerts, and AI-generated insights for dashboards. Covers embeddings, NL2SQL, and per-tenant analytics...
data-ai
Design AI-powered analytics dashboards — what metrics to show, how to display AI predictions and confidence, drill-down patterns, KPI cards, trend visualisation, AI Insights panels, export design, and role-based dashboard variants. Invoke when...
development
Use when designing, building, reviewing, or upgrading production software systems that must be secure, performant, maintainable, scalable, and user-centered. Apply before writing specs, code, architecture, APIs, databases, mobile apps, SaaS platforms, or ERP systems.
development
Professional web app UI using commercial templates (Tabler/Bootstrap 5) with strong frontend design direction when needed. Use for CRUD interfaces, dashboards, admin panels with SweetAlert2, DataTables, Flatpickr. Clone seeder-page.php, use...