Skip to content
No description, website, or topics provided.
Crystal JavaScript Ruby Objective-C Gherkin Shell Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

README.md

Sikoba

Server and mobile application implementing peer-to-peer IOU platform.

This is a monorepo currently consisting of 2 modules:

  • SikobaApp is the React Native mobile application
  • sikoba contains the web server for the gateway, written in Crystal using the Lucky Framework, as well as the transaction processor

See the README files inside each module for further instructions.

Initial server setup

This project uses Docker to run the storage dependencies (PostgreSQL and Redis) and the server in development mode.

  1. Run docker-compose build to build the image for Lucky + dependencies
  2. Setup Crystal project, create the database and run migrations:
$ docker-compose run --rm server bash
server:/app/sikoba# bin/setup

Development workflow

Start the containers with:

$ docker-compose up

This will start up the PostgreSQL database, the Redis database, a container for the web server and one for the transactions processor.

The web server will respond at http://localhost:5000/ . Both the web server and the transaction processor will recompile and restart on source modifications in the sikoba/src directory.

Start the mobile application on Android:

$ cd SikobaApp
$ yarn android
$ adb reverse tcp:5000 tcp:5000

The last command is needed for the application in the emulator to be able to connect to the development server.

If you are using an Android emulator, you need to start it before running this command. See below.

Or, start the mobile application on iOS:

$ cd SikobaApp
$ yarn ios

Android emulator

The easiest way to start the Android emulator is through Android Studio. Open the project at SikobaApp/android. Go to Tools -> AVD Manager and create or select an existing virtual device and start it up.

Once the virtual device is created, it can be started from the command line. Run $ANDROID_HOME/emulator/emulator -avd YOUR_AVD_DEVICE_NAME, where ANDROID_HOME is the root directory for the Android SDK (/usr/local/share/android-sdk if using Homebrew). You can list the AVD device names with $ANDROID_HOME/emulator/emulator -list-avds.

Integration tests

Calabash is used to run the integration tests.

Once you have started the containers and the mobile application you can execute the integration suites:

Run bundle install to install the required gems.

And execute the tests:

$ cd Sikoba
$ bundle exec calabash-android run /path/to/the/apk email=[your_email] password=[your_password]

=======

You can’t perform that action at this time.