This project provides a set of API endpoints for managing a wallet and interacting with a blockchain. The API includes functionalities such as retrieving wallet details, managing transactions, and mining blocks.
-
GET /api/v1/wallet
- Retrieve wallet details.
-
GET /api/v1/wallet/transactions
- Retrieve the transaction pool.
-
GET /api/v1/wallet/mine-transactions
- Mine transactions.
-
POST /api/v1/wallet/create-wallet
- Register a new user wallet.
-
POST /api/v1/wallet/login
- Login user wallet.
-
POST /api/v1/wallet/transaction
- (Protected, authorize) Add a new transaction.
-
GET /api/v1/blockchain
- Retrieve the entire blockchain.
-
POST /api/v1/block/mine
- Mine a new block.
- Navigate to the frontend directory:
cd frontend
- Install the dependencies:
npm i
- Start the development server:
npm run dev
- Open a new terminal and navigate to the project root directory.
- Navigate to the backend directory:
cd Backend
- Install the dependencies:
npm i
- Start the development server:
npm run dev
- Start additional nodes
npm run dev-node
After setting up both the frontend and backend, you can start testing the application by accessing the relevant endpoints and verifying the functionality.
- Proof of Work - done
- Block model - done
- Wallet model - done
- Blockchain model - done
- Transaction model - done
- TransactionPool model - done
- Connect to peers through Redis server - done
- Block mining rewards - done
- Protect from double spending - done
- Write the chain into a MongoDB database - done
- Login function for consumers via API with JWT token - done
- Store consumers in a MongoDB database - done
- Register a new user - done
- The frontend will be a React app - done
- Create new transactions - done
- Login to the wallet - done
- List transactions - done
- List blocks and blockchain - done
- Create new blocks - done
- Register a new user - done
- Test-Driven Development (TDD) for transaction handling.
- Clean code, Separation of Concerns (SOC), Model-View-Controller (MVC) architecture.
- Protection from DDOS attacks, NoSQL injections, and XSS attempts.
After setting up both the frontend and backend, you can start testing the application by accessing the relevant endpoints and verifying the functionality.