- App:
CipherChatApp(OneWay/OneWay/App) uses SwiftUI andAppEnvironmentfor dependency injection. - Tabs: Chats · Communities · Calls · Business · Settings. Custom tab bar persists order via
@AppStorage.
- Domain/Models: Strongly typed models for chat, calls, communities, storefronts, AI builder, and service health.
- Domain/Services: Protocol-first boundaries (
AuthService,MessagingService,CryptoService,CallService,CommunityService,BusinessService,AIStorefrontService,SystemHealthManager, etc.). - Infrastructure/Services: Stubs exist for most messaging/calls/community services, while the Business/storefront stack is now wired to a real backend (
NetworkBusinessService,NetworkAIStorefrontService). - Infrastructure/Persistence:
LocalPersistencewith cache policy;StubStorageServicefor ciphertext caching. - Presentation: SwiftUI feature folders per tab; shared UI components in
Presentation/Views/Componentsand theme inPresentation/Theme.
- Encrypted Messaging:
ChatsListView→ChatThreadViewModel→MessagingService(stub usesCryptoService+StorageServiceto encrypt & persist ciphertext). Delivery states modeled viaMessageDeliveryStatus. - Communities/Groups:
CommunitiesViewbacked byCommunityService; detail screen lists groups/members. - Calls (voice/video):
CallServiceabstraction;ChatThreadViewModelstarts calls;PhoneViewkeeps existing UI for recents/contacts. - Business Storefronts (live):
BusinessHomeView+BusinessViewModeluseNetworkBusinessService+NetworkAIStorefrontServiceagainst the Node/Prisma backend inOneWay/server. Seller Studio "Send to AI" callsPOST /api/ai/storefronts/generate, which creates a real storefront row and returns it to the app. - Diagnostics: Settings → Diagnostics shows
SystemHealthManagerstatuses (per service).
cd OneWay/server
cp .env.example .env
npm install
npx prisma migrate dev
npm run devYou should see:
- Local URL:
http://127.0.0.1:3000/health - LAN URL:
http://<your-mac-ip>:3000/health
To enable real OpenAI responses, set OPENAI_API_KEY in OneWay/server/.env. If it is missing, the backend falls back to a local generator (but still creates real storefront records).
The app uses OneWay/OneWay/App/APIConfig.swift as the single source of truth.
- Simulator: set
API_BASE_URLin the Xcode scheme (or edit the fallback). - Real iPhone: set
API_DEVICE_BASE_URLin the Xcode scheme to your Mac LAN URL, e.g.http://192.168.1.126:3000.
Open OneWay/OneWay.xcodeproj in Xcode and run the OneWay target on simulator or a physical device.
- Replace stubs with production services (Signal-style crypto, transport, WebRTC signaling).
- Wire push notifications and background message fetch.
- Persist encrypted payloads with secure enclave/keychain-derived keys.
- Implement real community/group membership + role enforcement.
- Connect CallService to WebRTC stack and signaling backend.
- Add streaming/iterative AI edits (section-level improvements) to the backend and propagate into
Storefrontmodel. - Add tests for service health checks and state flows.