Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
settings: { react: { version: '18.2' } },
plugins: ['react-refresh'],
rules: {
'react/jsx-no-target-blank': 'off',
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
}
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
36 changes: 20 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# Banking System

This challenge asks you to put into practice everything you've learned about object oriented programming. Use the concepts we've covered to help organise your code, keep things modular and easy to change.
This project is to practice object oriented programming.

### Core Requirements
## Core

- Deposits and withdrawals
- Account statement (date, credit or debit amount, balance) printing
- You must create at least one test for every function you create
- Create at least one test for every function
- Ability to generate ordered bank statements between 2 dates
- Generate PDFs of bank statements
- A front-end online banking app

### Acceptance criteria

Expand All @@ -16,26 +19,27 @@ This challenge asks you to put into practice everything you've learned about obj
**When** she prints her bank statement
**Then** she would see:

```
```js
date || credit || debit || balance
14/01/2012 || || 500.00 || 2500.00
13/01/2012 || 2000.00 || || 3000.00
10/01/2012 || 1000.00 || || 1000.00
```

### Special Considerations
## Screenshots

Banks usually do not store a "balance" for every single user in their system, an account balance is usually calculated in real time using every transaction that has happened in the account.
- Deposit

Transaction amounts are never stored as floats, they are not precise enough to accurately reflect monetary values when performing math on many transactions. Take some time to consider other potential options.
![Deposit](public/banking-system-deposit.png)

The statement print-out above should be considered a type of user interface, albeit a very simplistic one. Your system should probably output JSON so that various types of user interfaces can consume the data and present it in the appropriate way.
- Withdraw

#### Extensions
- Ability to generate ordered bank statements between 2 dates
- Reject withdrawals if the withdraw amount exceeds the available funds. Available funds must always be calculated based on a complete transaction history, not a variable or property that gets updated
- Allow adding an overdraft to the account
- Different account types (Savings, Investment, Checking). Savings & Investment accounts can't have overdrafts, checking accounts can. Investment accounts accumulate 2% interest every month - this interest is paid directly into the investment account as a credit.
- Deposit limits of 20,000 per year on Savings accounts
- Generate PDFs of bank statements
- A front-end online banking app
![Withdraw](public/banking-system-withdraw.png)

- Print Account Transactions

![Account](public/banking-system-account.png)

- Bank Statement in PDF

![Bank Statement](public/bank-statement.png)
13 changes: 13 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Banking System</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>
16 changes: 16 additions & 0 deletions node_modules/.bin/node-which

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions node_modules/.bin/node-which.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions node_modules/.bin/node-which.ps1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading