- Grape For fast and well designed API
- Swagger for interactive API documentation
- Grape::Entity for api presenters
- Ruby (2.5.8)
- RSpec For Unit & API Tests
- Capybara For UI tests
- Best CSV tool ever - SmarterCSV
- Custom ideally horizontal scaling API authentication based on JWT JWT
- Pry For Easy Debugging And Code Inspecting
- Sidekiq for background jobs, sidekiq-scheduler for scheduling
- Draper for views wrappers
- Rails 5.2.4.3 - this version was released at May 18, 2020, Rails 6 was incopable with some technologies that are using here
- Devise for simple UI authentication
- state_machine for different transaction types statuses
- Bootstrap
- Service Objects - based on Command (for authentication) & Strategy for user input processing
- Convention Over Configuration principle used for complex user params processing at API
- Form Objects - used together with service objects - they encapsulates validation logic to make new Transactions approved, or move them to error state (Context pattern with service strategy)
- Special State Machine for each transaction type - for more flexibility
- Presenters - including special presenter for form result
- Wrappers (Draper's decorators)
- MySQL Enum instead of rails enum
- Foreign Keys for dependent tables
- STI for Transactions
- CSV import works using also Service Objects & Form Objects
- Optimistic locks for merchants & transactions to prevent double changes
- System support 4 different types of transactions
- Transactions can be dependent to each other
- Transactions should be created and moved to status 'error' when they are partially invalid, so we cannot use plain rails validations practice, and should have validations at forms & models
- Merchants can moved to inactive status - so system will not create new transactions for such merchants
- To remove merchant - merchant should have 0 transactions, that can be done after removing transactions by schedule
- User will be able to upload csv with different fields in different order, but some of them are required
- Removing Job runs by schedule every hour, and remove all transactions that related to authorize transactions that were created more than one hour ago, this is needed to have referential integrity
- System has different UI's for admins and merchants
- System has seeds for basic data
- Tests Coverage 98% by SimpleCov, including browser tests, api tests, and unit tests for services
- Code Inspected by RuboCop, no offenses detected
- Code Inspected for security vulnerabilities by Brakeman, no warnings found
- Ruby = 2.5.8
- MySQL
- Redis
- Go to project's folder in your terminal
- set
PaymentSystem_DATABASE_PASSWORD
- Run
bundle
- Run
rake db:setup
- Start server
rails s
- Start background job
bundle exec sidekiq
- Go to
http://localhost:3000/
- Start server
rails s
- Go to
http://localhost:3000/documentation
- Start server
rails s
- Go to
http://localhost:3000/sidekiq
rake db:seed
rspec spec/
- Not At
.gitignore
for easy review - Open In Browser
coverage/index.html
- Run
rubocop