https://github.com/sn1f3rt/blogchain
A decentralized blogging platform that implements the Sign-In with Ethereum authentication protocol natively in Python.
https://github.com/sn1f3rt/blogchain
decentralized ethereum flask siwe siwe-py
Last synced: about 2 months ago
JSON representation
A decentralized blogging platform that implements the Sign-In with Ethereum authentication protocol natively in Python.
- Host: GitHub
- URL: https://github.com/sn1f3rt/blogchain
- Owner: sn1f3rt
- License: gpl-3.0
- Created: 2024-04-14T18:38:44.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-15T18:12:22.000Z (about 1 year ago)
- Last Synced: 2025-03-19T10:58:07.076Z (2 months ago)
- Topics: decentralized, ethereum, flask, siwe, siwe-py
- Language: HTML
- Homepage:
- Size: 911 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# BlogChain - A Decentralized Blogging Platform
[](LICENSE)
[](https://github.com/Sn1F3rt/BlogChain/commits/main/)
[](https://github.com/Sn1F3rt/BlogChain/issues)
[](https://github.com/Sn1F3rt/BlogChain/pulls)
[](/)
[](https://github.com/Sn1F3rt/BlogChain/forks)
[](https://github.com/Sn1F3rt/BlogChain/watchers)## Table of Contents
- [About](#about)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Configuration](#configuration)
- [Running](#running)
- [Development](#development)
- [Production](#production)
- [License](#license)## About
BlogChain is a decentralized blogging platform built on the [Ethereum](https://ethereum.org/en/) blockchain. It is the first of its kind to implement the [Sign-In with Ethereum](https://login.xyz/) authentication protocol, natively in Python using the [siwe-py](https://pypi.org/project/siwe/) library. On the core, it is built using the [Flask](https://flask.palletsprojects.com/) web framework. Database management is done using [SQLAlchemy](https://www.sqlalchemy.org/).
It supports Ethereum based user authentication, setting username, creating and updating blog posts, and viewing blog posts. On top of that, it supports tipping post authors in order to incentivize blogging.
## Prerequisites
- Git
- Python 3.8 or higher (tested on 3.11)
- MariaDB/MySQL database
- [Ganache](https://www.trufflesuite.com/ganache) or any other Ethereum testnet## Installation
1. Clone the repository
```shell
git clone https://github.com/Sn1F3rt/BlogChain.git
```
2. Switch to the project directory```shell
cd BlogChain
```
3. Create a virtual environment```shell
python -m venv .venv
```
4. Activate the virtual environment```shell
source .venv/bin/activate
```
5. Install the dependencies```shell
pip install -r requirements.txt
```## Configuration
Copy the [`config.example.py`](config.example.py) file to `config.py` and:
- update the `SECRET_KEY` variable with a 32-bit hexadecimal string.
- update the `DB_*` variables with your database credentials.
- update the `WEB3_PROVIDER` variable with the URL of your Ethereum node.## Running
### Development
```shell
python launcher.py
```### Production
```shell
gunicorn launcher:app
```## License
[GNU General Public License v3.0](LICENSE)
Copyright © 2024 [Sayan "Sn1F3rt" Bhattacharyya](https://sn1f3rt.me)