Skip to content

A decentralized blogging platform that implements the Sign-In with Ethereum authentication protocol natively in Python.

License

Notifications You must be signed in to change notification settings

Sn1F3rt/BlogChain

Repository files navigation

BlogChain - A Decentralized Blogging Platform

License GitHub last commit GitHub issues GitHub pull requests GitHub stars GitHub forks GitHub watchers

Table of Contents

About

BlogChain is a decentralized blogging platform built on the Ethereum blockchain. It is the first of its kind to implement the Sign-In with Ethereum authentication protocol, natively in Python using the siwe-py library. On the core, it is built using the Flask web framework. Database management is done using SQLAlchemy.

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 or any other Ethereum testnet

Installation

  1. Clone the repository

     git clone https://github.com/Sn1F3rt/BlogChain.git
  2. Switch to the project directory

     cd BlogChain
  3. Create a virtual environment

     python -m venv .venv
  4. Activate the virtual environment

     source .venv/bin/activate
  5. Install the dependencies

     pip install -r requirements.txt

Configuration

Copy the 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

python launcher.py

Production

gunicorn launcher:app

License

GNU General Public License v3.0

Copyright © 2024 Sayan "Sn1F3rt" Bhattacharyya

About

A decentralized blogging platform that implements the Sign-In with Ethereum authentication protocol natively in Python.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project