Simple e-Wallet application, developed with Ruby on Rails, deployed to a Heroku live server.
The objective of this exercise is to evaluate the analysis capacity, architecture definition and development practices that a candidate has.
Software | Version |
---|---|
PostgreSQL | 9.5.14 |
Ruby | 2.5.1 |
Rails | 5.2.1 |
- Clone repository
# using ssh
$ git clone [email protected]:Memije/eWallet.git
# using https
$ git clone https://github.com/Memije/eWallet.git
- Change working directory
$ cd eWallet
- Install dependencies
$ bundle install
- Initialize Figaro gem
bundle exec Figaro install
- Configure the following environment variables in
config/application.yml
Key | Description |
---|---|
pg_username | PostgreSQL username |
pg_password | PostgreSQL password |
KEY | 256bit (32bytes) secret key |
NOTE: It's important to keep it up to 32 bytes due to OpenSSL's truncation to 32 bytes. You can generate a secure key here.
# config/application.yml
db_username: 'cleverusername'
db_password: 'cleverpassword'
KEY: "kYp3s6v9y$B&E)H+MbQeThWmZq4t7w!z"
- Create, migrate and seed database
$ rake db:create db:migrate db:seed
- Run server
$ rails s
- ???
- PROFIT!!!
- Wallet
- Customer
- CustomerWallet
- CardType
- Card
- TransactionType
- TransactionHistory
- Modify TransactionHistory to be a polymorphic class
- Implement CardTransaction class
- Implement WalletTransaction class
- Refractor TransactionHistory creation method to ensure polymorphism usage