DEV Community

Cover image for Echo - Anonymous Reporting Platform with Blockchain
Jeffrey Nwankwo
Jeffrey Nwankwo

Posted on

Echo - Anonymous Reporting Platform with Blockchain

This is a submission for the Build Better on Stellar: Smart Contract Challenge : Build a dApp

What I Built

In today's digital landscape, maintaining anonymity while reporting sensitive issues is more crucial than ever. That's why I created Echo, a cutting-edge decentralized application (dApp) that harnesses blockchain technology to offer a secure, anonymous, and tamper-proof platform for reporting incidents. Whether it's a crime, vandalism, or any other wrongdoing, Echo ensures your voice is heard while safeguarding your identity.

I believe many unsolved crimes, injustices, and safety concerns remain unresolved because people fear speaking out. If they could share information with complete assurance of anonymity and data integrity, they'd be more inclined to come forward. Echo was designed to meet this need, with reports fully encrypted and securely stored on the blockchain.

At its core, Echo ensures that all reports and evidence are encrypted, stored using IPFS and Filecoin, and securely uploaded to the blockchain through Stellar's Soroban smart contracts.

Demo

Here’s a live link to try out Echo: https://echo-frontend-two.vercel.app

My Code

I developed Echo using Node.js on the backend to manage the server and interact with smart contracts via the Stellar SDK. The frontend is built with Next.js, TypeScript, Shadcn/ui, and TailwindCSS, focusing solely on rendering the UI.

Backend Repository: https://github.com/JeffreyChix/echo-backend

Frontend Repository: https://github.com/JeffreyChix/echo-frontend

Live Demo: https://echo-frontend-two.vercel.app

Journey

The project, Echo, is an anonymous reporting system built on the Stellar blockchain using Soroban smart contracts. It offers a secure, tamper-proof platform for users to report incidents like crimes or misconduct without revealing their identities. The system ensures the integrity and immutability of reports while allowing authorities to access and manage them transparently. To maintain anonymity and ease of use, users can submit reports without needing to connect a wallet, similar to how you wouldn't want to identify yourself or go through authentication when calling 911.

Smart Contract Design:

The core functionality of Echo is handled through Soroban smart contracts, which manage the creation, storage, and retrieval of reports. Here's a breakdown of the smart contract architecture:

  1. Report Submission:

    • When a user submits a report with metadata and supporting documents, the report data is encrypted, and a unique key is generated for it. This key is then used to upload the report to the blockchain via smart contracts. It serves as a reference for all future interactions related to the report, such as tracking its status and accessing updates, if the user chooses to monitor it.
  2. Data Storage and Integrity:

    • The subject, location, and files associated with the report are uploaded to IPFS (InterPlanetary File System) and persisted using Filecoin, a decentralized storage network. The resulting IPFS hashes, along with the report metadata (subject, datetime, description, location), are stored on the blockchain using Soroban smart contracts. This ensures that the data is immutable, verifiable, and accessible only through the unique key.
  3. Update Mechanism:

    • The smart contract also supports the addition of updates to a report. These updates include fields such as status, datetime, and content. Each update is encrypted and stored on the blockchain, linked to the report's unique key. This allows users to track the progress of their report anonymously, ensuring that the information cannot be tampered with.
  4. Authority Dashboard:

    • Authorities interact with the smart contract through a secure dashboard. They can retrieve reports, view attached evidence, and update the status or provide additional information. All these interactions are recorded on the blockchain, ensuring transparency and accountability.

My Motivation

Echo was motivated by the urgent need for a platform where individuals can report sensitive incidents without the risk of identification or retaliation. Victims of crimes such as sexual assault, rape, domestic violence, or other misconduct often fear coming forward due to safety concerns or social stigma, and some may not even call 911. Traditional reporting systems can be a deterrent because they typically require personal information.

Echo was created to address these issues. By using blockchain technology, the platform ensures that individuals can report incidents with complete anonymity, knowing their information will remain secure and unaltered. Soroban smart contracts and IPFS make reports immutable and verifiable by authorities, maintaining the reporter's anonymity.

What I Learned:

Throughout the development of Echo, I gained significant insights into the complexities of building a decentralized application (dApp) on the Stellar blockchain. Some key learnings include:

  1. Balancing Anonymity with Usability:

    • Ensuring complete anonymity while maintaining a user-friendly interface was a significant challenge. I learned how to implement secure, decentralized identity solutions that do not require users to provide personal information or connect a wallet.
  2. Efficient Data Management:

    • Handling large files, such as evidence uploads, in a decentralized environment required me to explore and implement IPFS integration. I learned how to optimize data storage and retrieval processes to ensure the system remains scalable and efficient.
  3. Smart Contract Optimization:

    • Writing and deploying Soroban smart contracts that are efficient, secure, and scalable was a crucial part of my learning journey. I focused on minimizing gas fees and ensuring that the contracts could handle a large number of reports and updates.

