Gem Flow is an example app demonstrating how to excecute entire flows with Gem's Api.
Gem Onramp flow demonstrates the steps from creating a user through excecuting a buy transaction using a Plaid linked account (via Wyre).
These steps includes user creation, creating a profile for that user, using this profile to set up a Wyre connection, linking a Plaid account to the Wyre connection, and finally making a transaction with the linked Plaid account.
You must obtain a Gem API Key and Secret pair.
You must have docker installed. Please refer to Docker's official site:
Mac: https://docs.docker.com/docker-for-mac/install/
Windows: https://docs.docker.com/docker-for-windows/install/
git clone git@github.com:GemHQ/gem-flow.git
cd gem-flow
Create a .env
file under <root>/server
directory with your Gem API key & secret and save file. A .env.example
is attached for a full example.
GEM_API_KEY=<your-api-key>
GEM_API_SECRET=<your-api-secret>
Create a .env
file under <root>/client
directory with your Gem API key and Coinbase Client ID and save file. If you do not have a Coinbase Client ID then contact us to supply one.
REACT_APP_GEM_API_KEY=<your-api-key>
REACT_APP_COINBASE_CLIENT_ID=<your-coinbase-client-id>
sh scripts/start.sh
Then navigate to http://localhost:3000
sh scripts/reboot.sh
sh scripts/start.sh
sh scripts/stop.sh
sh scripts/remove.sh
If you run into issues, it will always be resolved by running rebuild.sh. Worst case, restart your docker.
Flow consists of multiple services handling different segments of the stack:
- NodeJS and Express for the backend server
- React frontend with MobX for state management
- PostgreSQL database for managing access tokens
- Docker Compose to orchestrate these services
The backend server uses Gem's Node SDK to authenticate and make requests to the API.