Sunset is an anonymous reporting platform that enables citizens to securely report corruption and misconduct in both public and private institutions. Built on the Midnight Network, the platform leverages zero-knowledge proofs and advanced privacy technology to protect the identity of whistleblowers while ensuring transparency and accountability.
The application allows users to submit detailed reports about corrupt practices while keeping their identity completely anonymous. This helps promote integrity in institutions and enables a more transparent and just society without fear of retaliation against those who report wrongdoing.
Key features:
- Complete anonymity for reporters using cryptographic techniques
- Secure storage of reports on blockchain with privacy preservation
- Protection against retaliation through zero-knowledge technology
- Support for reporting in both public institutions and private organizations
- Submit reports: Any whistleblower can enter all the necessary information: type of institution (public or private), the name of the institution, and the details of the complaint. The date is calculated automatically, as is the ID, and a public key for the whistleblower (without traceability to their secret key, ensuring privacy and security in the complaint).
- View reports: Review all the complaints/reports made.
- View report details: Review the details of a specific report.
- View report ownership: The person who filed the complaint/report can verify themselves in order to confirm it to the court if required.
- Private details for a comptroller: The State Comptroller may receive certain details of the complaint that should not be made public (as it may be information that compromises an investigation or national security issues).
- Feedback: The State Comptroller can send feedback on the complaint, which only the creator of the complaint can review.
- Complaint status: Adjust the complaint status (from creation to investigation and closure) to provide greater transparency to citizens regarding the actions taken.
- And much more.
- Next.js
- TypeScript
- Tailwind CSS
- Midnight Network SDK
- Node.js 22+ installed
- Docker installed (for proof server)
- Midnight proof server running
- A Midnight wallet (Lace) installed and with funds. Visit https://midnight.network/test-faucet to get testnet tokens
-
Install dependencies:
npm install
-
Setup and deploy:
npm run setup
This will:
- Compile the Compact contract (compliants.compact)
- Build TypeScript to JavaScript
- Deploy contract to the testnet
The contract will be deployed to the testnet and the address will be printed to the console, including creating the deployment.json file.
The compiled contract files will be in the
contracts/managed/compliantsfolder. -
Interact with the platform:
-
Install the Lace Midnight wallet.
-
Start the web app:
npm run dev:web
- Connect your wallet and interact with the app.
-
npm run setup- Compile, build, and deploy contractnpm run compile- Compile Compact contractnpm run build- Build TypeScriptnpm run deploy- Deploy contract to testnetnpm run cli- Interactive CLI for contractnpm run check-balance- Check wallet balancenpm run reset- Reset all compiled/built filesnpm run clean- Clean build artifactsnpm run dev:web- Run web app in development modenpm run build:web- Build web app for productionnpm run start:web- Start web app in production mode
Copy .env.example to .env and configure:
WALLET_SEED- Your 64-character wallet seed (auto-generated if you use create-mn-app)MIDNIGHT_NETWORK- Network to use (testnet)PROOF_SERVER_URL- Proof server URLCONTRACT_NAME- Contract name (compliants)
sunset/
├── contracts/
│ ├── compliants.compact # Smart contract source
│ └── managed/ # Compiled artifacts
├── src/
│ ├── deploy.ts # Deployment script
│ ├── providers/ # Shared providers
│ └── utils/ # Utility functions
├── web/
│ ├── app/ # Next.js application
│ └── components/ # Shared components
├── .env # Environment config (keep private!)
├── deployment.json # Deployment info
└── package.json # Project dependencies
MIT


