This framework provides a role-based access control system that allows users to manage who can access specific content. The system combines smart contracts, attestations, and encryption to create a flexible and secure content management solution.
Users can create their own access control sessions using smart contracts and assign role-based tags to different accounts. The system uses EAS (Ethereum Attestation Service) to create verifiable role attestations.
Through Lit Protocol integration, content owners can encrypt their data and configure precise access rules. Only users with the appropriate roles can decrypt and access the protected content.
Content is stored on IPFS, making it publicly available but only accessible to authorized users who can successfully decrypt it.
The project consists of three main components:
- Smart Contracts: Handle role assignments and access control logic
- Backend: Manages Lit Protocol integration and encryption operations
- Frontend: Provides the user interface built with SvelteKit
Make sure you have the following installed:
- Node.js and npm
- A wallet for blockchain interactions
- Clone the repository
- Install dependencies:
npm install
Note that you have to npm install in both the root directory and Frontend/ directory
- Copy the example environment file and configure your settings:
cp env.example .env
Run the development server in the Frontend/ directory :
npm run devDeploy contracts using Hardhat:
npx hardhat run scripts/deploy.ts --network <network-name>contracts/: Solidity smart contracts for the access control systemBackend/: Server-side logic including Lit Protocol integrationFrontend/: SvelteKit application with user interfacescripts/: Deployment and utility scriptstest/: Contract tests