Skip to content

An educational website that explains Bitcoin from multiple disciplinary perspectives.

adshao/bitcoin-primer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

30 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Bitcoin Primer ๐ŸŒŸ

An educational website that explains Bitcoin from multiple disciplinary perspectives. Built with React + Vite, this project provides comprehensive Bitcoin education through nine different lenses, helping users understand not just the technology, but its broader implications for society.

๐ŸŽฏ Overview

Bitcoin Primer is designed to be a comprehensive educational resource that approaches Bitcoin from multiple angles:

  • Economic and Monetary Theory - Understanding money, banking, and economics
  • Technical Foundations - Computer science, cryptography, and distributed systems
  • Strategic Thinking - Game theory and incentive mechanisms
  • Physical Reality - Energy and thermodynamics
  • Social Impact - Politics, philosophy, and law

โœจ Features

  • Nine Disciplinary Perspectives: Each discipline provides a unique lens for understanding Bitcoin
  • Bilingual Support: Full support for English and Chinese (ไธญๆ–‡), with extensible architecture for future languages
  • Structured Learning Path: 10-week curriculum with progressive difficulty
  • Study Guide: Learning methods and practical exercises
  • Resource Library: Curated books, courses, tools, and community resources
  • Articles Section: In-depth articles on Bitcoin topics
  • Buy Bitcoin Guide: Comprehensive guide on how to acquire Bitcoin safely
  • SEO Optimized: Full SEO support with meta tags, structured data, and sitemap
  • Responsive Design: Optimized for desktop, tablet, and mobile devices
  • Smooth Navigation: Intuitive UI with smooth scrolling and transitions

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 16+
  • npm or yarn

Installation

# Clone the repository
git clone https://github.com/adshao/bitcoin-primer.git
cd bitcoin-primer

# Install dependencies
npm install

# Start development server
npm run dev

The application will be available at http://localhost:5173

Build for Production

# Generate SEO files and build
npm run build

# Preview the production build
npm run preview

๐Ÿ“š Content Structure

Nine Disciplines

  1. Money (่ดงๅธ) - The nature and evolution of money
  2. Banking (้“ถ่กŒ) - From intermediation to disintermediation
  3. Economics (็ปๆตŽๅญฆ) - Scarcity, value, and economic principles
  4. Computer Science (่ฎก็ฎ—ๆœบ็ง‘ๅญฆ) - Cryptography and distributed systems
  5. Game Theory (ๅšๅผˆ่ฎบ) - Incentives and Nash equilibrium
  6. Energy (่ƒฝๆบ) - From entropy to value
  7. Politics (ๆ”ฟๆฒป) - Power, sovereignty, and governance
  8. Philosophy (ๅ“ฒๅญฆ) - Existence, freedom, and value
  9. Law (ๆณ•ๅพ‹) - Code as law in practice

Additional Pages

  • Learning Path: Three-stage progression (Foundation โ†’ Core โ†’ Advanced)
  • Study Guide: Learning principles, methods, and best practices
  • Resources: Comprehensive collection of books, courses, tools, and communities
  • Articles: Deep-dive articles on Bitcoin topics
  • Buy Bitcoin: Guide to purchasing Bitcoin through ETFs and exchanges
  • About: Mission and vision of Bitcoin Primer

๐Ÿ› ๏ธ Tech Stack

  • Frontend Framework: React 18
  • Build Tool: Vite 5
  • Routing: React Router v6
  • Internationalization: react-i18next
  • SEO: react-helmet-async
  • Styling: CSS3 with responsive design
  • Language: JavaScript (ES6+)
  • Package Manager: npm
  • Testing: Puppeteer for SEO validation

๐Ÿ“ Project Structure

bitcoinprimer/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ components/          # Reusable components
โ”‚   โ”‚   โ”œโ”€โ”€ Layout.jsx       # Global navigation layout
โ”‚   โ”‚   โ”œโ”€โ”€ TopicTemplate.jsx # Template for discipline pages
โ”‚   โ”‚   โ”œโ”€โ”€ SEO.jsx         # SEO meta tags component
โ”‚   โ”‚   โ””โ”€โ”€ LanguageSwitcher.jsx # Language toggle
โ”‚   โ”œโ”€โ”€ pages/              # Page components
โ”‚   โ”‚   โ”œโ”€โ”€ Home.jsx        # Landing page
โ”‚   โ”‚   โ”œโ”€โ”€ Money.jsx       # Discipline pages...
โ”‚   โ”‚   โ”œโ”€โ”€ LearningPath.jsx # Learning curriculum
โ”‚   โ”‚   โ”œโ”€โ”€ StudyGuide.jsx  # Study methods
โ”‚   โ”‚   โ”œโ”€โ”€ Resources.jsx   # Resource library
โ”‚   โ”‚   โ”œโ”€โ”€ Articles.jsx    # Articles listing
โ”‚   โ”‚   โ”œโ”€โ”€ Article.jsx     # Article reader
โ”‚   โ”‚   โ”œโ”€โ”€ BuyBitcoin.jsx  # Bitcoin purchase guide
โ”‚   โ”‚   โ””โ”€โ”€ About.jsx       # About page
โ”‚   โ”œโ”€โ”€ config/             # Configuration files
โ”‚   โ”‚   โ””โ”€โ”€ languages.js    # Language configuration
โ”‚   โ”œโ”€โ”€ i18n/               # Internationalization
โ”‚   โ”‚   โ”œโ”€โ”€ index.js        # i18n configuration
โ”‚   โ”‚   โ””โ”€โ”€ locales/        # Translation files
โ”‚   โ”‚       โ”œโ”€โ”€ en/         # English translations
โ”‚   โ”‚       โ””โ”€โ”€ zh/         # Chinese translations
โ”‚   โ”œโ”€โ”€ hooks/              # Custom React hooks
โ”‚   โ”œโ”€โ”€ utils/              # Utility functions
โ”‚   โ”œโ”€โ”€ App.jsx             # Main app component
โ”‚   โ”œโ”€โ”€ App.css             # Global styles
โ”‚   โ””โ”€โ”€ main.jsx            # Entry point
โ”œโ”€โ”€ scripts/                # Build and utility scripts
โ”‚   โ”œโ”€โ”€ check-seo.js        # SEO validation script
โ”‚   โ””โ”€โ”€ generate-sitemap.js # Sitemap generator
โ”œโ”€โ”€ public/                 # Static assets
โ”‚   โ”œโ”€โ”€ sitemap.xml         # SEO sitemap
โ”‚   โ””โ”€โ”€ robots.txt          # Search engine directives
โ”œโ”€โ”€ package.json            # Dependencies
โ”œโ”€โ”€ vite.config.js          # Vite configuration
โ”œโ”€โ”€ CLAUDE.md               # AI assistant instructions
โ””โ”€โ”€ README.md               # This file

