Skip to content

Neilos/cat_bank

Repository files navigation

README

Project Overview

A toy banking application.

System dependencies

  • Ruby (See .ruby-version file for the exact Ruby version)
  • Postgresql

(See Dockerfile for further details)

Database creation

To create both the test and development databases:

bin/rails db:create

Database setup

To ensure the database is setup:

bin/rails db:prepare

...or to destructively reset the database:

bin/rails db:reset

Development

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/

Tests

To run the full test suite:

bundle exec rspec

Seed data

For testing in development, there is the following seed data.

Users:

user1:
  email: [email protected]
  password: Password123!!

user2:
  email: [email protected]
  password: Password123!!

Accounts:

system_account:
  reference: 4605e852-61b3-47da-9de5-8068fa7172ac

user1_account:
  reference: 0f85a4fb-0f5e-479e-898b-b57866b08b9e

user2_account:
  reference: c3c7f394-3569-4c95-b4ab-9232e21079dc

To do

  • 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

About

Toy banking application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published