# Credit Helper
## Table of Contents
1. [Overview](#Overview)
1. [Product Spec](#Product-Spec)
1. [Wireframes](#Wireframes)
2. [Schema](#Schema)
## Overview
### Description
Building a good credit score takes many years, but one of the metrics that most influences the score is credit utilization. When it comes to improving the health of your credit, this metric is decisive to obtain a healthy score that can be crucial for the approval of cars, housing and loans. Because of these motivations, I developed the Credit Helper app where in one place you can manage and make informed decisions about the current use of your credit.
### App Evaluation
[Evaluation of your app across the following attributes]
- **Category:** Finance
- **Mobile:** The app will be at the moment exclusively for mobile since most payment are done via banking apps.
- **Story:** Analyzes current credit utilization to provide the user an easier understanding of the overall debt and how it can be affecting his current score.
- **Market:** Any individual wanting to sustain or improve credit scores.
- **Habit:** The app might be used weekly depending on how many credit cards bill the user has.
- **Scope:** Same as market.
## Product Spec
### 1. User Stories (Required and Optional)
**Required Must-have Stories**
* The app allows you to add multiple credit cards in an interface designed to be friendly and at the same time familiar to the native application interface of Apple platforms. When adding cards, the user can generate a reminder notification of the payment due date, which is indicated in the list of cards when the notification is on with the date. On the main card screen, you can find out the status of your use of credit by individual card, where the user can immediately understand which card requires the most attention. A summary of the amount of credit available is provided in the same menu. If the user has issued a payment, they can swipe the card and mark it as paid. The Helper menu offers recommendations based on your current credit utilization situation and calculates the amount necessary to pay to reach the desired utilization percentage, thus helping the user make informed decisions when paying their card balance of credit.
- [x] Add multiple credit cards including names, balance, limits and bill due date.
- [x] Create notifications at 9am of each card due date.
- [x] Show a list of all credit cards with info about them at a glance. (Balance, due date, Credit utilization)
- [x] Allow access to mark as paid with table view swipe gesture.
- [x] Helper tab that advise the user about the current economic situation and how to improve it.
**Optional Nice-to-have Stories**
* Get info from Plaid or Google Pay to populate the credit list
* Get deals for users by web scraping (app specific deals can also be good to consider)
### 2. Screen Archetypes
* Sign In & Sign Up Screen
* Users get their unique account and and unique tips
* Welcome Screen
* Credit Card List View
* Upon adding your first card the list will be populated on a tableview with credit limit details and the percentage of credit used.
* Add/Edit card view
* The view should allow name the card set credit limit and debt
* Create bill reminders
* Helper View
* The view should give the user tips to improve his credit based on the current debts.
### 3. Navigation
**Tab Navigation** (Tab to Screen)
* Cards
* Helper
**Flow Navigation** (Screen to Screen)
* Welcome Screen if user is new
* Credit card list
* Add button in top navigation controller
* If card is clicked edit the card
* Helper tab
* Calculate the amount to paid to reach certain percentage
## Wireframes
### [BONUS] Digital Wireframes & Mockups
### [BONUS] Interactive Prototype






## Schema
[This section will be completed in Unit 9]
### Models
Note: The following models can change during the development stage to accommodate new features. Models are not final.



### Networking
* Add a Card
* (Create/POST) Create a new card object
```ruby
func createNewCardWith(_ card: Card) -> PFObject {
let tempCard = PFObject(className: "Cards")
tempCard["name"] = card.name
tempCard["monthlySpending"] = card.monthlySpending
tempCard["creditLimit"] = card.creditLimit
tempCard["style"] = card.style
tempCard["dueDate"] = card.dueDate
tempCard["isReminderActive"] = card.isReminderActive
tempCard["wallet"] = parseWallet
return tempCard
}
destinationViewController.onSave = { newCard in
self.parseWallet.add(self.createNewCardWith(newCard), forKey:"cards")
self.parseWallet.saveInBackground { (success, error) in
if (success) {
print("Card saved")
DispatchQueue.main.async {
self.loadWallet()
self.loadSummary()
self.tableView.reloadData()
}
} else {
print("Error: \(error?.localizedDescription)")
}
}
}
```
* Edit a card
```ruby
func editCardOnServerWith(_ card: Card, referencing referenceCard: PFObject) {
let query = PFQuery(className:"Cards")
query.getObjectInBackground(withId: referenceCard.objectId!) { cardOnServer, error in
if error != nil {
print(error?.localizedDescription)
} else if let cardOnServer = cardOnServer {
cardOnServer["name"] = card.name
cardOnServer["monthlySpending"] = card.monthlySpending
cardOnServer["creditLimit"] = card.creditLimit
cardOnServer["style"] = card.style
cardOnServer["dueDate"] = card.dueDate
cardOnServer["isReminderActive"] = card.isReminderActive
cardOnServer["wallet"] = self.parseWallet
cardOnServer.saveInBackground { success, error in
if (success) {
print("Card saved")
DispatchQueue.main.async {
self.loadWallet()
self.loadSummary()
self.tableView.reloadData()
}
} else {
print("Error: \(error?.localizedDescription)")
}
}
}
}
}
```
- Card Summary View
* (Read/GET) Query all cards where user is current user
```ruby
let query = PFQuery(className:"Wallet")
query.whereKey("owner", equalTo:PFUser.current()?.username)
query.findObjectsInBackground { (objects: [PFObject]?, error: Error?) in
if let error = error {
// Log details of the failure
print(error.localizedDescription)
} else if let object = objects?[0] {
self.parseWallet = object
if self.parseWallet["cards"] != nil,
let cards = self.parseWallet["cards"] as? [PFObject] {
self.parseCards = cards
}
if !self.parseCards.isEmpty {
self.loadCards()
}
}
}
```
- Tips Page
*Same code as the Card Summary View*
## Build Progress
Unit 8

Unit 9
