This project demonstrates a zero-knowledge proof system for location verification using Noir and React.
- Node.js (version 22.9.0 or later)
- Noir (version 0.34.0)
- Barretenberg (version 0.55.0)
-
Clone the repository:
git clone https://github.com/mayocca/zk-location-app.git cd zk-location-app -
Install dependencies:
npm install -
Compile the Noir circuit:
nargo compile
-
Start the development server:
npm run dev -
Open your browser and navigate to
http://localhost:5173(or the port specified in the console output).
circuits/: Contains the Noir circuit codesrc/: React application source codetarget/: Compiled circuit output
- Edit the Noir circuit in
circuits/src/main.nr. - Recompile the circuit using
make verifier.
- The main application logic is in
src/App.tsx. - The Prover component is in
src/components/prover.tsx. - The Verifier component is in
src/components/verifier.tsx.
To run the Noir circuit tests:
nargo test
To build the project for production:
npm run build
The output will be in the dist/ directory.
- This project uses Vite as the build tool and development server.
- Tailwind CSS is used for styling.
- The project is configured to use TypeScript.
For more detailed information about the components and their usage, refer to the comments in the source code.