Educational Project (Coursework)
A simplified blockchain implementation in Go featuring a web interface for visualizing the block chain and adding cryptographically signed records.
Vision Chain is a demonstration application developed as part of my second-year coursework. The project implements the fundamental principles of Distributed Ledger Technology (DLT) using strict typing and modern cryptography:
- Data Integrity: Each block contains the hash of the previous block. Any attempt to alter history invalidates the entire chain.
- Cryptographic Signatures: Every transaction is signed using an Ed25519 key pair, ensuring sender authenticity.
- REST API: The backend is built with the Echo framework, providing high performance and clean code structure.
The application allows users to add text data or small files (converted to Base64) to the blockchain, visualizing the block formation process in real-time.
- Language: Go (Golang).
- Framework: Echo v5 (for routing and HTTP request handling).
- Cryptography:
crypto/ed25519(for key generation and transaction signing),crypto/sha256. - Utilities:
google/uuid(for unique participant identification).
- Core: HTML5, CSS3 (Custom Properties, Flexbox/Grid), Vanilla JavaScript (ES6+).
- Styling: Dark Minimal UI (inspired by GitHub Dark Dimmed).
- Logic: Asynchronous API interaction via Fetch.
- Transaction Creation: Add records from a sender with arbitrary data payload.
- File Upload: Convert small files (<2MB) into Base64 strings to store them directly within a block.
- Chain Validation: Server-side check of hash continuity (
PreviusHash) on every request to ensure integrity. - Visualization: Real-time display of blocks, hashes, timestamps, and content.
- Detailed View: Modal window showing full block information and all included transactions.
- Go installed (version 1.21+ recommended).
- Any modern web browser.
-
Clone the repository:
git clone https://github.com/Sweesz/coursework-blockchain.git cd coursework-blockchain -
Install Go dependencies:
go mod tidy
-
Run the server:
go run main.go
-
Open your browser and navigate to:
http://localhost:8080
├── main.go # Entry point: Echo server setup & blockchain logic
├── index.html # Main application page
├── blockchain/ # Package: Block structure & hashing implementation
│ └── block.go
├── Graph/ # Package: Data models (Transactions)
│ └── transaction.go
└── static/ # Static assets for the frontend
├── css/
│ └── style.css # Interface styles (Dark Minimal UI)
└── js/
└── main.js # Client-side logic (API requests, rendering)
This project was created to deeply understand:
- The Go programming language and its standard library.
- Hashing algorithms and block chaining principles.
- Asymmetric cryptography (Ed25519).
- Building RESTful APIs using the Echo framework.
- Developing responsive user interfaces without heavy JS frameworks.
This project is educational and distributed freely. Commercial use is not intended.
Developed by Vorontsov Y.N (Sweesz). as part of academic coursework.