/zensor

A novel authentication protocol for IoT devices using the state-of-the-art zk-SNARK algorithm with SRAM PUF as the device fingerprint.

Primary LanguageTypeScript

Bandada-Semaphore Feedback App

Create your unique identity, join a group and provide your feedback anonymously.

This application shows Bandada usage with Semaphore in order to signal anonymously inside a Semaphore-compatible off-chain groups. You will be able to access one group without any restriction (manual) and the other only if you have a minimum required number of followers in your GitHub account. You can remove the association between your GitHub account and the Bandada application at any time, as indicated here.

This project was created using create-next-app and is based on Next.js, a framework for building React applications.

To learn more about Bandada and different types of groups, please visit the repository and documentation. Also, you can learn more about the differences between Semaphore and Bandada here.

⚙️ Live Demo

The Feedback Application is already deployed and configured with a manual off-chain group and a credential off-chain group.

You can begin interacting with both immediately without any additional configuration. Alternatively, you can watch a step-by-step walkthrough of how to use each application.

🏛️ Architecture

Bandada-Semaphore Off-chain App Architecture

Use manual off-chain group locally

Please make sure you are on the main branch.

Clone the Bandada repository and follow the README to run it locally and create your first manual off-chain group:

git clone https://github.com/privacy-scaling-explorations/bandada.git

To get started, create a Supabase account and a free-tier project with basic configuration.

Once your project is ready, access the Table Editor from your project dashboard (you can use the Supabase CLI if you prefer) and create the following tables with the columns as shown in the image:

  • feedback, which will store all feedback (= signals) sent from users (= identities).
  • Store all nullifier hashes in the nullifier_hash table to prevent double signaling. Refer to the Semaphore documentation for more information.
  • Store all Semaphore group roots in the root_history table to fix the Merkle Tree (= Semaphore groups) roots expiration issue. Refer to the conversation on GitHub for more information.

Tables schema

🛠 Installation

Clone this repository running the following command in your terminal:

git clone https://github.com/vplasencia/bandada-semaphore-demo.git

and install the dependencies:

cd bandada-semaphore-demo && yarn

🔧 Configuration

Copy the environment variables for the development environment, run this command:

cp .env.development.local.example .env.development.local
# These can be retrieved from the Bandada dashboard (e.g., https://<dashboard_url>/groups/off-chain/<group_id>).
NEXT_PUBLIC_BANDADA_GROUP_ID=<bandada-group-id>
NEXT_PUBLIC_BANDADA_GROUP_API_KEY=<bandada-group-api-key>
# These can be retrieved in the Supabase dashboard (Settings -> API -> URL / Project API keys).
NEXT_PUBLIC_SUPABASE_API_URL=<supabase-api-url>
NEXT_PUBLIC_SUPABASE_ANON_KEY=<supabase-anon-key>

📜 Usage

To start the applications in a development environment, run the following command:

yarn dev

The Feedback and other apps will be deployed at the following URLs (without any changes to the default configurations):

👨‍💻 Contributing

Code quality and formatting

Run ESLint to analyze the code and catch bugs:

yarn lint

Run Prettier to check formatting rules:

yarn prettier

or to format the code automatically:

yarn prettier:write