This project is a simple blockchain viewer for the seed.bitcoin.sipa.be
seed, when a new block is added, the application will display the bew block on the frontend.
Note, this project will only display blocks made AFTER it is started, as such, it may take some time for the first block to be displayed.
Note2, it is not necessary to refresh the page, the application will automatically update when a new block is added.
The project is divided into two main parts:
-
backend
: This is where the blockchain logic resides. It's a Python application that handles block parsing, message handling, and node connections. It uses flask handling HTTP requests. -
frontend
: This is the user interface for the blockchain. It's a TypeScript application that uses Vite for building and serving the application. It also uses Tailwind CSS for styling.
For this application to function, both the front and backend applications need to be running. The backend application should be running, this can be accomplished either by:
- running the application using docker-compose
- running each application separately
If you have docker
installed, you can run the application using the following commands:
docker-compose up
This will start the backend and frontend applications, and you can access the frontend at https://localhost:5173
.
To start the backend, navigate to the src/backend
directory and run:
python src/app.py
To start the frontend, navigate to the src/frontend
directory and run:
npm install
npm run dev