A Next.js web application for the Tokamak Sybil-Resistance system, creating an identity-proving algorithm and zk-rollup network for user identification.
Sybil Guard is a blockchain security project focused on:
- ZK-RollUp: A layer 2 scaling solution with enhanced security features
- Proof of Liquidity: LP to pools of your choice, engaging in PoL in exchange for blobspace
- Interoperability: Seamless integration with various blockchain networks
- Flexible Gas Fees: Support for using various tokens as gas fees
- Sequencer: Initially the zk-rollup will have just one operator (sequencer) that stores state (accounts, vouches, scores) as a Merkle tree
- Smart Contract: Receives batches from the sequencer, verifies snark proofs, and updates state root
- Circuit: Contains the logic for applying transactions and updating the state tree, written in circom language
- Frontend: Next.js 14, React 18, TypeScript
- Styling: TailwindCSS, Framer Motion
- Authentication: NextAuth.js with Prisma adapter
- Blockchain Integration: ethers.js, wagmi, viem
- State Management: Zustand
- Data Visualization: Chart.js, React Flow
- Testing: Jest, React Testing Library
- Node.js 18+
- Yarn or npm
- PostgreSQL database (for Prisma)
-
Clone the repository:
git clone https://github.com/yourusername/syb-frontend.git cd syb-frontend
-
Install dependencies:
yarn install # or npm install
-
Set up environment variables: Create a
.env.local
file in the root directory with the following variables:DATABASE_URL="postgresql://username:password@localhost:5432/sybil_guard" NEXTAUTH_SECRET="your-secret-key" NEXTAUTH_URL="http://localhost:3000" # Add any other required environment variables
-
Run database migrations:
npx prisma migrate dev
-
Start the development server:
yarn dev # or npm run dev
-
Open http://localhost:3000 with your browser to see the application.
src/app
: Next.js app router pages and API routessrc/components
: Reusable React componentssrc/blockchain
: Blockchain integration servicessrc/context
: React context providerssrc/hooks
: Custom React hookssrc/utils
: Utility functionssrc/types
: TypeScript type definitionsprisma
: Database schema and migrations
Run tests with:
yarn test
# or
npm test
The project can be deployed on Vercel or any other platform that supports Next.js applications.
All rights reserved. © SYB 2025