Skip to content

ak-wizzy/Stainley-Blockchain-Network

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# StainleyCoin (STY) Blockchain Project

## Overview
StainleyCoin (STY) is a blockchain-based cryptocurrency project designed to run on a distributed network. This project includes a backend blockchain network, a frontend explorer, and a Docker-based deployment setup.

## Repository Structure
```
/
├── backend/                # Contains the blockchain network implementation
│   ├── instance_1/        # First blockchain node
│   ├── instance_2/        # Second blockchain node
│   ├── instance_3/        # Third blockchain node
│   ├── instance_4/        # Fourth blockchain node
│   ├── requirements.txt   # Python dependencies
│   ├── Dockerfile         # Backend containerization setup
│
├── frontend/               # Contains the frontend Blockchain Explorer UI
│   ├── Dockerfile         # Frontend containerization setup
│   ├── index.html         # Main UI for the explorer
│   ├── nodes.json         # List of active blockchain nodes
│   ├── transactions.json  # Stores transactions for display
│
├── docker-compose.yml      # Docker Compose file to orchestrate containers
```

## Features
- **Backend:**
  - Implements a Proof-of-Work (PoW) blockchain using Flask
  - Supports transaction creation and mining
  - Implements node synchronization and longest chain replacement
  - RESTful API for blockchain operations
  
- **Frontend:**
  - Web-based Blockchain Explorer
  - Allows adding transactions and mining new blocks
  - Connects new nodes and synchronizes chains
  - Displays the full blockchain

## Setup & Deployment
### Prerequisites
- Docker & Docker Compose installed on your system

### Running the Project
1. Clone the repository:
   ```sh
   git clone https://github.com/your-repo/stainleycoin.git
   cd stainleycoin
   ```
2. Build and start the containers:
   ```sh
   docker-compose up --build
   ```
3. Access the frontend Blockchain Explorer at:
   ```
   http://localhost:8080
   ```
4. The backend API will be running on multiple ports (e.g., `5001`, `5002`, etc.), as defined in `docker-compose.yml`.

## API Endpoints
- `GET /get_chain` - Retrieve the blockchain
- `POST /add_transaction` - Add a new transaction
- `GET /mine_block` - Mine a new block
- `GET /replace_chain` - Replace with the longest chain
- `POST /connect_node` - Connect a new node
- `GET /is_valid` - Check if the blockchain is valid

## Contributing
Feel free to submit issues or contribute improvements via pull requests.

## License
This project is open-source and licensed under the MIT License.

---
Developed by AK. Udofeh

About

Layer 1 blockchain network with smart contract

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors