- What is the project about?
SwapSteem is an open source peer to peer exchange for Steem blockchain. Essentially, a p2p exchange is a platform where two users can trade their assets for other assests on basis of mututal understanding. Unlike other centralized exchanges, users don't need to deposit any assets with us until they agree on terms of trade. Once the agreement is finalized between buyer and seller, the trade happens via Steem escrow transactions, where @swapsteem, or a verified escrow agent will act as a moderator for safety of funds. The business model is very similar to localbitcoins.com except some diferences.
This specific repository is for the API for swapsteem, which is responsible for storing new data to a database and providing data to clients in real time with a REST API and a WSS server. The API is a fork of the busy-api but we have added a lot of features that are specific to our application.
As of now, The API enables users to log in to busy API for notifications, store all incoming notifications for different transaction types( advertisement, order, mssages, transfers, escrow actions etc.), send notifications to subscribes users in real time vai WSS, send application related data from database via a RESTful API etc.
Over the last one month I added the following features :
Added MongoDB to the Forked API and created models for application specifica data
The base busy.org API was using Redis as database since it was only meant to store notifications. But In our use case, we also had to extract custom JSON data from transactions and store it if it is relevant to application and also serve this data from a RESTful API. So I added MongoDB and Mongoose.js to the Application. I also created mongoose models for different data structures like advertiements, orders, messages etc. The work can be found in following commits :
Added Routes For advertisements, orders, messages etc.
I added express routes for different endpoints needed by our front end. The API listens to requests for those routes and returns the requested data. Also added cors for cross orogin support. The work can be found in following commits :
The Technology stack of the API is
- Node JS Server
- Express JS for RESTful APIs
- MongoDB with mongoose.js for persistent database
- Redis for notifications database
The API is ready for alpha deployment. In the beta version we want to add -
- Real time chat with web sockets
- Add Feedbacks and review feature