|
1 | 1 | # relibank |
2 | 2 |
|
3 | | -TODOs |
| 3 | +--- |
4 | 4 |
|
5 | | -DB interface python with endpoints for auth service |
6 | | -DONE placeholder for posts/puts, so we can implement adding new accounts later |
| 5 | +### ⚙️ Test connection to New Relic |
7 | 6 |
|
8 | | -DONE In Transactions, add a DB table that stores outstanding balance on a loan/credit account, amount on a checking/savings account |
9 | | -Add Transaction types: |
10 | | -shopping | credit_card | loan | entertainment | utilities | groceries | gas | etc |
| 7 | +1. Connect to the service's container, docker example `docker exec -it bill-pay /bin/sh` |
11 | 8 |
|
12 | | -DONE In Bill Pay, add from/to account |
13 | | -DONE Enforce uniqueness on BillIDs |
14 | | -Check that to/fromaccount is valid, check balance on each before initiating payment or cancel if it's impossible |
| 9 | +2. newrelic-admin validate-config LOCATION_OF_NEWRELIC.INI |
15 | 10 |
|
16 | | -In Accounts, add an account for Relibank that will handle all loan payments. Build out loan payments in the code |
| 11 | +3. If needed, add a logfile to newrelic.ini |
| 12 | +```[newrelic] |
| 13 | +log_file = /app/newrelic.log |
| 14 | +log_level = info |
| 15 | +``` |
17 | 16 |
|
18 | | -Convert logging.info calls to json instead of flat logs |
| 17 | +4. Validate logs with ```docker exec -it bill-pay cat newrelic-agent.log``` |
19 | 18 |
|
20 | | -## Ledger details and decision log |
| 19 | +--- |
21 | 20 |
|
22 | | -Get Ledger/loan/credit card payment history |
23 | | - { |
24 | | - "TransactionID": 1, |
25 | | - "EventType": "BillPaymentInitiated", |
26 | | - "BillID": "BILL-TEST-068", |
27 | | - "Amount": 76.0, |
28 | | - "Currency": "USD", |
29 | | - "ToAccount": 873657890, |
30 | | - "FromAccount": 872347890, |
31 | | - "Timestamp": 1755028460.4713438, |
32 | | - "CancellationUserID": null, |
33 | | - "CancellationTimestamp": null |
34 | | - }, |
| 21 | +### ⚙️ Formatting |
35 | 22 |
|
36 | | - For toaccount, query database and reduce total by amount |
37 | | - for fromaccount, query database and reduce total by amount |
38 | | - |
39 | | - Querying account 1234 |
40 | | - display ledger for current total |
41 | | - query transaction database for every transaction with to or from containing the account 1234 |
42 | | - |
43 | | - Venmo example |
44 | | - You paid x $3.50 |
45 | | - x paid you $4.50 |
46 | | - |
47 | | - Debit acct example |
48 | | - Payment to AmEx -$x.xx |
49 | | - To **xx-444 -$x.xx |
50 | | - DIVIDEND |
51 | | - |
52 | | - Credit acct example |
53 | | - Pending |
54 | | - Active - VendorName -$x.xx |
55 | | - |
56 | | - Activity |
57 | | - Credit Card Payment +$x.xx |
58 | | - Vendor -$x.xx |
59 | | - |
60 | | - Account balance in debit is reduced by $76 |
61 | | - { |
62 | | - "TransactionID": 1, |
63 | | - "EventType": "BillPaidToAccount", |
64 | | - "BillID": "BILL-TEST-068", |
65 | | - "Amount": 76.0, |
66 | | - "Currency": "USD", |
67 | | - "Account": 873657890, |
68 | | - "Timestamp": 1755028460.4713438, |
69 | | - "CancellationUserID": null, |
70 | | - "CancellationTimestamp": null |
71 | | - }, |
72 | | - |
73 | | - |
74 | | - Loan principal is reduced by $76 |
75 | | - { |
76 | | - "TransactionID": 1, |
77 | | - "EventType": "BillPaidFromAccount", |
78 | | - "BillID": "BILL-TEST-068", |
79 | | - "Amount": 76.0, |
80 | | - "Currency": "USD", |
81 | | - "Account": 873657890, |
82 | | - "Timestamp": 1755028460.4713438, |
83 | | - "CancellationUserID": null, |
84 | | - "CancellationTimestamp": null |
85 | | - }, |
86 | | - Get eventtype |
87 | | - edit DB for Account 1234 |
88 | | - Reduce total by Amount |
| 23 | +1. ```ruff format``` https://docs.astral.sh/ruff/formatter/#ruff-format |
0 commit comments