GitHunt
AS

asperez26/FavoriteBooksApp

A SwiftUI app that displays a list of books by genre, featuring favorites management and reactive UI using @State and @Binding.

๐Ÿ“š Favorite Books App (SwiftUI)

An iOS SwiftUI application that displays a list of books grouped by genre, allowing users to mark their favorite titles and explore details.
Built with @State, @Binding, and NavigationStack to demonstrate reactive UI and modern SwiftUI architecture.
Developed as part of an academic project at Seneca Polytechnic.


๐Ÿš€ Features

  • ๐Ÿ“– Book List by Genre โ€” View books organized in sections by genre
  • โค๏ธ Favorites Management โ€” Mark or unmark books as favorites with state synchronization
  • ๐Ÿ” Book Details โ€” View book cover, author, and description on a dedicated screen
  • ๐Ÿงญ Smooth Navigation โ€” Uses NavigationStack and NavigationLink for detail transitions
  • ๐Ÿ’พ Local Data โ€” Sample data file showcasing list rendering with ForEach
  • ๐ŸŽจ Modern SwiftUI Design โ€” Minimal and responsive layout using declarative syntax

๐Ÿงฉ Architecture Overview

The app follows a declarative SwiftUI structure, using reactive data flow between views.

Models

  • Book.swift โ€” Defines the book model (Identifiable, Hashable) with properties for title, author, genre, and favorite state
  • SampleData.swift โ€” Contains static sample book data used to populate the list

Views

  • ContentView.swift โ€” Root view with tab navigation for All Books and Favorites
  • BookDetailView.swift โ€” Displays selected bookโ€™s details and favorite toggle
  • FavoritesView.swift โ€” Shows all user-favorited books

Entry Point

  • FavoriteBooksAppApp.swift โ€” Appโ€™s main entry using @main and WindowGroup

๐Ÿง  Key Technical Highlights

  • Framework: SwiftUI
  • State Management: @State and @Binding
  • Navigation: NavigationStack + NavigationLink
  • UI Components: List, Section, TabView, Image, Toggle
  • Data Flow: Real-time updates using reactive state bindings
  • Code Design: Struct-based modular views with helper methods

๐Ÿ“ธ App Preview


๐Ÿ‘ฉโ€๐Ÿ’ป Author

Andrea Selina Perez
๐Ÿ“ Seneca Polytechnic โ€“ Computer Programming (iOS & Data Structures focus)
๐Ÿ“ซ andreaselinaperez26@gmail.com
๐ŸŒ GitHub Profile


โญ If you liked this project, consider giving it a star on GitHub!

asperez26/FavoriteBooksApp | GitHunt