Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nymtech/bity-interface
Nym exchange interface
https://github.com/nymtech/bity-interface
Last synced: 6 days ago
JSON representation
Nym exchange interface
- Host: GitHub
- URL: https://github.com/nymtech/bity-interface
- Owner: nymtech
- License: mpl-2.0
- Created: 2022-11-17T09:42:53.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-28T12:43:41.000Z (9 months ago)
- Last Synced: 2024-02-28T13:48:28.615Z (9 months ago)
- Language: CSS
- Homepage:
- Size: 1.91 MB
- Stars: 8
- Watchers: 6
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Nym Exchange Interface
Web exchange interface built with [Bity](https://bity.com/) API.
The server side is built with [axum](https://github.com/tokio-rs/axum).## Install
First provide the required environment variables. For convenience
you can copy over the content of `.env.sample` into a new `.env` file.Then you need to provide Bity configuration. For convenience you
can copy over the content of `bity_config.sample.json` into a new
`bity_config.json` file. For reference see
https://www.npmjs.com/package/@bity/preact-exchange-clientThe server uses [GeoLite2](https://dev.maxmind.com/geoip/geolite2-free-geolocation-data)
database for IPs geolocation (in order to prevent exchange service
access to US american IPs, and to stay compliant with the US law).To automatically install (and update) the binary database you can
use the provided docker service:```shell
docker compose up -d
```## Dev
```shell
cargo run
```NOTE: to run the UI locally, first change in `assets/index.html`
the config URL:```
// const res = await fetch("https://buy.nymtech.net/config");
const res = await fetch("http://localhost:4000/config");
```## Build
```shell
cargo build --release
```## Production
The binary server needs access to:
- `assets` directory containing the website static files
- Bity config file `bity_config.json`
- GeoLite2 country database filePaths to these files can be provided respectively by the following
env variables: `ASSETS_DIRECTORY`, `BITY_CONFIG_PATH` and
`GEOIP_DB_PATH`.#### How it is built
In `assets` folder some files have been imported (copied as is) from `@bity/preact-exchange-client` sources
- `bity-preact-exchange-client.js`
- `index.css``bity.css` has been imported from `@bity/styles` sources