A Blockchain-based Online Auction Service providing transparency and securacy by using zero-knowledge proof.
-
event-queue
(Kotlin, Spring Boot)- An event-queue service that relays and broadcasts service events.
-
auction-service
(Typescript, NestJS)- A service related with auction-related features. (Enlisting Auction, Terminating Auction, etc)
-
processing-service
(Typescript, NestJS)- A service that communicates with core and proceeds blockchain-related operations. (Deploying a contract, Request for proof generation/verification, etc.)
-
database-service
(Typescript, NestJS)- A service that directly communicates with database,
-
user-management-service
(Typescript, NestJS)- A service related with user-related features. (Login, Sign Up, etc.) (TODO)
Make sure you already have
Shieldbid-FE
andShieldbid-Core
before run this application.
- Pre-requisites
- Make sure you have a environment to run and compile java applications.
openjdk 21.0.5
- Nodejs (
v22
~v23
) is optional, since all nodejs application will provided by docker-compose services. - Run
Shieldbid-FE
andShieldbid-Core
by following the description.
-
Build an event-queue.
- Move to
event-queue
directory. - Run
./gradlew build
command to build an application. - Check if snapshot is created in
build/libs
with nameevent-queue-0.0.1-SNAPSHOT.jar
.
- Move to
-
Run
docker-compose up --build -d
in a root directory ofShieldBid
. -
Create a migration files and apply the migrations.
- Move to
database-service
directory. - Run
yarn migration:create
to update the migration files. - Run
yarn migration:up
to apply the migrations. - Check if the migration is applied by using
psql
or application such asDatagrip
.
- Move to
-
(Optional) Run the service with dev mode.
- This procedure requires nodejs.
- Make sure you have
.env.dev
in directory/env
with required fields. - Move to service you want to run locally.
- Run
yarn build:dev
to run the application.
PUT /auction
: Create and auction.
// TODO: This request body need to be updated.
// PUT /auction
{
// UserId that owns the product
ownerId: string;
productName: string;
productType: string;
auctionTitle?: string;
minimalPrice: string;
};
POST /auction/finish
: Finish the auction
// POST /auction/finish
{
auctionId: string;
};
POST /bid
: Offer a bid
// POST /bid
export type RequestBidDto = {
auctionId: string;
price: number;
};
POST /auction/list
: Query all auctions existing
// GET /auction/list