Skip to content
bballhausPublic

About

SwiftUI + Firebase iOS app for book clubs: groups, threads, and profiles

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

BookClubB

A SwiftUI iOS app for running online book clubs: join reading groups, start discussion threads, reply, like, and share posts.

BookClubB logo

Features

  • Accounts: email/password sign-up and sign-in with Firebase Authentication (anonymous sign-in is also implemented in AuthViewModel); sign-out from the profile tab.
  • Book groups: browse groups, create a group, and join one (membership is stored on both the group and the user document).
  • Threads and replies: start discussion threads inside a group and reply to them.
  • Likes: like/unlike threads, with per-user like documents and a counter on the thread.
  • Comments: a Comment model exists but is not yet used by any view (replies cover thread discussion).
  • Posts: create and view posts in a home feed.
  • Profiles: view and edit your profile (display name and a profile photo picker; photo upload is not wired to Firebase Storage yet) and see your groups and posts.
  • Navigation: three-tab layout - Home, Groups, Profile (MainTabView).

Tech stack

  • Swift 5, SwiftUI, Combine, PhotosUI
  • Firebase iOS SDK 11.13.0 (exact version) via Swift Package Manager: FirebaseAuth, FirebaseCore, FirebaseFirestore (FirebaseStorage is linked but not yet imported in code)
  • iOS deployment target 18.2, iPhone and iPad
  • Tests: Swift Testing (unit) and XCTest (UI)

Project structure

BookClubB.xcodeproj/        Xcode project (targets: BookClubB, BookClubBTests, BookClubBUITests)
BookClubB/
  BookClubBApp.swift        App entry; configures Firebase, shows CreateAccountView or MainTabView
  *View.swift               SwiftUI screens (HomeView, GroupPageView, GroupDetailView, ThreadDetailView, ...)
  *ViewModel.swift          ObservableObject view models (Auth, GroupDetail, ThreadDetail, Post, Profile)
  BookGroup.swift, GroupThread.swift, Post.swift, Comment.swift, Like.swift, UserProfile.swift
                            Model structs mapped to/from Firestore dictionaries
  Assets.xcassets           App icon, logo, Google logo
  GoogleService-Info.plist  Firebase client config (see Setup)
BookClubBTests/             Unit tests (template)
BookClubBUITests/           UI tests (template)
BCLogo.png                  Logo

Firestore layout used by the code: users/{uid}, posts/{postId}, groups/{groupId}/threads/{threadId} with replies and likes subcollections.

Setup

  1. Install Xcode 16.2 or later (the project was created with Xcode 16.2 and targets iOS 18.2).
  2. Clone the repo and open BookClubB.xcodeproj.
  3. Xcode resolves the Firebase Swift package automatically (File > Packages > Resolve Package Versions if needed).
  4. Create your own Firebase project, add an iOS app whose bundle ID matches the app target, enable Email/Password (and optionally Anonymous) sign-in and Cloud Firestore, then download your GoogleService-Info.plist and replace BookClubB/GoogleService-Info.plist with it.
  5. Set your own development team under Signing & Capabilities, choose a simulator, and run.

Authors

About

SwiftUI + Firebase iOS app for book clubs: groups, threads, and profiles

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages