initial commit: Proximity iOS app proposal, full Swift code scaffold, reference backend, testing docs, generated Xcode project

This commit is contained in:
2026-08-12 00:22:01 +00:00
commit 9d1b0f8dd9
52 changed files with 6271 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
import Foundation
/// A fully revealed, mutually-consented connection between two present users.
///
/// Connections can **only** be created from a mutual `Encounter`. There is no
/// path to create one online you must have been physically near each other.
struct Connection: Identifiable, Codable, Hashable {
let id: UUID
let encounterID: UUID
let remoteUserID: String
let displayName: String
let createdAt: Date
let lastMessageAt: Date?
/// The E2E session key used for this conversation.
let sessionKeyID: String
init(
id: UUID = UUID(),
encounterID: UUID,
remoteUserID: String,
displayName: String,
createdAt: Date = Date(),
lastMessageAt: Date? = nil,
sessionKeyID: String
) {
self.id = id
self.encounterID = encounterID
self.remoteUserID = remoteUserID
self.displayName = displayName
self.createdAt = createdAt
self.lastMessageAt = lastMessageAt
self.sessionKeyID = sessionKeyID
}
}