Something went wrong. Try again.
churn, baby, churn!
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234#import "./doc.typ": *
#show: doc.with( name: "Yifei Sun", id: "002245723", email: "ysun@ccs.neu.edu", institution: "Northeastern University", semester: "Spring 2024", course: "CS 5200", instructor: "Kathleen Durant", title: "Churn - Project Proposal", due: datetime(year: 2024, month: 3, day: 1),)
= Group Information
Group name: SunY
Group member: Yifei Sun
= Introduction
Credit card churing (or simply churing) is a term commonly used in multiplewell-known communities (e.g.#link("https://www.reddit.com/r/churning")[r/churing] on Reddit,#link("https://thepointsguy.com")[The Points Guy],#link("https://www.doctorofcredit.com")[Doctor of Credit], etc.). Simply put, itrefers to the process of consumers applying for credit cards to take advantageof sign-up bonuses (or other promotions) to maximize the amount of "cash back"or "points" they can get. Many fears that churing is illegal or unethical.However, it is not (well, if you follow the terms and conditions). It is simplya way to "earn back" some of the money that consumers have spent.
Churning is fun, but complex. It requires a lot of planning and tracking. Forexample, consumers need to keep track of the credit cards they have applied for,the annual fees they need to pay, the minimum spending they need to meet to getthe sign-up bonuses, etc. Thus, to simplify the bookkeeping, this project aimsto develop a command-line tool to help consumers track their credit card churingactivities (there is no offical survey, but personally, I believe a goodpercentage of churing enthusiasts are tech-savvy and would love to use acommand-line tool).
The motivation behind this project is my personal interest in credit cardchuring and have been annoyed by the lack of a good tool to help me keep trackof my churing activities. I hope this tool can help me and other churingenthusiasts replace to Google Sheets or other manual entry methods.
= Functionalities
The tool, named `churn`, at minimum, will provide the following functionalities:
- Users can add new credit/charge cards, with cards' name, account opening date, annual fee, credit limit (if applicable).- Users can add new bonuses, with bonuses' type (e.g. sign-up bonus, referral bonus, retention offers, regular spending bonus, etc.), the bonus amount and unit, the minimum spending requirement, the bonus expiration date, etc.- Users can add new transactions, with transactions' date, amount, category (e.g. dining, travel, grocery, etc.), and the card used.- Users can derive rewards earned from transactions, either in cash back or points, based on the cards' reward rates and the transactions' categories.
Additionally, financial institutions may have certain restrictions on the numberof credit cards a consumer can apply for. For example, Chase has the infamous5/24 rule, which means that if a consumer has opened 5 or more credit cards inthe past 24 months, they will not be approved for a new Chase credit card. Thus,the tool will also provide the following functionalities:
- Users can assign custom rules to the tool, such as the 5/24 rule, to help them keep track of their eligibility for new credit cards.- Users can check their eligibility for new credit cards for a certain institution based on the rules they have assigned.
Also, basic CRUD operations will be provided for all the data. For example,users might get a credit limit increase, or a bonus might be extended, or anacconut might be closed, etc.
= Implementation
The tool will be implemented in Go with MySQL as the database (as describedabove, entities like cards, bonuses, transactions, etc. have a clear schema,thus a relational database is a good fit). It's expected to be a command-linetool, and it should be able to compile down to a single binary. Some librariesthat will be used include:- MySQL driver for Go- Cobra for command-line interface- Viper for configuration management- ...With the correct setup, the program should be able to run on all major platforms(e.g. Windows, macOS, Linux).
The project structure will be organized as follow:
```txt- cmd/ # command-line interface related code - root.go - ...- doc/ # documentation - ...- internal # core application logic - config/... # config parsing - db/ # session management - mysql.go # MySQL driver - sqlite3.go # SQLite3 driver - ... - migration/ # database migrations - 0001.sql # initial schema - *.sql # other migrations - ...- schema/ - account.go # account entity with Go struct and SQL schema - bank.go # bank entity with Go struct and SQL schema - bonus.go # bonus entity with Go struct and SQL schema - ... # other entities- main.go # entry point- go.{mod,sum} # module files- readme.md- license.txt- ...```
Although the project will use MySQL as the database, it's possible to extend thetool to support other databases (e.g. PostgreSQL, SQLite, etc.) in the future,given the clear separation of the database layer from the core applicationlogic. The database connections are managed by drivers and DSNs, thus, to extendsupport to other databases, we only need to change the driver, DSN, and minorchange in SQL syntax (dialect) if necessary.
#pagebreak()
= Conceptual Design
The tool will have the following entities (6 included, we'll add more ifneeded):
```txt+---------+ +---------+ +--------------------+| Account | is a user account of > | Product | is issued by > | Bank |+---------+------------------------+---------+----------------+--------------------+| id {PK} | 0..* 1..1 | id {PK} | 0..* 1..1 | id {PK} || name | | name | | name || product | | issuer | | max_acconut || opened | | fee | | max_acconut_period || closed | +----+----+ +--------------------+| CL | |+----+----+------------+ 1..1 | | 1..1 | | 1..1 | | | | have bonuses v | | have rewards v | | | | 0..* | | 0..*+----+----+ | +----+-----+| Bonus | | | Reward |+---------+ | make v +----------+| id {PK} | | | id {PK} || type | | | category || spend | | | unit || bonus | | | reward || unit | | | product || acconut | | +----------+| start | || end | | 0..*+---------+ +-------------+ | tx | +-------------+ | id {PK} | | timestamp | | amount | | category | | description | | acconut | +-------------+```
In the implementation:- Cards are representaed as "Account"s and they are instantiation of "Product"s (a bank's payment card product offering).- Card products are issued by banks.- Acconut related restrictions are enforced by the "Bank" entity.- Usually each customer will have different bonuses for different cards and they usually variy from person to person, thus bonuses are associated with "Account"s.- Rewards however, are associated with card product offerings, as they are usually fixed for each card product.- Transactions are associated with "Account"s.
#pagebreak()
= Activity Diagram
```txt+-------+| Start |+---+---+---+--------------+------------+ | ^ ^ ^ v | (quit) | |+---+----+--+ | || Action | | (start transaction, rollback if cannot commit)+---+----+---+-------------+------------+----------------+ | | | | | v v v | v+---+-+ +--------+ +--------+ | +------+| Add | | Update | | Delete | | | Show |+---+-+ +----+---+ +----+---+ | +------+ | | | | v v v v | query db, application restrictions, rewards/+---------------------------------------+ bonuses earned, tx history, etc.| Account (instantiation of Product) | -> new (add), CLI (update), close (delete)| Bank (issuer of Product) | -> new (add), restriction (update)| Bonus (associated with Account) | -> new (add), extention (update), invalid (delete)| Product (card product) | -> product (add), AF incr. (update), discont. (delete)| Reward (associated with Product) | -> new (add), change (update), remove (delete)| Transaction (associated with Account) | -> add (add), add note (update), dispute (delete)+---------------------------------------+```
Users starts the CLI, they can:- Add new cards, update existing cards, or delete cards.- Add new bonuses, extend existing bonuses, change bonus types, change bonus amounts, change bonus validity, or delete bonuses, etc.- Add new transactions, add notes to transactions, dispute transactions, or delete transactions, etc.- Add new banks, update bank restrictions, or delete banks, etc.- Add new card products, update card products, or delete card products, etc.- Add new rewards, change reward amounts, or delete rewards, etc.
I'll provide commonly used banks, card products, and bonus types as defaults,users can add their own if they need to. The tool will also provide a way toquery the information if users need to do so:- Users can query the database to get the rewards and bonuses they have earned, the transactions they have made, the restrictions they have set to the bank, etc.- Users can also query the database to get the information of the cards, bonuses, transactions, etc. that they have added.