Aranya is a course platform that provides on-chain credentials for learners and teachers in the form of Tree NFTs that grow as course milestones are reached. Aranya leverages the Flare Data Connector to ensure data integrity of teachers and learners. Aranya smart contracts are currently only deployed on Flare Coston2 testnet.
Warning: this project is in a very early stage and has not been tested thoroughly.
- When the teacher creates a course on the frontend, the course is first saved to the database.
- An attestation is submitted and a proof is retrieved with the courseId and teacherId (connected wallet address).
- The proof is sent as argument to the createCourse function call on the CourseManager contract, ensuring integrity of teacherId and courseId.
- Clones of CreatorNFT and LearnerNFT are deployed.
- A token of CreatorNFT is minted to the teacher address.
- When a learner enrolls in a course on the frontend, the enrollment is first saved to the database.
- An attestation is submitted and a proof is retrieved with the courseId and learnerId (connected wallet address).
- The proof is sent as argument to the enroll function call on the CourseManager contract, ensuring integrity of learnerId and courseId.
- A token on the LearnerNFT contract tied to the course is minted to the learner.
- When a teacher or learner reaches certain milestones in their course (X% of modules completed for learner, or X number of learners that completed course for teacher), upgrade NFT can be called from the frontend.
- An attestation is submitted and a proof is retrieved with the courseId and either the number of completions (teacher) or progress percentage (learner).
- The updateMilestone function is called on the LearnerNFT or CreatorNFT contract with the proof as argument, ensuring integrity of learner or teacher data.
Aranya has a Rust backend and a NextJS frontend. To run the repository locally you need to have Rust installed as well as TypeScript and Node. You will also need ngrok because the backend endpoints on localhost need to be accesible for Flare the Flare Data Connector to interact with.
cd backend
cp .env.example .env
cargo install
cargo run
In another tab:
ngrok http 4000
cd webapp
cp .env.example .env
npm install
npm run dev