Skip to content

A SwiftUI-based recipe management app that allows users to create, view, and store their favorite recipes. It features user authentication through Firebase, recipe data storage with Firestore, and image uploads via Firebase Storage. This project showcases the use of modern SwiftUI, async/await for asynchronous operations.

Notifications You must be signed in to change notification settings

JoySwaroop/CookBook-IOS_SwiftUI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

CookBook App 🍳

What is this App All About

This is a SwiftUI app that allows users to manage their personal recipes. Users can sign up and log in to their accounts to view, add, and see the details of their recipes. The app uses Firebase for authentication, storing recipe data in Firestore, and saving recipe images to Firebase Storage.

  • User Authentication: Secure sign-up and login functionality implemented with Firebase Authentication.
  • Recipe Management: Users can create new recipes by providing a name, preparation time, cooking instructions, and an image.
  • Firebase Backend: The app is powered by Firebase, using Firestore as the database for recipe information and Firebase Storage for image hosting.
  • Asynchronous Operations: Modern concurrency with async/await is used for all network requests to Firebase, ensuring a smooth and responsive user experience.
  • SwiftUI Views: The user interface is built with SwiftUI, featuring views for authentication, a main recipe gallery, detailed recipe views, and a form for adding new recipes.
  • Image Handling: Users can upload recipe images from their photo library using PhotosPicker or take a new photo using the camera.

What I have learned

  • Firebase Integration: I learned how to set up and use Firebase services in a SwiftUI application, including Firebase Authentication for user management, Firestore for data persistence, and Firebase Storage for file uploads.
  • Asynchronous Programming with async/await: I utilized async/await to handle all asynchronous tasks, such as signing users in, fetching recipe data, and uploading images, which simplifies the code and improves readability.
  • SwiftUI and MVVM: I applied the MVVM (Model-View-ViewModel) architecture to structure the app, separating the UI logic in Views from the business logic in ViewModels. I used @StateObject and @Observable to manage the state and data flow.
  • SwiftUI Views and Components: I gained experience in building a variety of SwiftUI views and creating reusable UI components, such as a LazyVGrid for displaying recipes, custom button styles, and loading indicators.
  • Image Picking and Handling: I implemented image selection from the user's photo library with PhotosPicker and created a UIViewControllerRepresentable wrapper for UIImagePickerController to provide camera functionality.

Note

  • To run this app on your device, you need to create a Firebase project and add your own GoogleService-Info.plist file to the project.
  • Make sure to enable Firebase Authentication (Email/Password), Firestore, and Firebase Storage in your Firebase project console.

Demo

demo.mp4

About

A SwiftUI-based recipe management app that allows users to create, view, and store their favorite recipes. It features user authentication through Firebase, recipe data storage with Firestore, and image uploads via Firebase Storage. This project showcases the use of modern SwiftUI, async/await for asynchronous operations.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages