Server and mobile application implementing peer-to-peer IOU platform.
This is a monorepo currently consisting of 2 modules:
SikobaAppis the React Native mobile application
sikobacontains the web server for the gateway, written in Crystal using the Lucky Framework, as well as the transaction processor
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.
docker-compose buildto build the image for Lucky + dependencies
- Setup Crystal project, create the database and run migrations:
$ docker-compose run --rm server bash server:/app/sikoba# bin/setup
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
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
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
Calabash is used to run the integration tests.
Once you have started the containers and the mobile application you can execute the integration suites:
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]