Skip to content

defau1tuser0/zen_coin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zen Coin

Zen Coin is a decentralized peer-to-peer cryptocurrency built as a final year project. It is essentially a simplified version of Bitcoin, designed to demonstrate the core principles of blockchain, wallets, mining, transactions, and simple decentralized networking without the full complexity of Bitcoin.


Demo

  • GUI Wallet:
zen_coin_gui_wallet_demo.mp4
  • TUI Wallet:
zen_coin_tui_wallet_demo.mp4

Features

  • Blockchain implementation from scratch
  • UTXO-based transaction model
  • Peer-to-peer decentralized node communication
  • Mining with Proof-of-Work
  • Transaction validation and propagation
  • CBOR-based blockchain persistence
  • TUI Wallet Interface
  • GUI Wallet (Tauri + Rust + TypeScript)

Tech Stack

  • Rust ==> Core Backend
  • Ratatui (for TUI wallet)
  • TypeScript ==> Frontend (GUI Wallet)
  • Tauri ==> Connecting Backend and Frontend
  • HTML/CSS

Getting Started

1. Install Rust

To run this project, Rust must be installed.

We recommend using Rustup, the official Rust installer.

Official website: https://rustup.rs/


Linux / macOS

Open terminal and run:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Follow the on-screen instructions.

After installation, restart your terminal.


Windows

  1. Visit: https://rustup.rs/
  2. Download the Rustup installer
  3. Run the installer
  4. Follow the on-screen instructions

After installation, restart Command Prompt / PowerShell.


2. Clone the Repository

git clone https://github.com/defau1tuser0/zen_coin.git
cd zen_coin

3. Build the Project

Compile the full project:

cargo build --release

Running the System

The recommended order is:

  1. Start Node
  2. Generate Wallet Keys
  3. Start Miner
  4. Start Wallet

4. Run the Node

cargo run --release --bin node -- [OPTIONS] [INITIAL_NODES...]

Options

Option Description
--port <PORT> Set port number (default: 9000)
--blockchain-file <FILE> Blockchain storage file (default: ./blockchain.cbor)

Example

cargo run --release --bin node -- \
  --port 9000 \
  --blockchain-file ./my_blockchain.cbor \
  127.0.0.1:9001 \
  127.0.0.1:9002

6. Run the Miner

cargo run --release --bin miner -- \
  --address <NODE_ADDRESS> \
  --profile <PROFILE_NAME>

Example

cargo run --release --bin miner -- \
  --address 127.0.0.1:9000 \
  --profile alice

This allows mining rewards to be sent to your wallet.


7. Run the Wallet

cargo run --release --bin wallet -- [OPTIONS]

Options

Option Description
-c, --config <FILE> Wallet config file (default: wallet_config.toml)
-n, --node <ADDRESS> Node address

Example

cargo run --release --bin wallet -- \
  --profile alice

GUI Wallet

cd zen-wallet-gui
pnpm tauri dev

APK build(Android Studio required)

cd zen-wallet-gui
pnpm vite build; pnpm tauri android build --release --target <processor_architecture>

Example

pnpm vite build; pnpm tauri android build --release --target aarch64

If --release'd apk isn't working for some reason try --debug


Project Structure

zen_coin/
│
├── lib/              # Core blockchain logic
├── node/             # P2P node implementation
├── miner/            # Mining system
├── wallet/           # Wallet system
├── gui-wallet/       # Tauri GUI wallet
│
└── blockchain.cbor   # Persistent blockchain storage

Educational Purpose

Zen Coin is not intended for production use.

It is built for:

  • learning Bitcoin architecture
  • understanding blockchain internals
  • studying UTXO transaction systems
  • exploring decentralized networking
  • academic final year project demonstration

Author: I

Developed as a Final Year BCA Project

Project Name: Zen Coin Inspired by: Bitcoin Reference:

Also used Vibe conding heavily via Codex and Gemini CLI.


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors