<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>cross-platform on </title>
    <link>/tags/cross-platform/</link>
    <description>Recent content in cross-platform on </description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Mon, 13 Apr 2026 10:00:00 +0800</lastBuildDate><atom:link href="/tags/cross-platform/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Compose Multiplatform 跨端实战：一套代码跑 WASM / Android / iOS 的电商应用</title>
      <link>/posts/kmp-compose-multiplatform-cross-platform/</link>
      <pubDate>Mon, 13 Apr 2026 10:00:00 +0800</pubDate>
      
      <guid>/posts/kmp-compose-multiplatform-cross-platform/</guid>
      <description>📦 本文基于的完整项目源码：https://github.com/meirongdev/shop
2026-04 实践更新 当前主线后端已经完成 RS256 + JWKS、BFF @HttpExchange typed client、以及 Redis/Redisson 统一接入，因此本文里 KMP 前端与后端协作的认证 / API 访问背景，比文章初稿时更加接近真实可运行平台。
Shop Platform 的前端策略是渐进式的：买家门户用 Kotlin + Thymeleaf SSR 承担 SEO 和免登交易路径，交互式购物体验和卖家工作台则采用 Compose Multiplatform 的共享模块实现。当前仓库已经提交了 WASM 目标、Android 包装 App，以及 iOS framework target；但没有把完整 iOS App shell 一起提交。这不是&amp;quot;所有端都用一套代码&amp;quot;的理想化方案，而是当前阶段的折中——SSR 管 SEO，KMP 管交互，各取所需。
整体架构 flowchart TD subgraph KMP[&#34;Compose Multiplatform 分层&#34;] direction TB Core[&#34;core网络层 / 模型 / Session&#34;] Auth[&#34;feature-auth认证流程&#34;] Cart[&#34;feature-cart购物车管理&#34;] Market[&#34;feature-marketplace商品浏览&#34;] Order[&#34;feature-order订单管理&#34;] Profile[&#34;feature-profile用户档案&#34;] Promo[&#34;feature-promotion促销活动&#34;] Wallet[&#34;feature-wallet钱包支付&#34;] UIShared[&#34;ui-shared通用 UI 组件 / 主题&#34;</description>
    </item>
    
  </channel>
</rss>
