I was interested in learning about blockchain. I went with building the frontend with Flask. I also wanted to start learning about MySQL, so I chose to integrate it with a MySQL database. I learned a lot about Flask routing, PlanetScale and Render, deploying a Flask application, and using SQL and Python. This tutorial by Will Assad was amazing for this project: Blockchain App Will Assad
Feel free to reach out to me if you have any additional questions. There are lots of features that still need to be implemented!
app.py
: Main application file containing the Flask routes and logic.blockchain.py
: Implementation of the blockchain and related functions.sqlhelpers.py
: Implementation of the SQL functions for managing the blockchain and users database.forms.py
: Implementation of the forms with wtforms.templates/
: Contains HTML templates for rendering pages.static/
: Contains static files like CSS and JavaScript.
- Home Page:
- Register Page:
- Dashboard Page:
- Login Page:
- Buy Page:
- Transaction Page:
This site was built using Flask and MySQL.
The Neurocoin System allows users to manage a blockchain-based ledger of transactions for a token system. Users can register, log in, view their account balance, send tokens to other users, and empty their account.
- User registration and authentication
- Account balance management
- Sending tokens between users
- Emptying an account
- Blockchain-based ledger for transaction history
- MySQL database integration
- Basic front-end using Flask's templating engine
- Flask
- MySQL Connector
- Passlib
- hashlib
- Deploy to the web. It is difficult to find free and fast options for a MySQL database. PlanetScale sleeps their databases if they are not used often, and Render is extremely slow at deploying my Flask application.
Contributions are welcome as always. Before submitting a new pull request, please make sure to open a new issue.
- Clone the repository:
git clone https://github.com/abdulolagunju19/blockchain-app.git
- Navigate to the project directory:
cd blockchain-app
- Install the required dependencies:
pip install -r requirements.txt
- Configure your MySQL database settings in the
app.py
file. - Start the Flask development server:
python app.py
- Access the application in your web browser at port 5000.