School of Science and Technology 科技學院
Computing Programmes 電腦學系

NODES: A Web 3.0 Platform For High Privacy Social Media

Chau Man Chung, Mak Ho Ying, Tse Kai Chun, Lau Tsz Yin 

ProgrammeBachelor of Computing with Honours in Internet Technology

Bachelor of Science with Honours in Computer Science
SupervisorDr. Alin Liu
AreasWeb Applications
Year of Completion2025

Objectives

Project Aim

This project to confront the prevailing deficiencies in user protection on social media platforms, which include various forms of media theft, misappropriation of content, and unauthorized access to personal data. 

Project Objectives

The Need for a Secure and Decentralized Social Environment 

Considering the differences between Web 2.0 and Web 3.0, we know that Web 3.0 has enhanced privacy and security, decentralizing data ownership. By implementing Web 3.0 technologies, we want to create a high-privacy social media environment where users retain ownership of their content and are protected against unauthorized misappropriation. Moreover, we are going to ensure that individual privacy and security are strictly protected, to foster a more trusted and resilient social media for all users. 

Core Functionality & User Experience 

As for our Web 3.0, high-privacy social media allows users to open personal accounts and upload media. Users can not only create their own posts but also react to the posts of others when given permission. At the same time, there are also private chat rooms between users. All of this will be executed with the robust security features of Web 3.0. 

Videos

Demonstration Video

Presentation Video

Methodologies and Technologies used

Technology Choices Justification

Runtime: Node.js

  • Universal JS runtime powering both frontend and backend. 
  • Vast ecosystem & mature APIs that Svelte/SvelteKit depend on. 

Frontend: Svelte

  • Compile-time magic: Turns your components into tiny, vanilla-JS bundles → blazing-fast loads. 
  • SSR out of the box: Pre-renders pages for SEO boosts, lower TTFB, and dynamic personalization. 
  • Dynamic routing & reusable UI: Built-in router + component model makes nested feeds, profiles, and post pages a breeze. 
  • Reactive core: Fine-grained change detection cuts needless re-renders. 
  • Responsive by design: Easily swap image sizes, tweak styles on the fly, or integrate CSS-in-JS for adaptive layouts.

Backend: SvelteKit

  • Unified dev experience: Routes, server endpoints, and page logic all in one. 
  • RESTful API: Clear CRUD surface for posts, comments, identities, etc. 
  • Lightweight & reactive: Same speedy compile-to-JS benefits as Svelte plus built-in state handling. 
  • Scale-ready: Drop-in serverless functions or microservices as traffic grows. 

Database: GunDB

  • Decentralized graph: P2P replication means no single-point-of-failure and natural offline support. 
  • Real-time sync: Writes on a phone offline merge seamlessly once you reconnect. 
  • Flexible schema: Nodes & links let you model social graphs (followers, likes, threads) without rigid tables. 
  • Built-in security: Auth hooks let you enforce per-user read/write rules. 

Overall Architecture 

Web Application(Frontend) 

  • User: Users interact with a Svelte-based web application running in their browser, offering a responsive and dynamic interface.  
  • Personal Information: Users can manage profiles, preferences, and private data.  
  • Post: Create, edit, and view content with real-time updates.  
  • Chatroom: Engage in decentralized, peer-to-peer messaging.  
  • Real-Time Synchronization: Ensures instant updates across all connected peers.  
  • Decentralized Storage: Optional integration with IPFS for storing media files (images, videos) off-chain.  
  • Peers: Represents peer nodes in the GunDB network, enabling data replication and resilience.  
  • Main/Spare Node: Major / Backup or standby peers to ensure network stability. 

Data Storage (Backend) 

  • Controller: Manages business logic, request routing, and API interactions. 
  • Interacting with DB: Communicates with the GunDB decentralized database for CRUD operations. 
  • Privacy Encryption: Encrypts sensitive data; uses zero-knowledge proofs or end-to-end encryption for high-privacy features. 
  • Peers: Peer nodes form a mesh network, ensuring data redundancy and fault tolerance. 
  • GunDB Network: A peer-to-peer database where each Node.js server acts as a peer, storing and replicating data. Seed Peers help new clients bootstrap into the network. 

Figure 1: System Architecture of the Web 3.0 Social Media 

System Design: User Account

Figure 4: User Account

Account Creation Flow

Create Account Page:

  • New users select “Create” to register.
  • If the user does not have an account, they will be guided to provide their details, including a username and password.
  • Existing users can visit the Login Page to access their accounts.

User Actions & Workflows

Main Page Access:

  • After login, users land on the Main Page, where they can:
    • Make Posts: Content is published to the GunDB network and replicated across peers.
    • Visit Profiles: Browse other users' posts via decentralized queries.
    • Updates: Real-time sync ensures new posts/messages appear instantly.

