solanabr
superteam-academy
TypeScript

Onchain learning platform for Solana builders.

Last updated Jul 10, 2026
16
Stars
102
Forks
30
Issues
0
Stars/day
Attention Score
86
Language breakdown
TypeScript 79.1%
Rust 8.7%
PLpgSQL 6.8%
CSS 4.3%
JavaScript 0.8%
Shell 0.2%
โ–ธ Files click to expand
README

Superteam Academy

A Solana-native learning platform with on-chain credentials.

Soulbound XP tokens, NFT certificates, interactive coding challenges, and gamified progression โ€” all on Solana.

Built by Superteam Brazil

OverviewTech StackLocal DevelopmentEnvironment VariablesDeploymentDocumentation

Solana Token-2022 Metaplex Core Next.js 14 Anchor TypeScript MIT License


Overview

Superteam Academy is an open-source learning management system built on Solana. Learners enroll in courses, complete lessons to earn soulbound XP tokens, receive NFT certificates on course completion, and collect achievements โ€” all with on-chain verification.

Feature Highlights

On-Chain Credentials

  • Soulbound XP tokens via Token-2022 (NonTransferable + PermanentDelegate) โ€” cannot be transferred or self-burned
  • NFT certificates via Metaplex Core, auto-minted on course completion and frozen to the learner's wallet (PermanentFreezeDelegate)
  • On-chain lesson tracking using a bitmap stored in the Enrollment PDA โ€” each bit represents a lesson
Interactive Learning
  • Code challenges with an in-browser Monaco Editor (JS/TS syntax highlighting, automated test cases)
  • Rust/Anchor program compilation via a sandboxed build server
  • Content lessons with rich markdown rendering
  • Program deployment and interaction directly from lesson pages
Gamification
  • XP rewards for lesson completions (10-100 XP based on difficulty)
  • Level progression: Level = floor(sqrt(totalXP / 100))
  • Daily streaks tracking consecutive learning days
  • 15 achievements across 5 categories (Progress, Streaks, Skills, Community, Special)
  • Celebration popups for level-ups, achievements, and certificate minting
Community Forum
  • Discussion threads with category browsing and full-text search
  • Answers with upvoting/downvoting and accepted answer marking
  • Content flagging for moderation
  • Community XP rewards for participation
Daily Quests
  • Rotating daily objectives (complete a lesson, earn XP, etc.)
  • Bonus XP for first daily completion and streak bonuses
Platform
  • i18n: English, Portuguese (pt-BR), Spanish
  • Dark/light mode with Solana-branded gradient theme
  • Wallet auth (SIWS) supporting Phantom, Solflare, and Backpack
  • Google OAuth + GitHub OAuth for low-friction onboarding
  • Admin panel for deploying courses and achievements on-chain
  • Live leaderboard with weekly, monthly, and all-time XP rankings
  • In-browser program deployment with wallet-signed transactions

Tech Stack

| Layer | Technology | | ---------------- | --------------------------------------------------------------------- | | Frontend | Next.js 14 (App Router), React 18, Tailwind CSS, shadcn/ui + Radix UI | | CMS | Sanity v3 (GROQ queries) | | Database / Auth | Supabase (Postgres, RLS, Auth) | | On-Chain Program | Solana, Anchor 0.31+ (Rust) | | XP Tokens | Token-2022 (NonTransferable + PermanentDelegate) | | Credential NFTs | Metaplex Core (soulbound via PermanentFreezeDelegate) | | i18n | next-intl (EN, PT-BR, ES) | | Auth | SIWS (Sign In With Solana) + Google OAuth + GitHub OAuth | | Code Editor | Monaco Editor | | Build Server | Rust/Axum on GCP Cloud Run | | Analytics | GA4, PostHog, Sentry (all optional) | | RPC | Helius (DAS API for credential queries + leaderboard) | | Monorepo | Turborepo + pnpm 9 | | Deployment | Vercel (web) + GCP Cloud Run (build server) |

