A comprehensive Web3 learning platform that helps developers learn blockchain and Web3 development from scratch. The platform includes knowledge learning, practical exercises, code examples, and an online editor.
- π Systematic Learning Path: Structured courses from beginner to advanced
- π» Online Code Editor: Write and test Solidity and JavaScript code in the browser
- π Achievement System: Earn badges and compete on leaderboards
- π₯ Community Features: Discussion forum and note-taking system
- π Web3 Authentication: Support for MetaMask wallet login
- π³ Docker Deployment: Easy deployment with Docker Compose
- Framework: Next.js 14 (React 18)
- UI: Tailwind CSS + shadcn/ui
- State Management: Zustand
- Code Editor: Monaco Editor
- Web3: Ethers.js v6
- Runtime: Node.js 18+
- Framework: Express 4
- Database: PostgreSQL 15
- ORM: Prisma
- Authentication: JWT + Passport.js
- Storage: MinIO (S3-compatible)
- Containerization: Docker + Docker Compose
- Reverse Proxy: Nginx
- CI/CD: GitHub Actions
web3-learning-platform/
βββ frontend/ # Next.js frontend application
β βββ src/
β β βββ app/ # Next.js 14 App Router
β β βββ components/ # React components
β β βββ lib/ # Utility libraries
β β βββ store/ # Zustand state management
β β βββ types/ # TypeScript type definitions
β βββ public/ # Static assets
β βββ Dockerfile
β βββ package.json
βββ backend/ # Express backend application
β βββ src/
β β βββ controllers/ # Request handlers
β β βββ services/ # Business logic
β β βββ middleware/ # Express middleware
β β βββ routes/ # API routes
β β βββ utils/ # Utility functions
β β βββ config/ # Configuration files
β βββ prisma/ # Prisma schema and migrations
β βββ Dockerfile
β βββ package.json
βββ nginx/ # Nginx configuration
β βββ nginx.conf
βββ docker-compose.yml # Docker Compose configuration
βββ .env.example # Environment variables template
βββ README.md
- Docker and Docker Compose
- Node.js 18+ (for local development)
- Git
-
Clone the repository
git clone https://github.com/yourusername/web3-learning-platform.git cd web3-learning-platform -
Set up environment variables
cp .env.example .env # Edit .env with your configuration -
Start with Docker Compose
docker-compose up -d
-
Run database migrations
docker-compose exec backend npm run prisma:migrate -
Seed initial data (optional)
docker-compose exec backend npm run prisma:seed -
Access the application
- Frontend: http://localhost
- Backend API: http://localhost/api
- MinIO Console: http://localhost:9001
cd frontend
npm install
npm run devThe frontend will be available at http://localhost:3000
cd backend
npm install
npm run devThe backend API will be available at http://localhost:4000
See .env.example for all required environment variables.
DATABASE_URL: PostgreSQL connection stringJWT_SECRET: Secret key for JWT token generationREDIS_URL: Redis connection stringINFURA_API_KEY: Infura API key for blockchain interactionMINIO_*: MinIO storage configuration
The application uses the following Docker services:
- nginx: Reverse proxy (port 80/443)
- frontend: Next.js application (port 3000)
- backend: Express API (port 4000)
- postgres: PostgreSQL database (port 5432)
- redis: Redis cache (port 6379)
- minio: Object storage (port 9000/9001)
API documentation is available at /api/docs when running the backend server.
# Backend tests
cd backend
npm test
# Frontend tests
cd frontend
npm testcd backend
npm run test:property- Update environment variables for production
- Build Docker images:
docker-compose -f docker-compose.prod.yml build
- Start services:
docker-compose -f docker-compose.prod.yml up -d
The project uses GitHub Actions for continuous integration and deployment. See .github/workflows/ for configuration.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Next.js
- UI components from shadcn/ui
- Code editor powered by Monaco Editor
- Blockchain interaction via Ethers.js
For support, email support@web3learning.com or join our Discord community.
Version: 1.0.0
Last Updated: 2025-02-04