Developer Portal & App Ecosystem Milestones
Planning document for the Mosis app development, distribution, and monitoring ecosystem.
Overview
Decision Areas
| Area |
Options |
Status |
| Web Stack |
Node/Express, Go, Rust/Axum, .NET |
TBD |
| Database |
PostgreSQL, SQLite, MongoDB |
TBD |
| Auth |
OAuth2/OIDC, API keys, JWT |
TBD |
| CDN/Storage |
S3, Cloudflare R2, self-hosted |
TBD |
| Telemetry |
Custom, PostHog, Plausible |
TBD |
| Crash Reports |
Sentry, custom, Crashlytics |
TBD |
| App Format |
ZIP, custom package, signed |
TBD |
Milestone 1: App Package Format
Goal: Define how apps are bundled, signed, and validated.
Questions to Answer
- What files comprise an app package?
- How is the manifest structured?
- How are apps signed for integrity?
- How are updates handled (full vs delta)?
- What metadata is required (name, version, permissions, icons)?
Considerations
| Approach |
Pros |
Cons |
| ZIP archive |
Simple, standard tooling |
No built-in signing |
| Custom format (.mosis) |
Can embed signature, metadata |
Custom tooling needed |
| Signed ZIP |
Best of both, detached signature |
Slightly more complex |
Proposed Structure
Manifest Schema (Draft)
Deliverables
Milestone 2: Web Stack Selection
Goal: Choose backend technologies for the developer portal and app store.
Options Analysis
Option A: Node.js + Express/Fastify
| Aspect |
Details |
| Language |
TypeScript |
| Framework |
Express, Fastify, or Hono |
| Pros |
Large ecosystem, easy hiring, fast development |
| Cons |
Single-threaded, callback complexity |
| Hosting |
Vercel, Railway, any VPS |
Option B: Go
| Aspect |
Details |
| Language |
Go |
| Framework |
Gin, Echo, or Chi |
| Pros |
Fast, low memory, single binary deployment |
| Cons |
Smaller ecosystem, verbose error handling |
| Hosting |
Any VPS, Cloud Run |
Option C: Rust + Axum
| Aspect |
Details |
| Language |
Rust |
| Framework |
Axum, Actix-web |
| Pros |
Maximum performance, memory safety |
| Cons |
Steep learning curve, slower development |
| Hosting |
Any VPS, Fly.io |
Option D: .NET
| Aspect |
Details |
| Language |
C# |
| Framework |
ASP.NET Core |
| Pros |
Enterprise-ready, great tooling, fast |
| Cons |
Heavier runtime, Microsoft ecosystem |
| Hosting |
Azure, any VPS |
Evaluation Criteria
- Development speed - How fast can we iterate?
- Performance - Can it handle scale?
- Hosting cost - Monthly infrastructure cost
- Team familiarity - Learning curve
- Ecosystem - Libraries for auth, storage, etc.
Deliverables
Milestone 3: Database Selection
Goal: Choose database for developer accounts, app metadata, analytics.
Options Analysis
Option A: PostgreSQL
| Aspect |
Details |
| Type |
Relational |
| Pros |
ACID, JSON support, mature, scalable |
| Cons |
Requires management, connection pooling |
| Hosting |
Supabase, Neon, RDS, self-hosted |
Option B: SQLite + Litestream
| Aspect |
Details |
| Type |
Embedded relational |
| Pros |
Zero ops, fast reads, simple backup |
| Cons |
Single-writer, limited concurrency |
| Hosting |
Embedded in app server |
Option C: MongoDB
| Aspect |
Details |
| Type |
Document |
| Pros |
Flexible schema, easy start |
| Cons |
Less ACID, can get expensive |
| Hosting |
Atlas, self-hosted |
Data Models Preview
Deliverables
Milestone 4: Authentication System
Goal: Secure developer authentication and app signing.
Developer Authentication
| Method |
Use Case |
| OAuth2 (GitHub/Google) |
Portal login |
| Email + Password |
Alternative login |
| API Keys |
CLI tools, CI/CD |
| JWT |
Session tokens |
App Signing
| Approach |
Details |
| Developer keypair |
Dev signs with private key, we verify with public |
| Platform signing |
We sign after review (like iOS) |
| Both |
Dev signs, we countersign after review |
Key Management
- Developer generates keypair locally
- Public key uploaded to portal
- Private key never leaves developer machine
- Key rotation supported
Deliverables
Milestone 5: Developer Portal Frontend
Goal: Web interface for developer account and app management.
Pages Required
| Page |
Features |
| Landing |
Sign up, sign in, overview |
| Dashboard |
App list, quick stats |
| App Details |
Versions, analytics, settings |
| Create App |
Wizard for new app |
| Submit Version |
Upload, release notes, submit |
| API Keys |
Generate, revoke keys |
| Profile |
Account settings, keys |
| Docs |
SDK docs, API reference |
Tech Options
| Option |
Pros |
Cons |
| Next.js |
SSR, React, full-stack |
Complexity |
| SvelteKit |
Fast, simple, SSR |
Smaller ecosystem |
| Astro + React |
Static + islands |
Newer |
| Plain HTML + htmx |
Simple, fast |
Limited interactivity |
Deliverables
Milestone 6: App Store Backend API
Goal: REST/GraphQL API for app submission, review, and distribution.
API Endpoints (Draft)
Deliverables
Milestone 7: CDN & Storage
Goal: Scalable storage for app packages and assets.
Requirements
- Store app packages (.mosis files)
- Serve downloads globally with low latency
- Handle icons and screenshots
- Version retention policy
- Bandwidth cost management
Options
| Option |
Pros |
Cons |
| Cloudflare R2 |
No egress fees, global |
Newer service |
| AWS S3 + CloudFront |
Mature, reliable |
Egress costs |
| Backblaze B2 + Cloudflare |
Cheap storage, free egress via CF |
More setup |
| Self-hosted MinIO |
Full control |
Ops burden |
Storage Structure
Deliverables
Milestone 8: Telemetry System
Goal: Collect app usage analytics and crash reports.
Event Types
| Category |
Events |
| Lifecycle |
app_start, app_stop, app_crash |
| Performance |
frame_time, memory_usage, lua_errors |
| Usage |
screen_view, button_click (opt-in) |
| System |
mosis_version, device_info |
Privacy Considerations
- No PII by default - Device ID is hashed, no user data
- Opt-in for detailed analytics - User consent required
- Data retention - Auto-delete after X days
- GDPR compliance - Export/delete on request
- Aggregation - Store aggregates, drop raw after processing
Options
| Option |
Pros |
Cons |
| Custom |
Full control, no vendor lock |
Build everything |
| PostHog |
Self-hostable, feature-rich |
Can be heavy |
| Plausible |
Privacy-focused, simple |
Limited features |
| Segment + warehouse |
Flexible routing |
Complex, costly |
Crash Report Schema
Deliverables
Milestone 9: App Review System
Goal: Automated and manual review process for app submissions.
Automated Checks
| Check |
Description |
| Manifest validation |
Required fields, valid permissions |
| Package integrity |
Signature verification |
| Static analysis |
Dangerous Lua patterns |
| Asset validation |
Icons present, correct sizes |
| Size limits |
Package under max size |
| Duplicate detection |
Same app ID collision |
Manual Review (Optional)
- Flag for manual review based on:
- New developer (first app)
- Dangerous permissions requested
- Automated check warnings
- User reports
Review States
Deliverables
Milestone 10: Device-Side App Management
Goal: Install, update, and manage apps on Mosis devices.
Components
| Component |
Location |
Purpose |
| App Manager |
MosisService |
Install/uninstall/update apps |
| App Store Client |
System app |
Browse, search, install UI |
| Update Checker |
Background service |
Check for updates |
Installation Flow
Update Flow
Storage Layout
Deliverables
Milestone 11: Developer CLI Tool
Goal: Command-line tool for app development workflow.
Commands
Implementation Options
| Option |
Pros |
Cons |
| Node.js (oclif) |
Easy to build, npm distribution |
Requires Node |
| Go |
Single binary, fast |
Slower development |
| Rust (clap) |
Single binary, fast |
Slower development |
Deliverables
Milestone 12: Documentation Site
Goal: Comprehensive docs for developers.
Sections
| Section |
Content |
| Getting Started |
Quick start, first app tutorial |
| Guides |
UI design, Lua scripting, permissions |
| API Reference |
All Lua APIs, manifest schema |
| CLI Reference |
All commands and options |
| Best Practices |
Performance, security, UX |
| Troubleshooting |
Common issues, FAQ |
Tech Options
| Option |
Pros |
Cons |
| Docusaurus |
React-based, versioning |
Heavy |
| VitePress |
Vue-based, fast |
Less features |
| Astro Starlight |
Fast, modern |
Newer |
| MkDocs |
Python, simple |
Less customizable |
Deliverables
Summary
| Phase |
Milestones |
Description |
| Foundation |
1-4 |
Package format, web stack, database, auth |
| Portal |
5-6 |
Developer portal frontend and API |
| Distribution |
7, 10 |
CDN/storage, device-side app management |
| Quality |
8-9 |
Telemetry, crash reports, review system |
| Tooling |
11-12 |
CLI tool, documentation |
Recommended Order
- Milestone 1 - Package format (needed by everything)
- Milestone 2 - Web stack selection
- Milestone 3 - Database selection
- Milestone 4 - Authentication
- Milestone 6 - Backend API
- Milestone 5 - Portal frontend
- Milestone 7 - CDN/storage
- Milestone 10 - Device-side management
- Milestone 11 - CLI tool
- Milestone 9 - Review system
- Milestone 8 - Telemetry
- Milestone 12 - Documentation
Open Questions
- Monetization model? - Free only, paid apps, subscriptions?
- Enterprise/self-hosted? - Can companies run private app stores?
- App categories? - Predefined or free-form tags?
- Rating/reviews? - User reviews for apps?
- Analytics dashboard? - What metrics do developers see?
- Localization? - Multi-language portal and apps?
- Beta testing? - TestFlight-like distribution?
- Team accounts? - Multiple developers per app?
Next Steps
Begin with Milestone 1 (App Package Format) to establish the foundation, then proceed with technology selections in Milestones 2-4 before building the portal.