Skip to content
TheCoder0215Public

About

Blockchain-based platform for secure issuance and verification of education credentials using Django and Ethereum smart contracts.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

Repository files navigation

ProfileBlocks

ProfileBlocks is a blockchain-based platform for secure education credentials built with Django and Ethereum smart contracts. This project enables secure issuance, management, and verification of digital academic certificates using a modular backend and smart contracts deployed on the Ethereum Sepolia testnet.


Table of Contents


Getting Started

Follow the instructions below to set up your local environment, run the server, and start developing or testing.

1. Clone the Repository

git clone https://github.com/TheCoder0215/fyp24111
cd profileblocks_v2

2. Create and Activate Virtual Environment

It is highly recommended to use a Python virtual environment to manage dependencies and keep your system clean.

Create a virtual environment named venv:

python3 -m venv venv

Activate the virtual environment:

  • macOS/Linux:

    source venv/bin/activate
  • Windows (PowerShell):

    .\venv\Scripts\Activate.ps1
  • Windows (Command Prompt):

    .\venv\Scripts\activate.bat

3. Install Dependencies

Upgrade pip first, then install the required packages from requirements.txt:

pip install --upgrade pip
pip install -r requirements.txt

4. Setup Environment Variables

A .env file is included in the project root directory. This file contains essential environment variables such as blockchain RPC URLs and other configuration. For validated personnels who wish to test using the projects Metamask Account, please contact u3578912@connect.hku.hk to obtain the CONTRACT_OWNER_PRIVATE_KEY.

  • Do not commit your .env file to public repos.
  • Review and update any placeholders or sensitive data in the .env as necessary.

5. Database Setup

The project includes a pre-populated SQLite database file db.sqlite3 with testing data.

  • If you want to apply migrations (for schema updates or if starting fresh), run:

    python manage.py migrate
  • To create a superuser for Django admin access:

    python manage.py createsuperuser

6. Run the Development Server

Start the Django development server:

python manage.py runserver

By default, the server will be accessible at http://127.0.0.1:8000/.


Project Structure

profileblocks_v2/
├─ accounts/              # User authentication, key management, services, tests
├─ blockchain/            # Ethereum smart contract interaction services and tests
├─ certificates/          # Certificate issuance, management, templates, and templatetags
├─ institutions/          # Institution models and services
├─ profiles/              # Student profile management, services, templates
├─ static/                # Static files (JS)
├─ verification/          # Verification portal templates and tests
├─ manage.py              # Django management script
.env                      # Environment variables file (sensitive)
db.sqlite3                # SQLite database with testing data
requirements.txt          # Python dependencies
smart_contracts/          # Solidity contracts and Hardhat scripts/tests

Additional Notes

  • Blockchain Integration:
    The backend interacts with Ethereum Sepolia testnet smart contracts using Web3.py. Ensure your .env contains correct RPC endpoints and private keys.

  • Security:
    Sensitive data is managed via .env and never committed to version control. The system uses role-based access control and cryptographic verification.

  • Frontend:
    Uses Django templates with Bootstrap 5 for responsive UI.

  • Testing Data:
    The included db.sqlite3 contains sample data for quick testing and development.


Contact

For questions, issues, or contributions, please contact u3578912@connect.hku.hk or refer to the project documentation.


About

Blockchain-based platform for secure issuance and verification of education credentials using Django and Ethereum smart contracts.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages