A toy banking application.
- Ruby (See .ruby-version file for the exact Ruby version)
- Postgresql
(See Dockerfile for further details)
To create both the test and development databases:
bin/rails db:create
To ensure the database is setup:
bin/rails db:prepare
...or to destructively reset the database:
bin/rails db:reset
To run a development server, run the following from the root of the project directory:
bin/rails server
The app will be available locallys at http://localhost:3000/
To run the full test suite:
bundle exec rspec
For testing in development, there is the following seed data.
user1:
email: [email protected]
password: Password123!!
user2:
email: [email protected]
password: Password123!!
system_account:
reference: 4605e852-61b3-47da-9de5-8068fa7172ac
user1_account:
reference: 0f85a4fb-0f5e-479e-898b-b57866b08b9e
user2_account:
reference: c3c7f394-3569-4c95-b4ab-9232e21079dc
- Refactors
- Encapsulate queries to scopes
- More helper methods in controllers (or more service objects)
- Extract account creation logic from AccountsController
- etc...
- More validations
- payment amount not more than account balance
- payment not from and to the same account
- etc...
- More tests
- Unit tests for Payment model
- Unit tests for MoneyTransactionCreationService
- multiple simultaneous payments involving the same accounts
- Better styling of views
- Sort out favicon