Table of contents
About
When you buy crypto, it's essential to store all the details of your deals. Only when you have all necessary details can you understand whether or not you're in profit or in loss. I tried to use Excel for that, but it was not convenient. Therefore, I decided to create a simple web application that would allow me to store all my deals in one place and see the amount of profit I have made.
After I added all core functionality, I decided to add some additional features that would make the application more useful. For instance, I added the ability to import and export deals in JSON format so that I can easily share my deals with others or back them up. I also added different calculation methods, such as breakeven, profit/loss, percentage projections, etc.
On the frontend, I used Next.js with Bootstrap to create a user-friendly interface. On the backend, I used Node.js and Nest.js to create a RESTful API that handles data storage and retrieval. The backend is pretty simple and does not have any complex logic. It is mostly used for CRUD operations.
Create Deal
The deal can be created in the top left corner of the page. There is a form that allows you to enter all the necessary details for the deal. The form consists of the following fields:
- Currency: The currency of the deal (e.g. BTC, ETH, etc.)
- Tags: Tags that can be used to categorize the deal (e.g. exchange, wallet, etc.)
- Buy Coin Price: The price at which you bought the coin
- Sell Coin Price: The price at which you sold the coin
- Investment: The amount of money you invested in the deal
- Status: The status of the deal (e.g.
Not Started
,In Progress
,Completed
)
At the top of the page, you can see a toggle button that allows
you to choose between strategies such as Buy the Dip
and Sell the Rips
.
When a user enters all the necessary details, they can see the possible profit/loss, breakeven price, all fees, and other details.
Once user hits the Create
button, the deal is created and stored in the database.
When the deal is created, toast notification is shown to the user. The toast notification also appears when we remove the deal.
Deal Grid
The deal grid consists of 4 tabs:
- Base Information
- Detailed Deal Information
- Projections
- Percentage Projections
Additional features of the grid:
- We have multiple grids grouped by the deal currency and strategy.
- Each grid widget can be pinned to the top of the page.
- Every column in the grid can be sorted, except for the
Actions
.
Base Information
This tab holds all the basic information about the deal, such as currency, tags, buy/sell prices, etc.
This grid has actions Update
and Delete
.
Detailed Deal Information
This tab holds all the detailed information about the deal, such as profit/loss, breakeven price, buy gross/net, sell gross/net, etc.
Projections
This tab holds all the projections for the deal, such as Zero Loss
, 1%
, 2%
, 3%
, etc.
The projections are calculated based on the buy/sell prices and the investment amount.
A very useful feature is the ability to select the deals you want and see the projections only for the selected deals.
Percentage Projections
This tab holds all the percentage projections for the deal, this tab includes negative projections as well.
As on the previous tab you can select the deals you want and see the projections only for the selected deals.
Summary Widgets
At the top we have summary widgets that show:
- Today's Profit: The profit/loss for today
- Completed Deals: The number of completed deals
- Involved Investment: The total amount of money invested in the deals
- Deals In Progress: The number of deals in progress
Import Deals
If users want to import multiple deals, they can do it by clicking on the Import Deals
button:
Then users can import deals in JSON format.
Export Deals
Users can export all the deals in JSON format by clicking on the Export Deals
button:
When a user clicks on the Export Deals
button, a JSON view appears.
This view allows users to copy either all the deals or only the particular deals.