๐ŸŒ Internationalization

The project supports multilingual content with an extensible architecture:

Current Languages

  • English (default) - / paths
  • Chinese - /zh/ paths

Features

  • Automatic spacing between Chinese and English characters
  • Complete translation coverage for all content
  • Language persistence across sessions
  • Easy language switching via navbar dropdown
  • SEO-optimized hreflang tags for each language

Adding New Languages

To add a new language (e.g., Korean):

  1. Add language config in /src/config/languages.js
  2. Create translation files in /src/i18n/locales/ko/
  3. Update routing in App.jsx
  4. Run npm run generate:seo to update sitemap

๐Ÿ” SEO Optimization

Features

  • Dynamic Meta Tags: Title, description, keywords for each page
  • Open Graph: Full Facebook and social media integration
  • Twitter Cards: Rich previews on Twitter
  • Structured Data: Schema.org EducationalWebSite markup
  • Multilingual SEO: hreflang tags for language variants
  • Sitemap: Auto-generated XML sitemap for all pages
  • robots.txt: Search engine crawling directives

SEO Scripts

# Generate sitemap and robots.txt
npm run generate:seo

# Validate SEO implementation
npm run check:seo

๐ŸŽจ Design Principles

  • Clean and Modern: Minimalist design focusing on readability
  • Consistent Structure: All discipline pages follow the same template
  • Visual Hierarchy: Clear section divisions with alternating backgrounds
  • Responsive Grid: 3-column layout on desktop, adapting to mobile
  • Bitcoin Orange: Primary color scheme using Bitcoin's signature orange (#f7931a)
  • Smooth Interactions: Smooth scrolling and hover effects
  • Accessibility: Semantic HTML and ARIA labels

๐Ÿ”ง Available Scripts

# Development
npm run dev          # Start dev server at http://localhost:5173
npm run build        # Build for production (includes SEO generation)
npm run preview      # Preview production build
npm run lint         # Run ESLint

# SEO & Utilities
npm run generate:seo # Generate sitemap.xml and robots.txt
npm run check:seo    # Run SEO validation tests

๐Ÿ“Š Performance

  • Optimized Build: Code splitting and lazy loading
  • Image Optimization: WebP format with fallbacks
  • CSS Optimization: Minified and split CSS
  • Fast Refresh: HMR for instant development feedback
  • Bundle Analysis: Visualize bundle size with rollup

๐Ÿ”„ Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

Guidelines

  • Maintain bilingual support for all new content
  • Follow existing code structure and naming conventions
  • Ensure responsive design for all screen sizes
  • Add SEO metadata for new pages
  • Test thoroughly before submitting PR
  • Update translations in both /src/i18n/locales/en and /src/i18n/locales/zh
  • Run npm run check:seo to validate SEO implementation

Development Workflow

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“ License

This project is open source and available under the MIT License.

๐Ÿ™ Acknowledgments

  • Bitcoin whitepaper by Satoshi Nakamoto
  • The Bitcoin community for continuous education and resources
  • All contributors and educators in the Bitcoin space
  • Open source libraries that make this project possible

๐Ÿ“ง Contact

For questions or suggestions, please open an issue on GitHub.

๐Ÿš€ Deployment

Vercel (Recommended)

# Install Vercel CLI
npm i -g vercel

# Deploy
vercel

Netlify

# Build command
npm run build

# Publish directory
dist

Docker

FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
EXPOSE 4173
CMD ["npm", "run", "preview"]

Note: This is an educational project focused on Bitcoin fundamentals. It does not cover DeFi, smart contracts, or other cryptocurrency derivatives.

Built with โค๏ธ for Bitcoin education

About

An educational website that explains Bitcoin from multiple disciplinary perspectives.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published