Home broker is an online platform where people can buy and sell different assets, such as stocks and cryptocurrencies. This application allows you to invest your money in companies or assets you believe will grow in value over time. Through a home broker, you can manage your investments and make financial decisions with ease and convenience, follow assets growing in value (or not) and manage your profits.
- Docker
- REST Extension in VSCode(optional)
In this home broker you'll be able to:
- Manage Assets, Wallets and Orders in a home broker by buying and selling assets;
- Track orders being bought and sold using a friendly interface with charts updated in real time (using Server Sent Events);
- Listen to negotiated trades sent via Kafka by GO Service;
- Get data using Server Sent Events (SSE) in order to get real time changes regarding daily changes in Assets, Orders or Wallets;
- Listen to changes in MongoDB and send it to client using SSE, the SSE endpoint send a payload to the client in the subscribed endpoint.
Here is the frontend application, it lists the assets in a wallet and you're able to sell or buy assets here. Additionally, a chart with transactions in real time is shown here.
More details here: Home Broker: NextJS Frontend
Like every sort of home brokers, you'll need to store and manage your assets, wallets and orders, and here it is! Inside this microservice is possible to manage the home broker, you may also subscribe to SSE routes, listen to events in MongoDB collections and send and receive messages via Kafka Topis.
More details here: Home Broker: NestJS Microservice
This GO project has as objective to make a trade when an asset is bought or sold in a home broker. With the negotiation finished after receiving an order via Kafka, a transaction is sent to Kafka topic in order to finish the trade in another microservice (in this case, the Home Broker: NestJS Microservice).
GO was choosen to do the trade because of its parallelism features, like Go routines and channels.
More details here: Home Broker: GO Trade Service
If you want to run this project entirely, including microservices, database (MongoDB), Kafka and frontend (NextJS application), you must follow the steps below, in order to run each project:
- Run Go Microservice:
cd go-microservice
docker-compose up
- Run NestJS Microservice:
cd nestjs-microservice
docker-compose up
- Run NextJS Frontend:
cd nextjs-front
docker-compose up
Congrats! You're now able to negotiate your assets in a home broker ;)
Simply access http://localhost:3001/wallet1 and have fun ;)
In case you need to use the NestJS API or Go Microservice, access theirs README to learn more.
- Go Lang 1.20.3
- Zookeeper 7.3.0
- Kafka 7.3.0
- Control Center 7.3.0
- NestJS 10.0.0
- Prisma 4.16.1
- MongoDB 5.0.17
- NodeJS 20.0.0
- Typescript 5.1.3
- NextJS 13.4.7
- ReactJS 18.2.0
- Tailwind 3.3.2
- Flowbite React 0.4.9
- Typescript 5.1.3
- Docker 20.10.7