A demo application for "The Composable Atmosphere"
README.md

TCATProto Demo App #

A small Bluesky client and teaching surface for Composable Atmosphere. It is built as a Skip dual-platform Swift app, so the same SwiftUI and TCA feature tree runs on Apple platforms and is translated for Android.

The app is intentionally narrower than Bluesky. Its job right now is to exercise Composable Atmosphere's OAuth, XRPC, lexicon, and TCA integration against real app-view and PDS APIs.

What it does today #

The demo app currently supports:

  • AT Protocol OAuth sign-in using the demo client metadata at https://woody.fm/tcatproto-demo-app/.well-known/oauth-client-metadata.json and the custom callback URL fm.woody:/callback.
  • Root-owned session storage, token refresh, authorization presentation, and error toasts.
  • Base read permissions for profile, feed, and thread APIs at normal sign-in. Like and repost permissions are registered in the app manifest, but requested only when an interaction needs them.
  • A Feeds tab with What's Hot, Blacksky, and Timeline feeds. Feed screens load their first page, paginate as the bottom row appears, and support pull-to-refresh.
  • A Profile tab for woody.fm with profile metadata, counts, banner/avatar rendering, an author feed, and a logout action.
  • Post rows with author identity, relative time, rich text facets, reply/like/ repost counts, images, external cards, quoted posts, record-with-media embeds, and video placeholders.
  • Post detail screens with ancestors, the focused post, nested replies, blocked/not-found placeholders, and collapsible reply branches.
  • Likes, unlikes, reposts, and unreposts with optimistic UI updates, returned record URI storage, rollback on failure, and root-level error reporting.

Project shape #

The package has two Swift products:

  • TCATProtoDemoApp is the app target. It contains the TCA 2 root, tabs, feed list, profile screen, post row/interactions, thread detail, error toasts, and Skip entry point.
  • BlueskyLexicon is a local demo lexicon target. It models the Bluesky values the app currently needs: timelines, feed generators, author feeds, profiles, post threads, embeds, rich text facets, and repo write records for likes and reposts.

This checkout currently uses local path dependencies for Composable Atmosphere and skip-sharing. If you build it outside this workspace, update those paths in Package.swift first.

Current limits #

This is not a full Bluesky client yet. In particular:

  • The default profile and some feed choices are hard-coded for the demo.
  • There is no post composer, reply composer, quote composer, follow/unfollow, search, notifications, moderation surface, lists, DMs, or account switcher.
  • Video embeds render as placeholders instead of playable media.
  • The OAuth app ID and callback URL are configured for Woody's demo environment.

Building #

This project is both a stand-alone Swift Package Manager module and an Xcode workspace that builds and translates the app into a Kotlin Gradle project for Android using Skip's skipstone plugin.

Open Project.xcworkspace for normal app development.

Running #

Xcode and Android Studio must be installed to run the app in the iOS simulator and Android emulator. Start an Android emulator from Android Studio's Device Manager before launching the paired iOS/Android workflow.

From Xcode, run the TCATProtoDemoApp App target. The Xcode build phase deploys the translated Android APK to a running emulator or connected device. iOS logs appear in Xcode. Android logs appear in Android Studio's Logcat tab or through adb logcat.

Testing #

Run the Swift tests with:

swift test

Run Skip parity tests with:

skip test