Skip to content

About

A community-built web browser from Cairo University students

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

HoneyBee Browser 🐝

A community-built web browser from Cairo University students.

HoneyBee is an open-source project where students from the Faculty of Computers and AI and the Faculty of Engineering contribute to building a real web browser from scratch. It's a hands-on learning opportunity for browser internals: HTML parsing, CSS layout, JavaScript engines, networking, and more.

Build Contributors License Good First Issues GitLab Mirror

📊 What Works Today

HoneyBee is at v0.1.0 (first paint). It parses HTML, cascades CSS, lays out block-level boxes, and paints via Cairo. Arabic text renders with correct letter-shaping through Pango.

HoneyBee rendering docs/demo.html

Feature Status
HTML parsing (lexbor) ✅
Owned DOM tree ✅
CSS selector matching ✅
CSS stylesheet parsing ✅
Cascade (importance + specificity + inheritance) ✅
Block-flow layout ✅
Cairo paint (backgrounds, borders, text) ✅
Box shorthands (margin: 10px 20px) ✅
Length units (px, em, rem, %, auto) ✅
Arabic text shaping ✅
Text wrapping + whitespace collapsing ✅
display property (block, inline) ✅
dir attribute (ltr, rtl, auto) ✅
Inline formatting (span, a, em) ✅
UA stylesheet (default <h1>, <p> margins) ✅
Pseudo-classes (:link, :visited, :hover) ✅
Back / forward navigation ✅
Instant Back/Forward (session cache) ✅
Large-page scrolling + hover ✅ (link hover ~20ms; wrapper hover ~8ms)
External CSS loading (<link rel=stylesheet>) ✅ (article content styled; layout deferred to ADR-026/027)
@media queries (viewport filtering) ✅ (52% of blocks fire at 1024; layout transform deferred to layout-engine ADR)
CSS grid layout (display: grid) ✅ (fixed/fr tracks + named areas; article-cell vertical positioning deferred)
CSS variables (:root + var()) ✅ (infrastructure; visible win deferred to ADR-027/028)
@media queries ❌
border-radius, box-shadow ❌

For the full picture -- including a per-property breakdown of why example.com still differs from Firefox -- see docs/current-state.md.

Try it: load docs/demo.html in the built browser to see the render above.

🎯 Our Vision

To create a fully functional, open-source web browser built entirely by the student community at Cairo University, providing an unparalleled learning experience in large-scale software engineering.

✨ How to Contribute

We welcome contributions from all Cairo University students! No prior browser experience is needed.

🏗️ Project Architecture

See docs/architecture.md for a high-level overview of the project.

See docs/companions.md to meet the project companions.

🗺️ Roadmap

See docs/roadmap.md for our phased development plan.

📜 License

This project is licensed under the Apache License 2.0. See LICENSE for details.

Logging

HoneyBee has runtime-gated logging. Zero cost when disabled. Enable with environment variables:

# Log everything at debug level
HONEYBEE_LOG=all ./build/bin/honeybee

# Filter by category (comma-separated, or "all")
HONEYBEE_LOG=layout,paint,fetch ./build/bin/honeybee

# Set minimum severity (error | warn | info | debug | trace)
HONEYBEE_LOG=all HONEYBEE_LOG_LEVEL=info ./build/bin/honeybee

# Redirect to file instead of stderr
HONEYBEE_LOG=all HONEYBEE_LOG_FILE=/tmp/honeybee.log ./build/bin/honeybee

Categories: pipeline, css, cascade, layout, paint, fetch, event.

Output format:

[honeybee][layout][debug] src/renderer/layout/layout.cpp:482 child_count=3

Greppable by category: grep '\[layout\]' /tmp/honeybee.log

Usage in code:

#include "base/log.hpp"

HB_LOG(Layout, Debug, "child_count=%d", n);
HB_LOG(Fetch, Info, "fetching %s", url.c_str());

See docs/decisions/046-logging.md for design and deferred items.

About

A community-built web browser from Cairo University students

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages