A modern web browser built from scratch in Go using GioUI
Learning browser internals by implementing core web technologies
🚀 Quick Start • 📖 Documentation • 🎯 Features • 🛠️ Development • 🤝 Contributing
GoBrowser is an educational web browser implementation built from the ground up using Go and Gio GUI framework. This project follows the comprehensive [Browser Engineering]:
- 🌐 HTTP/HTTPS protocol handling
- 📝 HTML parsing and DOM tree construction
- 🎨 CSS rendering and layout engines
- ⚡ JavaScript execution and event handling
- 🔄 Multi-tab browsing experience
- 📱 Cross-platform desktop support
- Basic Gio GUI application structure
- Main window and UI components
- Project architecture and build system
-
Browser Layout
- Multi-tab interface with
DocTabs
- Navigation toolbar (back, forward, refresh, address bar)
- Bookmark management system
- Settings and preferences panel
- Multi-tab interface with
-
Core Browser Functionality
- HTML parser and tokenizer
- CSS parser and styling engine
- DOM tree construction and manipulation
- JavaScript execution environment
- Task scheduling and threading
- Network request handling
- Developer tools and inspector
- Extensions and plugin system
- Advanced security features
- Performance optimization
- Accessibility support
- Go 1.23.6+ - Download here
- Git - Download here
# Clone the repository
git clone https://github.com/ducnd58233/gobrowser.git
cd gobrowser
# Install dependencies
go mod download
# Install development tools
make install-tools
# run the application w/o debug mode
make run-app
# run the application with debug mode
make run-app-debug
# Build the application
make build-app
# Run the built binary
make run-build
gobrowser/
├── 📁 cmd/
│ └── main.go # Application entry point
├── 📁 internal/
│ ├── 📁 browser/ # Core browser logic
│ │ ├── engine.go # Browser engine
│ │ ├── tab.go # Tab management
│ │ ├── const.go # Constants
│ │ └── utils.go # Utility functions
│ └── 📁 ui/ # Gio UI components
│ ├── main_window.go # Main window
│ ├── toolbar.go # Navigation toolbar
│ ├── tabview.go # Tab interface
│ └── const.go # UI constants
├── 📁 build/ # Build artifacts
├── 📄 Makefile # Build automation
├── 📄 go.mod # Go module definition
└── 📄 README.md # Project documentation
# Run the application in development mode
make run-build
# Run tests with coverage
make test
make coverage
# Lint the code
make lint
# Fix linting issues automatically
make fix-lint
The project uses several development tools to ensure code quality:
- golangci-lint - Comprehensive Go linter
- Gio tools - GUI development utilities
- Go testing - Built-in testing framework
Following the browser-engineering methodology, this project emphasizes:
- Incremental Development - Each component builds upon the previous
- Educational Value - Code clarity over performance optimization
- Standards Compliance - Following web standards where applicable
- Modular Design - Clean separation of concerns
- 📚 Browser Engineering Book - Primary learning resource
- 🎯 Gio Documentation - GUI framework documentation
- 🔧 Go Documentation - Go language reference
Component | Description | Status |
---|---|---|
HTML Parser | Tokenization and DOM construction | ✅ In Progress |
CSS Engine | Styling and layout computation | ✅ In Progress |
JavaScript | V8-like execution environment | 🚧 Planning |
Networking | HTTP/HTTPS request handling | ✅ In Progress |
UI Layer | GioUI-based user interface | ✅ In Progress |
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- Follow Go best practices and idioms
- Write comprehensive tests for new features
- Update documentation for any API changes
- Use meaningful commit messages