Screenshots

| Dashboard | Code Challenge | Certificate | | :-----------------------------------------: | :----------------------------------------------: | :---------------------------------------------: | | Dashboard | Code Challenge | Certificate |

Local Development

Prerequisites

For on-chain program development, you also need:

Quick Setup

# 1. Clone and install
git clone https://github.com/superteam-brazil/superteam-academy.git
cd superteam-academy
pnpm install

2. Configure environment

cp .env.example apps/web/.env.local

Replace every placeholder with a real value โ€” .env.example holds illustrative

defaults, not working credentials. Minimum to boot (see Environment Variables):

NEXTPUBLICSUPABASEURL, NEXTPUBLICSUPABASEANONKEY, SUPABASESERVICEROLEKEY,

NEXTPUBLICSANITYPROJECTID, NEXTPUBLICSANITY_DATASET.

3. Set up the database (migrations are the source of truth)

Create a Supabase project, install the Supabase CLI, then link and push:

supabase link --project-ref <your-project-ref>

supabase db push # applies supabase/migrations/ in order

supabase/schema.sql is a generated snapshot for reference โ€” do not run it directly.

4. Import seed content into Sanity

cd sanity && SANITYAPITOKEN=<your-token> node seed/import.mjs && cd ..

5. Start the dev server

pnpm dev

Open http://localhost:3000.

Minimum variables for basic dev (no on-chain features): NEXTPUBLICSUPABASEURL, NEXTPUBLICSUPABASEANONKEY, SUPABASESERVICEROLEKEY, NEXTPUBLICSANITYPROJECTID, NEXTPUBLICSANITY_DATASET.

Full on-chain features require: NEXTPUBLICPROGRAMID, NEXTPUBLICXPMINTADDRESS, PROGRAMAUTHORITYSECRET, BACKENDSIGNERSECRET. See Program Deployment for the deploy and initialize workflow.

Development Commands

pnpm dev          # Start Next.js dev server
pnpm build        # Production build
pnpm lint         # ESLint
pnpm typecheck    # TypeScript type checking
pnpm format       # Prettier formatting

Project Structure

superteam-academy/
โ”œโ”€โ”€ apps/
โ”‚   โ”œโ”€โ”€ web/                    # Next.js 14 application
โ”‚   โ”‚   โ”œโ”€โ”€ src/app/            #   App Router pages ([locale] route groups)
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ [locale]/
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ (marketing)/  # Landing page
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ (platform)/   # Authenticated routes (dashboard, courses, etc.)
โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ admin/        # Admin panel
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ api/              # API routes (auth, lessons, achievements, etc.)
โ”‚   โ”‚   โ”œโ”€โ”€ src/components/     #   UI components (auth, editor, gamification, layout)
โ”‚   โ”‚   โ”œโ”€โ”€ src/lib/            #   Utilities (supabase, sanity, solana, analytics)
โ”‚   โ”‚   โ””โ”€โ”€ src/messages/       #   i18n translation files (en, pt-BR, es)
โ”‚   โ””โ”€โ”€ build-server/           # Rust/Axum build server (GCP Cloud Run)
โ”œโ”€โ”€ onchain-academy/            # Anchor workspace (Solana program)
โ”‚   โ”œโ”€โ”€ programs/               #   On-chain program source (Rust)
โ”‚   โ””โ”€โ”€ tests/                  #   Integration + unit tests
โ”œโ”€โ”€ packages/
โ”‚   โ”œโ”€โ”€ types/                  # Shared TypeScript interfaces
โ”‚   โ”œโ”€โ”€ deploy/                 # Browser-based Solana program deployment library
โ”‚   โ””โ”€โ”€ config/                 # Shared ESLint, TS, Tailwind configs
โ”œโ”€โ”€ sanity/                     # Sanity Studio + schemas + seed data
โ”œโ”€โ”€ supabase/                   # Database schema + migrations
โ”œโ”€โ”€ scripts/                    # Helper scripts (init-program, update-program-id)
โ”œโ”€โ”€ wallets/                    # Keypairs (gitignored)
โ””โ”€โ”€ docs/                       # Documentation

