Bitcoin High School (bitcoinhighschool.com) is an online STEM education platform that incentivises learning with real Bitcoin rewards. Students sign up, attempt timed quizzes across categories like Game Theory, Computer Science, Cryptography, AI, and Robotics, and earn Satoshi (sats) based on their scores. Rewards are paid out instantly via the Bitcoin Lightning Network to a linked Blink wallet.
| Tool | Version | Installation |
|---|---|---|
| Node.js | ≥ 20 | nodejs.org |
| pnpm | ≥ 8 | pnpm.io/installation |
| Go | 1.25 | go.dev/doc/install |
| PostgreSQL | ≥ 17 | postgresql.org/download |
| Make | — | Pre-installed on macOS/Linux. Windows: Run Makefile on Windows |
git clone https://github.com/Tibz-Dankan/BiTE.git
cd BiTEThe client is a React 19 + TypeScript app built with Vite and TailwindCSS 4.
cd client
pnpm installCreate a .env file inside the client/ directory:
# client/.env
VITE_PUBLIC_POSTHOG_KEY=<your-posthog-project-api-key>
VITE_PUBLIC_POSTHOG_HOST=https://us.i.posthog.com| Variable | Type | Description |
|---|---|---|
VITE_PUBLIC_POSTHOG_KEY |
string | PostHog project API key |
VITE_PUBLIC_POSTHOG_HOST |
string | PostHog ingestion host URL |
pnpm devThe client will be available at http://localhost:5173.
pnpm build
pnpm previewThe server is a Go 1.25 application using Fiber, GORM, and PostgreSQL.
cd server
make installCreate a .env file inside the server/ directory:
# server/.env
# Database
BiTE_DEV_DSN="host=localhost user=postgres password=<db_password> dbname=<db_name> port=5432 sslmode=disable"
BiTE_PROD_DSN="<production_dsn>"
# JWT
JWT_SECRET="<your_jwt_secret>"
# Admin
ADMIN_EMAIL=<admin_email>
# Mailjet
MJ_SENDER_MAIL=<mailjet_sender_email>
MJ_APIKEY_PUBLIC=<mailjet_public_key>
MJ_APIKEY_PRIVATE=<mailjet_private_key>
# AWS S3
S3_ACCESS_KEY=<aws_s3_secret_access_key>
S3_ACCESS_KEY_ID=<aws_s3_access_key_id>
S3_BUCKET_NAME=<s3_bucket_name>
AWS_REGION=<aws_region>
# Blink (Bitcoin Lightning)
BLINK_API_URL=https://api.blink.sv/graphql
BLINK_API_KEY=<blink_api_key>
BLINK_WALLET_ID=<blink_wallet_id>
# Resend
RESEND_API_KEY=<resend_api_key>
RESEND_SENDER_EMAIL=<resend_sender_email>
# PostHog
POSTHOG_API_KEY=<posthog_api_key>
POSTHOG_HOST=https://us.i.posthog.com
POSTHOG_BITE_PERSONAL_KEY=<posthog_personal_key>| Variable | Type | Description |
|---|---|---|
BiTE_DEV_DSN |
string | DSN for the local/dev PostgreSQL database |
BiTE_PROD_DSN |
string | DSN for the production PostgreSQL database |
JWT_SECRET |
string | Secret key used to sign JWT tokens |
ADMIN_EMAIL |
string | Comma-separated admin email addresses |
MJ_SENDER_MAIL |
string | Mailjet sender email address |
MJ_APIKEY_PUBLIC |
string | Mailjet public API key |
MJ_APIKEY_PRIVATE |
string | Mailjet private API key |
S3_ACCESS_KEY |
string | AWS S3 secret access key |
S3_ACCESS_KEY_ID |
string | AWS S3 access key ID |
S3_BUCKET_NAME |
string | AWS S3 bucket name |
AWS_REGION |
string | AWS region (e.g. eu-central-1) |
BLINK_API_URL |
string | Blink Bitcoin Lightning API URL |
BLINK_API_KEY |
string | Blink API key |
BLINK_WALLET_ID |
string | Blink wallet ID |
RESEND_API_KEY |
string | Resend email API key |
RESEND_SENDER_EMAIL |
string | Resend sender email address |
POSTHOG_API_KEY |
string | PostHog project API key |
POSTHOG_HOST |
string | PostHog ingestion host URL |
POSTHOG_BITE_PERSONAL_KEY |
string | PostHog personal API key |
Ensure PostgreSQL is running, then create a database matching the name in your BiTE_DEV_DSN:
sudo -u postgres psqlCREATE DATABASE bite_db;Note: The server auto-migrates tables on startup via GORM, so no manual migrations are needed.
make runThe server will be available at http://localhost:5000.
BiTE/
├── client/ # React + Vite + TypeScript frontend
├── server/ # Go (Fiber + GORM) backend
├── scripts/ # Utility scripts
├── Dockerfile # Production Docker image (server)
├── docker-compose.yaml
└── README.md
| Command | Location | Description |
|---|---|---|
pnpm dev |
client/ |
Start client dev server |
pnpm build |
client/ |
Build client for production |
pnpm preview |
client/ |
Preview production build |
make install |
server/ |
Install Go dependencies |
make run |
server/ |
Start server in development mode |