This is a simple, full-stack web application built with Python and Flask that simulates a basic cryptocurrency wallet system. Users can view their wallets, check balances, mine new blocks, and send transactions. The application uses a mock blockchain to handle transactions and balances, providing a hands-on demonstration of key blockchain concepts.
- User Authentication: A login page allows users to access their personalized wallet dashboards.
- Wallet Dashboard: Displays a user's unique wallets, each with a clickable link to view its details. The balances automatically refresh every second.
- Dynamic Wallet Pages: Each wallet has its own page showing its address and current balance.
- Mining Functionality: Users can "mine" a new block to receive a reward, with real-time feedback and an updated balance.
- Transaction System: A pop-up menu allows users to send money from their wallet to a recipient address.
- Python 3.x
pip(Python package installer)
To set up and run the application, follow these steps:
-
Clone the repository and navigate to your project directory:
git clone https://github.com/AlanMet/Full-Stack-Crypto.git cd Full-Stack-Crypto -
Navigate into the server directory:
cd server/ -
Create and activate a Python virtual environment:
python -m venv venv source venv/bin/activate # On macOS and Linux venv\Scripts\activate # On Windows
-
Install the required packages, including Flask:
pip install Flask
-
Set the
FLASK_APPenvironment variable and run the application:export FLASK_APP=index.py flask run
-
Home Page: Navigate to the home page to see the landing page. Click "Log In" to proceed. URL:
/ -
Login: Use one of the following mock user credentials to log in:
-
username:
alice, password:Password$5 -
username:
Bob, password:Password$5URL:/login
-
Wallets Dashboard: You will be redirected to your personal wallet page, showing a list of your wallets. URL:
/wallets/<username> -
Wallet Details: Click on a wallet to view its address and current balance. URL:
/wallets/<username>/<address> -
Mine a Block: Click the "Mine" button to start the mining process. A pop-up will provide feedback and automatically update your balance once the block is mined.
-
Send a Transaction: Click the "Send Money" button to open a form where you can enter a recipient's address and an amount to send.
This project is a personal demonstration, but feel free to fork the repository, make improvements, and submit a pull request.
-
Fork the project.
-
Create your feature branch (
git checkout -b feature/NewFeature). -
Commit your changes (
git commit -m 'Add some NewFeature'). -
Push to the branch (
git push origin feature/NewFeature). -
Open a Pull Request.
Distributed under the MIT License.