Environment Variables

Copy .env.example to apps/web/.env.local and fill in values.

Supabase (Required)

| Variable | Scope | Description | | ------------------------------- | ------ | ------------------------------------------------------------------- | | NEXTPUBLICSUPABASE_URL | Client | Supabase project URL | | NEXTPUBLICSUPABASEANONKEY | Client | Public anon key (safe for browser) | | SUPABASESERVICEROLE_KEY | Server | Service role key for admin operations. Never expose to browser. |

Sanity CMS (Required)

| Variable | Scope | Description | | ------------------------------- | ------ | ------------------------------------------------------------ | | NEXTPUBLICSANITYPROJECTID | Client | Project ID from sanity.io/manage | | NEXTPUBLICSANITY_DATASET | Client | Dataset name (usually production) | | SANITYAPITOKEN | Server | Editor token for seed import script only |

Solana (Required for on-chain features)

| Variable | Scope | Description | | ----------------------------- | ------ | ------------------------------------------------------- | | NEXTPUBLICSOLANARPCURL | Client | RPC endpoint (default: https://api.devnet.solana.com) | | NEXTPUBLICSOLANA_NETWORK | Client | Network name (devnet) | | NEXTPUBLICPROGRAM_ID | Client | Program ID from anchor deploy | | NEXTPUBLICXPMINTADDRESS | Client | XP mint pubkey from initialize output |

Admin / Signing (Required for admin panel and on-chain operations)

| Variable | Scope | Description | | -------------------------- | ------ | ------------------------------------------------------------------------------------------------ | | PROGRAMAUTHORITYSECRET | Server | JSON array of authority keypair bytes (64 elements). The keypair that signed initialize. | | BACKENDSIGNERSECRET | Server | JSON array of backend signer keypair bytes. On devnet, same as PROGRAMAUTHORITYSECRET. | | XPMINTAUTHORITY_SECRET | Server | JSON array of XP mint authority keypair bytes. Signs XP token mints; omit to disable XP minting. | | ADMIN_SECRET | Server | Admin panel password (min 32 chars, random string) | | SANITYADMINTOKEN | Server | Write-enabled Sanity API token for course sync in admin panel |

Build Server (Optional -- for code compilation features)

| Variable | Scope | Description | | ---------------------- | ------ | -------------------------------------------------------------------------------- | | BUILDSERVERURL | Server | Cloud Run service URL | | BUILDSERVERAPIKEY | Server | API key for X-API-Key header (same as ACADEMYAPI_KEY on Cloud Run) | | RUSTPLAYGROUNDURL | Server | Upstream for /api/rust/execute (default: https://play.rust-lang.org/execute) |

AI Lesson Assistant (Optional)

| Variable | Scope | Description | | ---------------- | ------ | -------------------------------------------------------------- | | GEMINIAPIKEY | Server | Google Gemini API key for the in-lesson AI chat/suggest routes |

Analytics (Optional -- platform works without these)

| Variable | Scope | Description | | -------------------------------- | ------ | ---------------------------------------------------------- | | NEXTPUBLICGA4MEASUREMENTID | Client | Google Analytics 4 measurement ID | | NEXTPUBLICPOSTHOG_KEY | Client | PostHog project key | | NEXTPUBLICPOSTHOG_HOST | Client | PostHog instance URL (default: https://us.i.posthog.com) | | NEXTPUBLICSENTRY_DSN | Client | Sentry error tracking DSN (public/safe to expose) |

App URL

| Variable | Scope | Description | | --------------------- | ------ | ---------------------------------------------------------------------------------- | | NEXTPUBLICAPP_URL | Client | Base URL for sitemap, OG tags, NFT metadata URI (default: http://localhost:3000) |

Deployment

Superteam Academy deploys as a Vercel-hosted Next.js app backed by Supabase (Postgres + Auth), Sanity CMS, and a Solana on-chain program.

  • Production Deployment Guide -- Full instructions for Vercel, Supabase, Sanity, Google OAuth, GCP Cloud Run (build server), analytics, custom domains, and post-deployment checklist.
  • Program Deployment Guide -- On-chain program build, deploy, and initialize workflow (keypair generation, Anchor build, devnet deploy, XP mint creation).

On-Chain Program

Program: Superteam Academy (onchain_academy) Network: Solana Devnet Program ID: 7NeJaSRyb4Wxay3Tcd9bdpD7T3GWYUQSFyrhG8SgwE8V

The program manages the full learning lifecycle on-chain:

  • 16 instructions: initialize, create/update/close course, enroll, complete lesson, finalize course, issue/upgrade credential, create achievement type, unlock achievement, register/revoke minter, update config, unenroll, and more
  • 6 PDA account types: Config, Course, Enrollment, MinterRole, AchievementType, AchievementRecord
  • XP minting: Token-2022 soulbound tokens minted on lesson completion
  • Credential issuance: Metaplex Core NFTs minted on course completion
For deployment instructions, see docs/DEPLOY-PROGRAM.md. For system architecture, see docs/ARCHITECTURE.md.

Admin Panel

URL: /{locale}/admin (e.g., /en/admin) Auth: Enter the ADMIN_SECRET environment variable value

The admin panel bridges Sanity CMS content with the on-chain program:

  • Deploy courses: Creates the course on-chain, creates a Metaplex Core collection for the track, and syncs onChainStatus back to Sanity
  • Deploy achievements: Creates achievement types on-chain with their Metaplex Core collections
  • View sync status: See which courses and achievements are deployed on-chain
For details, see docs/ADMIN.md.

Documentation

| Document | Description | | -------------------------------------------- | ----------------------------------------------------- | | Architecture | System design, account maps, data flows, CU budgets | | CMS Guide | Sanity schema, GROQ patterns, content workflow | | Customization | Theming, i18n, gamification, and extending | | Admin Guide | Admin panel usage and course/achievement deployment | | Program Deployment | On-chain program build, deploy, and initialize | | Developer Reference | Full codebase conventions, security model, API routes |

Known Limitations / Roadmap

The on-chain program is feature-complete with 16 instructions covering the full learning lifecycle. The following items are scoped for future iterations:

  • Track collection enforcement: track_collection is validated server-side during credential issuance but is not yet enforced on-chain as an account constraint (future program upgrade).
  • Cross-course achievements: Three achievement types (Anchor Expert, Full Stack Solana, Rust Rookie) have partial frontend logic but lack proper cross-course tracking infrastructure. full-stack-solana is hardcoded to false; anchor-expert and rust-rookie use lesson ID pattern matching instead of course-level completion checks.
  • Build server: Compilation features (buildable Rust challenges + program deployment) require a separately deployed Rust/Axum build server on GCP Cloud Run. See the Deployment section for setup details.

Code Quality

  • TypeScript strict mode with zero any types
  • ESLint + Prettier enforced via Husky pre-commit hooks
  • Conventional commits: feat:, fix:, docs:, chore:, refactor:
  • All UI strings externalized via next-intl (never hardcoded)
  • Server components by default, client components only when needed
  • RLS enabled on all Supabase tables; sensitive functions restricted to service_role

Contributing

  • Fork the repository
  • Create a feature branch: git checkout -b feat/your-feature
  • Commit using conventional commits: git commit -m "feat: add quiz lesson type"
  • Push and open a pull request

License

MIT

Acknowledgments

๐Ÿ”— More in this category

ยฉ 2026 GitRepoTrend ยท solanabr/superteam-academy ยท Updated daily from GitHub