One of the aspects of Echo that I am most proud of is the unique key-based tracking system. This system allows users to monitor the status of their reports while maintaining their anonymity. By storing updates on the blockchain, I ensure that the information remains tamper-proof, with only the reporter having access through the secret key.

I am also proud of successfully implementing IPFS for evidence storage. Decentralizing the storage of sensitive files adds an extra layer of security and privacy, ensuring that even platform administrators cannot access or modify the evidence once it is uploaded.

Challenges I Faced: From Web2 to Web3 and Rusty Roads

Diving into Web3:

Starting Echo was like jumping into the deep end without knowing how to swim. Even though I’ve been coding for five years, I’d never touched blockchain tech or crypto before. When I first heard about Stellar and Soroban, it was like someone threw me into a new world with strange terms like testnets and ledgers. Web3 is a whole different beast from Web2, and I had to start from scratch, learning what all these new concepts meant. The docs were there, but they felt like trying to read a foreign language. It took me a while to get the hang of things, but now I’m really excited to dive deeper and build more dApps.

Learning Rust:

Another big challenge was Rust. I had never written any Rust code before, and it felt like learning to drive a stick shift after years of automatic. Rust’s rules and features were pretty foreign to me at first. I had to watch a bunch of tutorials and read up on it to get a handle on how it works. It was tough but also kind of thrilling to figure it out. Rust’s way of doing things made me rethink how I approach coding, and I’m glad I pushed through the learning curve.

String Manipulation Struggles:

One of the trickiest parts was dealing with string manipulation in Soroban. Since the Rust standard library isn’t available in smart contracts, working with strings became a real hassle. It was like trying to solve a puzzle with missing pieces. I had to get creative and handle some of the string operations outside the smart contracts. It was a frustrating challenge, but it taught me a lot about problem-solving and thinking outside the box.

Data Fetching Issues:

Fetching data from the blockchain turned out to be a lot slower than I expected, especially when deployed on Testnet. Even with some optimizations, it was clear that blockchain data retrieval couldn’t compete with the speed of reading from a MongoDB database. To tackle this, I had to get smart on the frontend and use caching along with Incremental Static Regeneration (ISR). This helped improve performance and made the user experience smoother despite the slow data fetching.

Despite the bumps along the way, I’m more excited than ever about exploring blockchain tech and what’s next in the world of decentralized applications.

Next Steps and Future Improvements:

While Echo is a robust solution, there are several areas where I see potential for growth and improvement:

  1. Enhanced User Interface:

    • I aim to further refine the user interface to make the submission process even more intuitive, especially for individuals who may not be familiar with blockchain technology.
  2. Robust Authentication System

    • Currently, the authentication system is basic, using GitHub OAuth just to illustrate the concept of protected routes for the demo. I plan to develop a more comprehensive onboarding process for authorities to securely log in and manage reports. This enhancement will enable more direct and efficient handling of reports while preserving the anonymity of the reporters.
  3. Scalability and Performance Optimization:

    • As more users adopt Echo, maintaining the platform's responsiveness and scalability is a priority. Since Web3 and Stellar are new to me, I will continue learning and optimizing the smart contracts and backend infrastructure to handle increased traffic and data storage demands.

Echo represents a significant advancement in anonymous reporting systems, utilizing blockchain technology to offer a secure, transparent, and decentralized platform. Building Echo has been both challenging and rewarding, and I am excited about its potential to help individuals report sensitive issues without fear. As I continue to learn and enhance Echo, my focus remains on ensuring that every voice can be heard, no matter how silent it may seem.

I welcome any feedback or criticism regarding what might have gone wrong, the feasibility of the project, areas for improvement, and potential integrations.

Top comments (3)

Collapse
 
danieljancar profile image
Daniel Jancar • Edited

Looks good, by who would the platform be managed to ensure full decentralization and anonymity (since there's a central backend for the frontend, acting as a middleman) and would it be set up by a Police Departement themself for example? 👏

Collapse
 
jeffsalive profile image
Jeffrey Nwankwo

Thank you! Yes, my initial idea is to implement a rigorous onboarding process for authorities like the police department. This would allow them to securely invite and assign officers to handle reports and manage updates.

I also considered setting up a private IPFS network for this, where authorities would have full control over managing the reports. It wouldn’t be just a basic login and registration system.

Collapse
 
jeffsalive profile image
Jeffrey Nwankwo

But structured in a way that, despite having full control, they would never be able to tamper or suppress the reports.

Still trying to figure out how that would work. 😀