Coinlen is a cryptocurrency exchange tracking system. Coinlen compares Binance and Paribu/BtcTurk and shows you opportunities.
This repository is an open source and, it has been made using Javascript. There's no unit-test in this project.
If someone wants to help improve this project, it would be nice.
- If you're new to set up a linux server, you can make research on the Google.
- If you're looking for any servers I suggest you Digitalocean, AWS or GCloud.
This project has been developed with the following technologies.
If you don't know any of these, you can check them out on Github or Google. Be persistent to learn. If others can do it, you can do.
Coinlen is a project tracking cryptocurrencies online. It took me 3-4 months to finish Coinlen part-time. To be honest, I planned to share this before, but I didn't have enough time to share it.
After failing on the project, I decided to share it with you as open source.
It takes a long time to get Coinlen up and running. Get your coffee and enjoy :)
Coinlen is a micro-service project.
What database technologies does Coinlen use.
Service | Techology |
---|---|
Coins | RethinkDB |
CoinsFormat | RethinkDB |
CoinsHistory | RethinkDB |
Notifications | RethinkDB |
Logs | MongoDB |
Payments | MySQL/MariaDB |
Users | MySQL/MariaDB |
- Ubuntu or any of Linux servers
- Nginx
- MySql/MariaDB
- RethinkDB
- Redis
- MongoDB
After your linux server is ready, follow these steps
$ git clone https://github.com/manylmz/coinlen
There is no SSL certificate configuration in these files.
Project | Configuration File |
---|---|
Api Server | server/nginx.conf |
Socket Server | socket-server/nginx.conf |
RethinkDB Admin | rethinkdb.admin.nginx.conf |
Admin | admin/nginx.conf |
Web App | web-app/nginx.conf |
After configured all Nginx projects, you may want to use SSL. I suggest Let's Encrypt
Click below for more information.
How To Secure Nginx with Let's Encrypt on Ubuntu
Project | Configuration File |
---|---|
Api Server | server/ecosystem.config.js |
Socket Server | socket-server/ecosystem.config.js |
Provider | provider/ecosystem.config.js |
$ CREATE DATABASE database_name;
$ CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
$ GRANT PRIVILEGE ON database_name.table TO 'username'@'host';
$ FLUSH PRIVILEGES;
$ use db_name;
$ db.createUser({user:'username', pwd:'password',roles:['dbOwner'']'});
Set all keys to Redis
$ set CURRENCY "1.0"
$ set COINS_1H "[]"
$ set COINS_12H "[]"
$ set COINS_24H "[]"
$ set COINS_7D "[]"
$ set AUTO_UPDATE "1"
When you're done with the Administrator panel, go to http(s)://realtime-admin-panel.your-project.com/rethinkdb-panel/#tables
Press + Add Database
and create 4 tables
PK | name |
---|---|
id | coins |
id | coins_format |
id | coins_history |
id | notifications |
You suppose to protect the RethinkDB Administration Panel
as the example below.
How To Set Up Password Authentication with Nginx on Ubuntu
After completing the nginx configuration of the server, you can start the server.
$ yarn install
The configuration of each service must be set in .env
$ cp .env.example .env
$ npx sequelize-cli db:migrate
$ npx sequelize-cli db:seed:all
$ pm2 start ecosystem.config.js
For sequelize-cli
check The Sequelize Command Line Interface (CLI)
Don't forget to check if everything is ok.
$ pm2 logs
If you're done with the server, check it out http(s)://api.your-project.com
The response should be like this;
{
"statusCode": 404,
"status": false,
"message": "Not Found"
}
After completing the nginx configuration of the socket-server, you can start the socket-server.
You can use yarn instead of npm.
$ npm install
The configuration of each service must be set in .env
cp .env.example
as .env
$ pm2 start ecosystem.config.js
Don't forget to check if everything is ok.
$ pm2 logs
If you're done with the server, check it out http(s)://websocket.your-project.com/SOCKET_PATH
The response should be like this;
{
"code": 0,
"message": "Transport unknown"
}
$ yarn install
cp .env.example
as .env
$ pm2 start ecosystem.config.js
Please make sure all server
, socket-server
and project
are working well.
$ pm2 ls
if you see this screen, it looks everything is fine.
id | name | namespace | mode | pid | status | cpu | mem |
---|---|---|---|---|---|---|---|
0 | provider-binance | default | fork | 0 | online | 0% | 10.0mb |
1 | provider-paribu | default | fork | 0 | online | 0% | 10.0mb |
2 | provider-btcturk | default | fork | 0 | online | 0% | 10.0mb |
3 | scheduled-coins-grow | default | fork | 0 | online | 0% | 10.0mb |
4 | scheduled-coins-history | default | fork | 0 | online | 0% | 10.0mb |
5 | scheduled-currency | default | fork | 0 | online | 0% | 10.0mb |
6 | scheduled-notifications | default | fork | 0 | online | 0% | 10.0mb |
7 | server | default | fork | 0 | online | 0% | 10.0mb |
8 | socket | default | fork | 0 | online | 0% | 10.0mb |
You've done well until this step, congratulations. Just a few steps left to finish.
If you use the payment system of web application' you have to integrate the Coinbase.
More details; Getting Started with Accepting Bitcoin | Coinbase Commerce
You may want to use the postman and here is the file to import postman_collection.json
Run it
$ yarn build
After you built admin
, check http(s)://admin.your-project.com
Login credentials for development
Username: admin@admin.com
Password: admin
Login credentials for production
Username: admin@admin.com
Password: password
After you access to the admin, please change your login credentials.
Run it
$ yarn build
After you built web-app
, check http(s)://app.your-project.com
You can use Login credentials used for admin panel access.
You can support me with crypto money.
If you want to send me a Bitcoin (BTC)
here is my BTC Address:
1PtAPNmETn6QvASbhfA6uxKSKZUXJ3HGcC
Note: Please send only BTC to this deposit address. Sending coin or token other than BTC to this address may result in the loss of your deposit.
If you want to send me an Ethereum (ETH)
here is my ERC20 Address:
0xb7afc028a4b2a23da45941df38164445d5715c8a
Note: Please send only ETH to this deposit address. Sending coin or token other than ETH to this address may result in the loss of your deposit.
If you want to send me a Litecoin (LTC)
here is my LTC Address:
LdMW7XBoQjBGoMvnG6ywhPNtbaUhHaRvFn
Note: Please send only LTC to this deposit address. Sending coin or token other than LTC to this address may result in the loss of your deposit.
I really thank my friend because she made a logo to help.
This repository is under GNU General Public License (GPL).