{"id":47610971,"url":"https://github.com/lernza/lernza","last_synced_at":"2026-04-01T20:11:03.500Z","repository":{"id":344161231,"uuid":"940869209","full_name":"lernza/lernza","owner":"lernza","description":"Learn-to-earn platform on Stellar. Create quests, complete milestones, earn tokens.","archived":false,"fork":false,"pushed_at":"2026-03-28T15:11:24.000Z","size":1949,"stargazers_count":18,"open_issues_count":140,"forks_count":60,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-28T15:37:12.052Z","etag":null,"topics":["defi","education","learn-to-earn","react","rust","smart-contracts","soroban","stellar","typescript","web3"],"latest_commit_sha":null,"homepage":"https://lernza.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lernza.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-01T00:23:17.000Z","updated_at":"2026-03-28T15:11:28.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/lernza/lernza","commit_stats":null,"previous_names":["lernza/lernza"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/lernza/lernza","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lernza%2Flernza","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lernza%2Flernza/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lernza%2Flernza/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lernza%2Flernza/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lernza","download_url":"https://codeload.github.com/lernza/lernza/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lernza%2Flernza/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31291403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["defi","education","learn-to-earn","react","rust","smart-contracts","soroban","stellar","typescript","web3"],"created_at":"2026-04-01T20:11:02.594Z","updated_at":"2026-04-01T20:11:03.489Z","avatar_url":"https://github.com/lernza.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://lernza.com\"\u003e\n    \u003cimg src=\".github/assets/banner.svg\" alt=\"Lernza — Learn. Earn. On-chain.\" width=\"100%\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/lernza/lernza\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/lernza/lernza?style=flat-square\u0026color=FACC15\u0026labelColor=000\u0026logo=github\u0026logoColor=FACC15\" alt=\"Stars\"\u003e\u003c/a\u003e\u0026nbsp;\n  \u003ca href=\"https://stellar.org\"\u003e\u003cimg src=\"https://img.shields.io/badge/Stellar-Soroban-FACC15?style=flat-square\u0026logo=stellar\u0026logoColor=FACC15\u0026labelColor=000\" alt=\"Stellar Soroban\"\u003e\u003c/a\u003e\u0026nbsp;\n  \u003ca href=\"https://github.com/lernza/lernza/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22\"\u003e\u003cimg src=\"https://img.shields.io/github/issues/lernza/lernza/good%20first%20issue?style=flat-square\u0026color=FACC15\u0026labelColor=000\u0026label=good%20first%20issues\u0026logo=git\u0026logoColor=FACC15\" alt=\"Good First Issues\"\u003e\u003c/a\u003e\u0026nbsp;\n  \u003ca href=\"https://github.com/lernza/lernza/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-MIT-FACC15?style=flat-square\u0026labelColor=000\u0026logo=opensourceinitiative\u0026logoColor=FACC15\" alt=\"MIT License\"\u003e\u003c/a\u003e\u0026nbsp;\n  \u003ca href=\"https://codecov.io/gh/lernza/lernza\"\u003e\u003cimg src=\"https://img.shields.io/codecov/c/github/lernza/lernza?style=flat-square\u0026color=FACC15\u0026labelColor=000\u0026logo=codecov\u0026logoColor=FACC15\" alt=\"Coverage\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003e **The idea is simple:** I want to help my brother learn to code. I create a Quest, enroll him, set milestones like \"Build your first API\" and \"Deploy a smart contract,\" and fund it with tokens. He completes them, gets verified, earns. That's Lernza. **Commitment through incentive.**\n\n## Why Lernza?\n\nTraditional learning platforms rely on willpower alone. Lernza adds **skin in the game** — real financial incentives locked in smart contracts. The creator puts up tokens, the learner earns them by proving they've done the work. No middleman, no trust required, just code.\n\n\u003ctable width=\"100%\"\u003e\n  \u003ctr\u003e\n    \u003ctd width=\"50%\"\u003e\n      \u003cstrong\u003eFor companies\u003c/strong\u003e\n      \u003cbr/\u003e\n      Onboard new devs with milestone-based token rewards\n    \u003c/td\u003e\n    \u003ctd width=\"50%\"\u003e\n      \u003cstrong\u003eFor DAOs\u003c/strong\u003e\n      \u003cbr/\u003e\n      Fund community education with verifiable outcomes\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd width=\"50%\"\u003e\n      \u003cstrong\u003eFor teachers\u003c/strong\u003e\n      \u003cbr/\u003e\n      Incentivize students with micro-rewards per module\n    \u003c/td\u003e\n    \u003ctd width=\"50%\"\u003e\n      \u003cstrong\u003eFor mentors\u003c/strong\u003e\n      \u003cbr/\u003e\n      Back a mentee's learning journey with real stakes\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003cbr /\u003e\n\n## How It Works\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\".github/assets/how-it-works.svg\" alt=\"How Lernza works: Create → Fund → Learn → Earn\" width=\"100%\" /\u003e\n\u003c/p\u003e\n\n\u003cbr /\u003e\n\n## Getting Started\n\n```bash\ngit clone https://github.com/lernza/lernza.git\ncd lernza\n\n# Smart contracts\ncargo test --workspace      # run the current contract workspace test suite\nstellar contract build      # Optimized WASM\n\n# Frontend\ncd frontend\npnpm install\ncp .env.example .env.local  # configure environment variables\npnpm dev                    # → localhost:5173\n```\n\nInstall [Freighter](https://freighter.app), switch to **Testnet**, and connect.\n\nFor contract deployment to Stellar testnet, see [docs/deploy-testnet.md](docs/deploy-testnet.md).\n\n### Current Delivery Stage\n\nLernza is currently a **contract-first project with a partially wired frontend**.\n\n- The Soroban contracts are implemented and tested in the Rust workspace.\n- The frontend has working wallet flows and selected read paths, but several write flows are still simulated in the UI.\n- Profile earnings now read the aggregate on-chain total from the rewards contract, but detailed payout history is not indexable yet.\n\n\u003cbr /\u003e\n\n## Roadmap\n\n| Milestone                     | Status      | Focus                                         |\n| :---------------------------- | :---------- | :-------------------------------------------- |\n| **M1** Quest Foundation       | In Repo     | Core contract structure, validation, tooling  |\n| **M2** Quest Engine           | In Progress | Deadlines live, visibility is discovery-only, funding models still pending |\n| **M3** Neo-Brutalism UI       | In Repo     | Frontend screens and design system prototype  |\n| **M4** Full Stack Integration | Partial     | Wallet connected, some contract reads wired, several flows still mocked |\n| **M5** Quality \u0026 Advanced     | Planned     | Security audit, indexing, advanced features   |\n\nSee the full [project board](https://github.com/orgs/lernza/projects/1) for all 64 issues.\n\n\u003cbr /\u003e\n\n## Dive Deeper\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eArchitecture\u003c/strong\u003e\u003c/summary\u003e\n\u003cbr/\u003e\n\nThree independent Soroban smart contracts orchestrated by the frontend:\n\n```mermaid\nsequenceDiagram\n    participant Admin\n    participant Quest as Quest Contract\n    participant Milestone as Milestone Contract\n    participant Rewards as Rewards Contract\n    participant Lerner\n\n    Note over Admin, Quest: Phase 1: Setup\n    Admin-\u003e\u003eQuest: create_quest(owner, name, ...)\n    Admin-\u003e\u003eRewards: fund_quest(funder, quest_id, amount)\n\n    Note over Admin, Milestone: Phase 2: Engagement\n    Admin-\u003e\u003eQuest: add_enrollee(quest_id, lerner_addr)\n    Admin-\u003e\u003eMilestone: create_milestone(owner, quest_id, title, ...)\n\n    Note over Admin, Lerner: Phase 3: Completion\n    Lerner-\u003e\u003eAdmin: Proves completion (external)\n    Admin-\u003e\u003eMilestone: verify_completion(owner, quest_id, ms_id, lerner_addr)\n    Admin-\u003e\u003eRewards: distribute_reward(authority, quest_id, lerner_addr, amount)\n    Rewards-\u003e\u003eLerner: Transfers USDC\n```\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\".github/assets/architecture.svg\" alt=\"Lernza architecture\" width=\"100%\" /\u003e\n\u003c/p\u003e\n\nNeed the transaction-by-transaction flow? See the [contract interaction diagrams](docs/contract-interaction-diagrams.md) for quest creation, enrollment, funding, and reward distribution sequences rendered with GitHub-native Mermaid.\n\n**Why three contracts?**\n\n- **Separation of concerns** — each contract has a single responsibility\n- **Independent upgradability** — update rewards logic without touching quest management\n- **Smaller WASM binaries** — each stays well under Soroban's 256KB limit\n- **Clearer security boundaries** — auth and permissions are scoped per contract\n\n**Why no backend?**\nThe blockchain IS the backend. All state lives on Stellar's ledger. Zero infrastructure costs, zero database management, full transparency.\n\n**Integration Status**\n\n| Area                    | Status                  | Contract Method     |\n| :---------------------- | :---------------------- | :------------------ |\n| **Quest Creation**      | Frontend flow still simulated | `create_quest`      |\n| **Enrollment**          | Contract available, UI orchestration still incomplete | `add_enrollee`      |\n| **Milestone Track**     | Contract available, UI still partly mock-backed | `create_milestone`  |\n| **Verification**        | Contract available, not fully wired in UI | `verify_completion` |\n| **Reward Distribution** | Contract available, not fully wired in UI | `distribute_reward` |\n| **Profile \u0026 Analytics** | Aggregate earnings wired; detailed history still unavailable | `get_user_earnings` |\n\n**Privacy model**\n\n`Visibility::Private` is currently **not a confidentiality feature**. It only removes a quest from public discovery helpers such as `list_public_quests`. If a caller knows a quest id, on-chain reads like `get_quest`, `get_enrollees`, and `is_enrollee` remain queryable.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eTech Stack\u003c/strong\u003e\u003c/summary\u003e\n\u003cbr/\u003e\n\n| Layer               | Technology                                                |\n| :------------------ | :-------------------------------------------------------- |\n| **Smart Contracts** | Rust + Soroban SDK — 3 contracts compiled to WASM         |\n| **Frontend**        | React 19 + TypeScript 5.9 + Vite 8                        |\n| **UI**              | shadcn/ui + Tailwind CSS v4 — neo-brutalist design system |\n| **Wallet**          | Freighter — Stellar browser wallet                        |\n| **Network**         | Stellar Testnet (Soroban-enabled)                         |\n| **CI**              | GitHub Actions — lint, test, build on every PR            |\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eSmart Contracts\u003c/strong\u003e\u003c/summary\u003e\n\u003cbr/\u003e\n\n**Quest Contract** — `contracts/quest/`\n\n| Function                                                                                         | Description                            |\n| :----------------------------------------------------------------------------------------------- | :------------------------------------- |\n| `create_quest(owner, name, description, token_addr, visibility, category, tags, enrollment_cap)` | Create a new quest with a reward token |\n| `add_enrollee(quest_id, enrollee)`                                                               | Enroll a learner (owner only)          |\n| `remove_enrollee(quest_id, enrollee)`                                                            | Remove a learner (owner only)          |\n| `get_quest(quest_id)` / `get_enrollees(quest_id)`                                                | Query quest data by id (including quests marked `Private`) |\n| `is_enrollee(quest_id, user)`                                                                    | Check enrollment status                |\n| `archive_quest(quest_id)`                                                                        | Archive a quest (owner only)           |\n| `set_visibility(quest_id, visibility)`                                                           | Update public discovery visibility (not confidentiality) |\n| `list_public_quests(start, limit)`                                                               | List public quests with pagination     |\n\n**Milestone Contract** — `contracts/milestone/`\n\n| Function                                                         | Description                                                   |\n| :--------------------------------------------------------------- | :------------------------------------------------------------ |\n| `initialize(admin, quest_contract, certificate_contract)`        | Initialize milestone contract (one-time)                      |\n| `create_milestone(owner, quest_id, title, desc, reward_amount)`  | Add a milestone to a quest                                    |\n| `verify_completion(owner, quest_id, milestone_id, enrollee)`     | Verify a learner completed a milestone                        |\n| `submit_for_review(enrollee, quest_id, milestone_id, proof_url)` | Submit milestone for review                                   |\n| `approve_completion(owner, quest_id, milestone_id, enrollee)`    | Approve a submitted milestone                                 |\n| `get_milestones(quest_id)`                                       | List all milestones in a quest                                |\n| `is_completed(quest_id, milestone_id, enrollee)`                 | Check completion status                                       |\n| `set_verification_mode(owner, quest_id, mode)`                   | Set verification mode (OwnerOnly/SelfVerify/SubmitAndApprove) |\n| `set_distribution_mode(owner, quest_id, milestone_id, mode)`     | Set reward distribution mode (Flat/Competitive/Custom)        |\n\n**Rewards Contract** — `contracts/rewards/`\n\n| Function                                                            | Description                                            |\n| :------------------------------------------------------------------ | :----------------------------------------------------- |\n| `initialize(admin, token_addr, quest_contract, milestone_contract)` | Set the reward token and contract addresses (one-time) |\n| `fund_quest(funder, quest_id, amount)`                              | Deposit tokens into a quest's pool                     |\n| `distribute_reward(authority, quest_id, enrollee, amount)`          | Send reward to a learner                               |\n| `get_pool_balance(quest_id)`                                        | Get quest pool balance                                 |\n| `get_user_earnings(user)`                                           | Get total earnings for a user                          |\n| `get_total_distributed()`                                           | Get total rewards distributed across all quests        |\n\n**Patterns:**\n\n- **Auth:** `address.require_auth()` + storage-based ownership checks\n- **Storage:** Instance (counters), Persistent (entities/auth), Temporary (cooldowns)\n- **TTL:** Bump 518,400 ledgers (~30 days), Threshold 120,960 (~7 days)\n- **No cross-contract calls** — frontend orchestrates the flow\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eProject Structure\u003c/strong\u003e\u003c/summary\u003e\n\u003cbr/\u003e\n\n```\nlernza/\n├── contracts/\n│   ├── quest/              # Quest creation + enrollment\n│   ├── milestone/          # Milestone definition + completion\n│   ├── rewards/            # Token pools + reward distribution\n│   └── certificate/        # NFT certificates for quest completion\n├── frontend/\n│   ├── src/\n│   │   ├── components/     # shadcn/ui + Navbar\n│   │   ├── pages/          # Landing, Dashboard, Quest, Profile\n│   │   ├── hooks/          # useWallet (Freighter)\n│   │   └── lib/            # Utilities + mock data\n│   └── public/             # Logo, favicon, OG image\n├── .github/\n│   ├── workflows/          # CI + Release\n│   ├── assets/             # README SVGs\n│   └── ISSUE_TEMPLATE/\n├── CONTRIBUTING.md\n├── SECURITY.md\n└── LICENSE                 # MIT\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003ePrerequisites\u003c/strong\u003e\u003c/summary\u003e\n\u003cbr/\u003e\n\n| Tool                   | Install                                                                                                         |\n| :--------------------- | :-------------------------------------------------------------------------------------------------------------- |\n| **Rust** + WASM target | [rustup.rs](https://rustup.rs) → `rustup target add wasm32-unknown-unknown`                                     |\n| **Stellar CLI** 25.x   | `brew install stellar-cli` or [docs](https://developers.stellar.org/docs/tools/developer-tools/cli/install-cli) |\n| **Node.js** 24.12.0    | [nodejs.org](https://nodejs.org) or use `.nvmrc` with nvm                                                       |\n| **Freighter** wallet   | [freighter.app](https://freighter.app) (browser extension)                                                      |\n\n\u003c/details\u003e\n\n\u003cbr /\u003e\n\n## Contributing\n\nWe'd love your help. Here's how to jump in:\n\n1. Browse the [good first issues](https://github.com/lernza/lernza/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) — they're scoped and ready to pick up\n2. Read [CONTRIBUTING.md](CONTRIBUTING.md) for setup and conventions\n3. Comment on an issue to claim it, then open a PR\n\nSee [SECURITY.md](SECURITY.md) for vulnerability disclosure.\n\n\u003cbr /\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/lernza/lernza\"\u003e\n    \u003cimg src=\".github/assets/star-repo.svg\" alt=\"Star this repo\" width=\"100%\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/lernza/lernza/stargazers\"\u003e\n    \u003cpicture\u003e\n      \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://api.star-history.com/svg?repos=lernza/lernza\u0026type=Date\u0026theme=dark\u0026lernza\" /\u003e\n      \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://api.star-history.com/svg?repos=lernza/lernza\u0026type=Date\u0026lernza\" /\u003e\n      \u003cimg alt=\"Star History Chart\" src=\"https://api.star-history.com/svg?repos=lernza/lernza\u0026type=Date\u0026lernza\" width=\"100%\" /\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr /\u003e\n\n\u003ch3 align=\"center\"\u003eContributors\u003c/h3\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/lernza/lernza/graphs/contributors\"\u003e\n    \u003cimg src=\"https://stg.contrib.rocks/image?repo=lernza/lernza\" alt=\"Contributors\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr /\u003e\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003csub\u003e\u003cstrong\u003eCommitment through incentive.\u003c/strong\u003e Licensed under \u003ca href=\"LICENSE\"\u003eMIT\u003c/a\u003e.\u003c/sub\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flernza%2Flernza","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flernza%2Flernza","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flernza%2Flernza/lists"}