v0.1.0 cf60d0e

constitution.md RawHistoryFolder

Dumb Browser Constitution

Core Principles

I. Speed First (NON-NEGOTIABLE)

  • Fast startup time is paramount - no feature worth compromising speed
  • Single binary with embedded assets - no external dependencies at runtime
  • WebKit2GTK for rendering - full compliance without reinventing wheels
  • Minimal UI overhead - focus on web content, not chrome

II. Universal Launcher Compatibility

  • Support any dmenu-compatible launcher (fuzzel, rofi, tofi, wofi, bemenu)
  • Standard stdin/stdout protocol - no launcher-specific integrations
  • Clean text-based format for history/suggestions
  • Pipeline-friendly: dumb-browser --dmenu | launcher | dumb-browser --dmenu

III. Smart URL Handling

  • Direct URL detection: reddit.com → navigate directly
  • Search shortcuts: g: golang tutorial → Google search
  • History-first search: reddit → check history before web search
  • No ambiguity - clear rules for input interpretation

IV. Privacy-Conscious History

  • Local SQLite database only - no cloud sync
  • Configurable retention periods and cleanup
  • Visit counting for intelligent suggestions
  • User controls data - easy to clear/export

V. Wayland Native

  • Built for modern Linux desktop - sway, hyprland, etc.
  • WebKit2GTK provides native Wayland integration
  • Single instance handling for launcher integration
  • Minimal resource usage - no background services

Technical Standards

Stack Requirements

  • Backend: Go + Wails(v3-alpha) + WebKit2GTK + SQLite
  • CLI: Cobra + Viper for configuration
  • Database: SQLC for type-safe SQL generation
  • Validation: Input sanitization libraries (go-playground/validator)
  • Build: Single static binary with embedded frontend
  • Dependencies: WebKit2GTK + GTK3 only (system packages)

Performance Targets

  • Startup time: < 500ms from cold start
  • Memory usage: < 100MB baseline + WebKit overhead
  • History search: < 50ms for 1000+ entries
  • Single instance lock: < 10ms response time

Quality Gates

  • All database queries must use SQLC generated code
  • All user input must be validated and sanitized
  • Error handling: proper Go error chains, no panics in user paths
  • Logging: structured logging for debugging, minimal in production (Slog for logging in text mode)

Development Workflow

Implementation Order

  1. Core CLI structure (Cobra + Viper)
  2. Database schema + SQLC integration
  3. URL parser + search engine logic with fuzzy finder algorithm
  4. History management (CRUD operations)
  5. Wails browser integration
  6. Dmenu compatibility layer
  7. Configuration system

Testing Requirements

  • Unit tests for URL parsing logic
  • Integration tests for database operations
  • Manual testing with fuzzel integration
  • Cross-launcher compatibility verification

Constraints

Simplicity Mandate

  • KISS principle - no over-engineering
  • Clean Code philosophy throughout
  • Single responsibility per module
  • Minimal configuration surface

Security Requirements

  • No credential storage or session management
  • Input sanitization for all user data
  • SQL injection prevention via SQLC
  • No network requests except web browsing

Governance

This constitution defines the project's core identity and technical direction. All implementation decisions must align with these principles, prioritizing speed and simplicity above feature richness.

Version: 1.0.0 | Ratified: 2025-01-09 | Last Amended: 2025-01-09

source
1# Dumb Browser Constitution
2
3## Core Principles
4
5### I. Speed First (NON-NEGOTIABLE)
6- Fast startup time is paramount - no feature worth compromising speed
7- Single binary with embedded assets - no external dependencies at runtime
8- WebKit2GTK for rendering - full compliance without reinventing wheels
9- Minimal UI overhead - focus on web content, not chrome
10
11### II. Universal Launcher Compatibility
12- Support any dmenu-compatible launcher (fuzzel, rofi, tofi, wofi, bemenu)
13- Standard stdin/stdout protocol - no launcher-specific integrations
14- Clean text-based format for history/suggestions
15- Pipeline-friendly: `dumb-browser --dmenu | launcher | dumb-browser --dmenu`
16
17### III. Smart URL Handling
18- Direct URL detection: `reddit.com` → navigate directly
19- Search shortcuts: `g: golang tutorial` → Google search  
20- History-first search: `reddit` → check history before web search
21- No ambiguity - clear rules for input interpretation
22
23### IV. Privacy-Conscious History
24- Local SQLite database only - no cloud sync
25- Configurable retention periods and cleanup
26- Visit counting for intelligent suggestions
27- User controls data - easy to clear/export
28
29### V. Wayland Native
30- Built for modern Linux desktop - sway, hyprland, etc.
31- WebKit2GTK provides native Wayland integration
32- Single instance handling for launcher integration
33- Minimal resource usage - no background services
34
35## Technical Standards
36
37### Stack Requirements
38- **Backend**: Go + Wails([v3-alpha](https://github.com/wailsapp/wails/tree/v3.0.0-alpha.28)) + WebKit2GTK + SQLite
39- **CLI**: Cobra + Viper for configuration
40- **Database**: SQLC for type-safe SQL generation
41- **Validation**: Input sanitization libraries ([go-playground/validator](https://github.com/go-playground/validator))
42- **Build**: Single static binary with embedded frontend
43- **Dependencies**: WebKit2GTK + GTK3 only (system packages)
44
45### Performance Targets
46- Startup time: < 500ms from cold start
47- Memory usage: < 100MB baseline + WebKit overhead
48- History search: < 50ms for 1000+ entries
49- Single instance lock: < 10ms response time
50
51### Quality Gates
52- All database queries must use SQLC generated code
53- All user input must be validated and sanitized
54- Error handling: proper Go error chains, no panics in user paths 
55- Logging: structured logging for debugging, minimal in production (Slog for logging in text mode)
56
57## Development Workflow
58
59### Implementation Order
601. Core CLI structure (Cobra + Viper)
612. Database schema + SQLC integration
623. URL parser + search engine logic with fuzzy finder algorithm
634. History management (CRUD operations)
645. Wails browser integration
656. Dmenu compatibility layer
667. Configuration system
67
68### Testing Requirements
69- Unit tests for URL parsing logic
70- Integration tests for database operations
71- Manual testing with fuzzel integration
72- Cross-launcher compatibility verification
73
74## Constraints
75
76### Simplicity Mandate
77- KISS principle - no over-engineering
78- Clean Code philosophy throughout
79- Single responsibility per module
80- Minimal configuration surface
81
82### Security Requirements
83- No credential storage or session management
84- Input sanitization for all user data
85- SQL injection prevention via SQLC
86- No network requests except web browsing
87
88## Governance
89
90This constitution defines the project's core identity and technical direction. All implementation decisions must align with these principles, prioritizing speed and simplicity above feature richness.
91
92**Version**: 1.0.0 | **Ratified**: 2025-01-09 | **Last Amended**: 2025-01-09

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close