A blockchain education platform built on the Stellar network, delivering verifiable on-chain credentials and token-based learning incentives.
Brain-Storm is a full-stack, monorepo education platform that leverages the Stellar blockchain to issue tamper-proof credentials when learners complete courses. It is a rebranded and extended fork of the StrellerMinds project by StarkMindsHQ, adapted for a broader brain-storm and vocational training audience.
The platform combines a modern web frontend, a scalable REST API backend, and a suite of Soroban smart contracts — all living in a single monorepo for streamlined development and deployment.
brain-storm/
├── apps/
│ ├── frontend/ # Next.js 14 web application (TypeScript)
│ └── backend/ # NestJS REST API (TypeScript)
├── contracts/
│ ├── analytics/ # On-chain progress tracking (Rust/Soroban)
│ ├── token/ # Reward token contract (Rust/Soroban)
│ └── shared/ # RBAC & shared utilities (Rust/Soroban)
├── scripts/ # Build and deploy scripts
├── docs/ # Extended documentation
├── .github/workflows/ # CI/CD pipelines
├── Cargo.toml # Rust workspace
├── package.json # Node.js workspace root
└── .env.example # Environment variable template
| Technology | Purpose |
|---|---|
| Next.js 14 (App Router) | React framework with SSR/SSG |
| TypeScript | Type safety |
| Tailwind CSS | Utility-first styling |
| Zustand | Lightweight state management |
| Axios | HTTP client |
| @stellar/stellar-sdk | Stellar wallet integration |
| Technology | Purpose |
|---|---|
| NestJS | Scalable Node.js framework |
| TypeScript | Type safety |
| PostgreSQL + TypeORM | Relational database & ORM |
| JWT + Passport | Authentication & authorization |
| Swagger/OpenAPI | Auto-generated API docs |
| @stellar/stellar-sdk | Blockchain credential issuance |
| Redis | Caching & session management |
| Technology | Purpose |
|---|---|
| Rust | Contract language |
| Soroban SDK | Stellar smart contract framework |
| Stellar CLI | Deployment & interaction |
| wasm32 target | WebAssembly compilation |
- Course Management — Browse, enroll in, and complete structured blockchain courses
- On-Chain Credentials — Certificates issued as Stellar transactions upon course completion
- Token Rewards — Earn Brain-Storm tokens (BST) for completing modules and courses
- Progress Tracking — Real-time on-chain progress stored via the Analytics contract
- Role-Based Access — Admin, Instructor, and Student roles enforced on-chain via RBAC
- Analytics Contract — Records per-student, per-course progress percentages on-chain
- Token Contract — Mints reward tokens to students upon verified course completion
- Shared Contract — Provides RBAC, reentrancy guards, and common validation utilities
- RESTful endpoints for auth, courses, users, and Stellar interactions
- Interactive Swagger docs at
/api/docs - JWT-secured routes with role guards
| Tool | Version |
|---|---|
| Node.js | v18 or higher |
| npm | v9 or higher |
| PostgreSQL | v12 or higher |
| Rust | v1.75 or higher |
| Stellar CLI | v21.5.0 |
| Docker | Optional (for local Stellar testnet) |
git clone https://github.com/your-org/brain-storm.git
cd brain-stormcp .env.example .env
# Edit .env with your database credentials, JWT secret, and Stellar keysnpm installnpm run dev:backend
# API available at http://localhost:3000
# Swagger docs at http://localhost:3000/api/docsnpm run dev:frontend
# App available at http://localhost:3001# Install Rust wasm target first
rustup target add wasm32-unknown-unknown
# Build all contracts
./scripts/build.shContainerized development and production environment for backend + PostgreSQL + Redis.
# 1. Copy environment template
cp .env.example .env
# 2. Edit .env (JWT_SECRET, STELLAR_SECRET_KEY, etc.)
# Note: DATABASE_HOST=postgres, DATABASE_USERNAME=brain-storm, etc. are auto-set
# 3. Start services (production mode)
docker compose up -d --build backend postgres redis
# Production API: http://localhost:3000/api
# Swagger docs: http://localhost:3000/api/docs
# Development (with hot reload):
# docker compose up -d --build # Uses docker-compose.override.yml automatically
# Logs:
docker compose logs -f backend
# Stop & clean volumes:
docker compose down -vKey Notes:
- Default DB:
brain-stormdb/user/pass (override in.env) - Dev Mode: Auto hot-reload via src/ mount +
nest start --watch - Persistence:
postgres_data/redis_datavolumes - Healthchecks: Backend waits for DB ready
- Frontend/contracts run separately (npm/yarn)
# Deploy to testnet
./scripts/deploy.sh testnet analytics
# Deploy to mainnet
./scripts/deploy.sh mainnet tokenRequires STELLAR_SECRET_KEY set in your environment.
See .env.example for the full list. Key variables:
| Variable | Description |
|---|---|
DATABASE_HOST |
PostgreSQL host |
DATABASE_NAME |
Database name (default: brain-storm) |
JWT_SECRET |
Secret for signing JWT tokens |
STELLAR_SECRET_KEY |
Stellar account secret for credential issuance |
STELLAR_NETWORK |
testnet or mainnet |
NEXT_PUBLIC_API_URL |
Backend API URL for the frontend |
| Method | Path | Description |
|---|---|---|
| POST | /auth/register |
Register a new user |
| POST | /auth/login |
Login and receive JWT |
| GET | /courses |
List all published courses |
| GET | /courses/:id |
Get a single course |
| GET | /users/:id |
Get user profile |
| GET | /stellar/balance/:publicKey |
Get Stellar account balances |
Full interactive docs: http://localhost:3000/api/docs
GitHub Actions workflows in .github/workflows/ci.yml run on every push and PR:
- Backend: install → build → test
- Frontend: install → build
- Contracts:
cargo test→cargo fmt --check→cargo clippy
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature - Commit with clear messages
- Ensure all CI checks pass
- Open a pull request with a detailed description
MIT — see LICENSE for details.
Built with ❤️ on the Stellar network. Inspired by StrellerMinds by StarkMindsHQ.