alexsuarez33 / Doggy_Depot

1 stars 1 forks source link

Doggy Depot

Table of Contents


Overview

Description

Doggy Depot is an interactive app designed for dog owners, providing an intuitive platform to browse, purchase, and manage products for their pets. Users can create personalized pet profiles to receive tailored product recommendations. The app includes a shopping cart, wishlist, and future plans for subscriptions and secure checkout options.

App Evaluation


Product Spec

User Stories

Required Must-have Stories [] Users can create an account and log in. [] Users can create/manage pet profiles with details (breed, age, size, etc.). [] Users can browse products by category. [] Users can add products to the shopping cart and wishlist.

Optional Nice-to-have Stories []Recurring product subscriptions (e.g., for food). [] Multiple payment options and order tracking.

Screen Archetypes

[] Login Screen: User authentication. [] Home Screen: Browse product categories. [] Wish List Screen: save favourite products. [] Product Details Screen: View product information; add to cart/wishlist. [] Shopping Cart Screen: Review items and proceed to checkout.


Wireframes

Screenshot 2024-11-08 at 8 02 39 PM Screenshot 2024-11-08 at 8 03 17 PM

Schema

Models

User Property Type Description
username String Unique ID for the user
password String User password
email String User email address
address String? User’s shipping address
shoppingCart [Product] Products in the shopping cart
wishlist [Product]? Products saved for later
pets [Pet]? List of registered pets
Pet Property Type Description
name String Pet's name
breed String Pet's breed
color String? Pet's color
size String Pet's size
healthIssues [String]? Health issues
age Int? Pet's age
weight Int? Pet's weight
Product Property Type Description
name String Product name
brand String Product brand
category String Product category
images [URL] Image URLs
size String? Product size
description String Product description
relatedProducts [Product] Suggested products

Networking

List of Network Requests by Screen

Progress - Antonella Quiroga

Progress Image Progress Image

Parse Network Request Snippets

Here are Parse request snippets for common actions:

User Login:


PFUser.logInWithUsername(inBackground: username, password: password) { (user, error) in
    if let user = user {
        // Login successful
    } else if let error = error {
        print("Error: \(error.localizedDescription)")
    }
}
---
## add products to cart

let cartItem = PFObject(className: "Cart")
cartItem["userId"] = currentUserId
cartItem["productId"] = productId
cartItem.saveInBackground { (success, error) in
    if success {
        print("Product added to cart")
    } else if let error = error {
        print("Error: \(error.localizedDescription)")
    }
}
## Fetch Wishlist

let query = PFQuery(className: "Wishlist")
query.whereKey("userId", equalTo: currentUserId)
query.findObjectsInBackground { (objects, error) in
    if let wishlistItems = objects {
        // Process wishlist items
    } else if let error = error {
        print("Error: \(error.localizedDescription)")
    }
}

## Update Pet Profile

let petQuery = PFQuery(className: "Pet")
petQuery.getObjectInBackground(withId: petId) { (pet, error) in
    if let pet = pet {
        pet["healthIssues"] = newHealthIssues
        pet.saveInBackground { (success, error) in
            if success {
                print("Pet profile updated")
            } else if let error = error {
                print("Error: \(error.localizedDescription)")
            }
        }
    }
}
https://docs.google.com/document/d/19D33ABBR6yi5WAvkgx1JlFvmGY4uDTgIiH_vPdIV8Mg/edit?usp=sharing