An open-source, interactive Go learning platform with a built-in code editor, gamification, and community-driven content.
- Interactive Monaco Code Editor β Write, edit, and run Go code directly in the browser
- Click-to-Edit Code Blocks β Click any code example in a lesson to instantly load it into the editor
- Live Code Execution β Run Go code server-side with a secure sandboxed
go runcommand - Gamification & XP System β Earn XP for reading lessons and running code
- Progress Tracking β Track completed lessons, read counts, and coding progress via localStorage
- Dark Mode β Full dark/light theme toggle with persistent preference
- Syntax Highlighting β PrismJS-powered highlighting for all Go code examples
- Community Contributions β Edit any lesson directly on GitHub via the "Edit this page" button
- Responsive Design β Built with Tailwind CSS for a premium, mobile-friendly experience
# Clone the repo
git clone https://github.com/Golangcodes/golangcodes
cd golang.codes
# Install Air for hot-reloading
go install github.com/air-verse/air@v1.52.3
# Start the development server
make devThe app will be available at http://localhost:8080.
go build -o server .
PORT=8080 ./serverdocker build -t golang-codes .
docker run -p 8080:8080 golang-codesgolang.codes/
βββ Go/ # Markdown lesson files (the syllabus)
β βββ Introduction.md
β βββ Variables in Go.md
β βββ Data Structures.md
β βββ ...
βββ handlers/
β βββ pages.go # Route handlers for lessons & homepage
β βββ run.go # Secure code execution endpoint
βββ static/
β βββ main.js # App logic (editor, gamification, HTMX)
β βββ storage.js # Storage API abstraction layer
β βββ gopher.webp # Gopher mascot
βββ templates/
β βββ index.html # Main HTML template
βββ main.go # Server entry point
βββ Dockerfile # Production Docker image
βββ Makefile # Dev commands
βββ .air.toml # Air hot-reload config
The course covers Go from fundamentals to advanced topics:
- Introduction
- Variables in Go
- Data Structures
- Conditionals in Go
- Loops
- Functions
- Slice
- Maps
- Pointers
- Structs
- Packages and Modules
- Interfaces in Go
- Errors
- Go Symbols
- Go Standard Library
- Channels in Go
- Mutexes in Go
- Context Package
- Generics in Go
- Enums in Go
- Understanding Allocations in Go
- Design Patterns in Go
- Go Best Lessons
- Community Resources
We welcome contributions! Whether it's fixing a typo, improving an explanation, or adding a new lesson β every contribution matters.
Please read our Contributing Guide before submitting a PR.
- Find a lesson page on the site
- Click "Edit this page on GitHub" at the bottom
- Make your changes to the Markdown file
- Submit a Pull Request
| Layer | Technology |
|---|---|
| Backend | Go net/http |
| Frontend | HTMX, Tailwind CSS |
| Code Editor | Monaco Editor |
| Syntax Highlighting | PrismJS |
| Markdown Rendering | Goldmark |
| Hot Reload | Air |
| Deployment | Docker / Railway |
This project is licensed under the MIT License β see the LICENSE file for details.
If you find this project useful, please give it a star! It helps others discover the project.
Built with β€οΈ by the Go community.