Chat List Page:

  • Users can:
    • Initiate peer-to-peer encrypted chats (via GunDB's mesh).

Data Storage & Communication

Server Interaction:

  • Lightweight Node.js backend (Controller) handles authentication and metadata.
  • Decentralized Storage:
    • User-generated content (posts, media) is stored on IPFS (content-addressed) on GunDB.
    • Private data (e.g., DMs) is end-to-end encrypted before storage.

User ↔ Network Communication:

  • Users communicate directly with no data replication.
System Design: Posting System

Figure 2: Post System 

Core Components

  • Latest Feed: Dynamically displays the most recent posts in real-time.
  • Post Content: Users create text, images, or media (stored in decentralized storage GunDB).
  • Update Post Content: Edits are synchronized across all peers via GunDB's mesh network.
  • Un-copyable Media Content: similar to DRM protection (e.g., IPFS + encryption) to prevent unauthorized redistribution.

User Interaction Flow

  • Create Post:
    • User submits content → Controller validates and routes data.
    • Media is uploaded to IPFS; metadata (, timestamp, author) is stored in GunDB.
  • Display Latest Content:
    • Peers fetch posts from GunDB and IPFS, ordered by timestamp.
    • Real-time updates propagate via GunDB's event system.
  • Interact with Post:
    • Likes/comments trigger Notifications.

Backend Processes

  • Controller:
    • Handles requests (e.g., post creation, edits).
    • Generates responses (e.g., success/failure, updated feed).
  • Decentralized Storage:
    • GunDB for structured data (post metadata, social graphs, users' data).
    • Ensures censorship resistance and redundancy (Developer can’t delete user posts).
System Design: Chatroom System

Figure 3: Chatroom System

Core Components

  • User Profiles:
    • Each user (e.g., User 1, User 2) has a decentralized identity (via GunDB public key).
    • Request of staring communication will send when trigger.
    • Status: Accepted or not indicators updated in real-time.
  • Chatroom:
    • GunDB server-relayed communication.
  • Privacy Toggle:
    • High Privacy Mode: Enables end-to-end encryption (E2EE) for messages.
    • Standard Mode: Messages stored in GunDB with optional IPFS backup.

User Interaction Flow

  • Invitation Phase:
    • User 2 sends an invite → User 1 receives a request (“Accept Invitation?”).
    • User 1 responds:
    • Yes: Chatroom is created; participants connect via GunDB mesh.
    • No: Request is declined; User 2 notified.
  • Chatroom Activity:
    • Real-Time Messaging:
    • Messages sync via GunDB or direct P2P (lower latency).
    • High Privacy: Messages encrypted with Signal Protocol (or similar E2EE).
    • Status Updates: Acceptance indicators (stored in GunDB).

Backend Processes

  • Controller:
    • Validates invitations and manages chatroom lifecycle.
    • Routes messages if P2P fails (fallback to GunDB relay).
    • Privacy Encryption:
    • Encrypted content will be stored in GunDB.
    • Fetch the encrypted content from GunDB when encryption is enabled on a user's profile and display the encrypted content other users visiting the user.

Implementation 

Frontend:

 

Login and Create Account Page

Users can login or create an account with username and password in the login page. There is not “forgotten password” function that user is obliged to remember their passwords in Web 3.0. 

Figure 5: Login Page

Figure 6: Create Account Page

Home Page

Home page is composed of 4 components, which is header on the top, menu on the left-hand side, post function and post content, and notifications on the right.  

Figure 7: Main page

Profile Page
If the user visits the profile from another user, the user can send the chat request or accept request after receive chat request to that user.

Figure 8 User Page

Figure 8: User Page

Chatroom and Block Page

After the user accepts chat request, the system will go to chatroom automatically. Users also can see the chatroom and start chatting with other users on the messages page.  

Figure 9: Chatroom Page

If a user blocks another user, both users will be unable to chat with each other. 

Figure 10: Block Page

Backend: 

Block feature 

When a user press the “Block” button on someone's profile, the chatroom will be inaccessible and the chatroom status will be updated to “[BLCOKED CHAT]” in GunDB database and the status will be fetched and displayed for both users in the Chatroom list. 

The “Chat” button will also disappear for both users. 

Figure 11: Block Program Page

Encryption feature 

When a user toggles the encryption button for his/her profile, the encryption state of the user profile will first be updated and stored in the GunDB database, the bio of the user displayed in the profile will then be encrypted and the encrypted bio will be stored in the GunDB database.  

Both the original and encrypted bio are stored in the GunDB database, if the encryption button is enabled, the encrypted bio will be fetched in the GunDB database and displayed to others visiting the user's profile. 

Figure 12: Encryption Program Page

Conclusion

By creating a Web 3.0-based social media platform, this project sought to solve the important concerns of user ownership and data privacy that are common in popular social media platforms. The platform makes use of decentralized technologies like GunDB, IPFS, and blockchain concepts to provide safe data processing, user independence, and censorship resistance. 

Key Achievements 

Decentralized & Secure 

  • Peer-to-peer data storage (GunDB/IPFS) removes single-point failures 
  • End-to-end encryption for private chats 

Core Functionality & UX

  •  Account creation, posting, commenting, and private messaging—all real-time synchronized 
    Intuitive Svelte/SvelteKit interface with robust notifications 

Data Ownership 

  • Users control their content; encryption toggles and decentralized storage block unauthorized access

Limitations

  • Scalability: P2P sync may slow down with a large, distributed user base 
  • Storage: Browsers can't natively handle big media in GunDB—IPFS helps but adds complexity 
  • Adoption: No “forgot password” flow may deter mainstream users 

Future Development

  • Scalable Architecture: Combine GunDB with OrbitDB or on-chain storage for high-volume use 
  • Advanced Privacy: Integrate zero-knowledge proofs for seamless, private authentication/sharing 
Jonathan Chiu
Marketing Director
3DP Technology Limited

Jonathan handles all external affairs include business development, patents write up and public relations. He is frequently interviewed by media and is considered a pioneer in 3D printing products.

Krutz Cheuk
Biomedical Engineer
Hong Kong Sanatorium & Hospital

After graduating from OUHK, Krutz obtained an M.Sc. in Engineering Management from CityU. He is now completing his second master degree, M.Sc. in Biomedical Engineering, at CUHK. Krutz has a wide range of working experience. He has been with Siemens, VTech, and PCCW.

Hugo Leung
Software and Hardware Engineer
Innovation Team Company Limited

Hugo Leung Wai-yin, who graduated from his four-year programme in 2015, won the Best Paper Award for his ‘intelligent pill-dispenser’ design at the Institute of Electrical and Electronics Engineering’s International Conference on Consumer Electronics – China 2015.

The pill-dispenser alerts patients via sound and LED flashes to pre-set dosage and time intervals. Unlike units currently on the market, Hugo’s design connects to any mobile phone globally. In explaining how it works, he said: ‘There are three layers in the portable pillbox. The lowest level is a controller with various devices which can be connected to mobile phones in remote locations. Patients are alerted by a sound alarm and flashes. Should they fail to follow their prescribed regime, data can be sent via SMS to relatives and friends for follow up.’ The pill-dispenser has four medicine slots, plus a back-up with a LED alert, topped by a 500ml water bottle. It took Hugo three months of research and coding to complete his design, but he feels it was worth all his time and effort.

Hugo’s public examination results were disappointing and he was at a loss about his future before enrolling at the OUHK, which he now realizes was a major turning point in his life. He is grateful for the OUHK’s learning environment, its industry links and the positive guidance and encouragement from his teachers. The University is now exploring the commercial potential of his design with a pharmaceutical company. He hopes that this will benefit the elderly and chronically ill, as well as the society at large.

Soon after completing his studies, Hugo joined an automation technology company as an assistant engineer. He is responsible for the design and development of automation devices. The target is to minimize human labor and increase the quality of products. He is developing products which are used in various sections, including healthcare, manufacturing and consumer electronics.

Course Code Title Credits
  COMP S321F Advanced Database and Data Warehousing 5
  COMP S333F Advanced Programming and AI Algorithms 5
  COMP S351F Software Project Management 5
  COMP S362F Concurrent and Network Programming 5
  COMP S363F Distributed Systems and Parallel Computing 5
  COMP S382F Data Mining and Analytics 5
  COMP S390F Creative Programming for Games 5
  COMP S492F Machine Learning 5
  ELEC S305F Computer Networking 5
  ELEC S348F IOT Security 5
  ELEC S371F Digital Forensics 5
  ELEC S431F Blockchain Technologies 5
  ELEC S425F Computer and Network Security 5
 Course CodeTitleCredits
 ELEC S201FBasic Electronics5
 IT S290FHuman Computer Interaction & User Experience Design5
 STAT S251FStatistical Data Analysis5
 Course CodeTitleCredits
 COMPS333FAdvanced Programming and AI Algorithms5
 COMPS362FConcurrent and Network Programming5
 COMPS363FDistributed Systems and Parallel Computing5
 COMPS380FWeb Applications: Design and Development5
 COMPS381FServer-side Technologies and Cloud Computing5
 COMPS382FData Mining and Analytics5
 COMPS390FCreative Programming for Games5
 COMPS413FApplication Design and Development for Mobile Devices5
 COMPS492FMachine Learning5
 ELECS305FComputer Networking5
 ELECS363FAdvanced Computer Design5
 ELECS425FComputer and Network Security5