Skip to content

Commit edf16ee

Browse files
author
Soul Browser
committed
docs: Add installation, architecture, and API documentation
1 parent 213bd0f commit edf16ee

3 files changed

Lines changed: 248 additions & 0 deletions

File tree

docs/API.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Soul Browser API Reference
2+
3+
## SoulBrowser Class
4+
5+
```python
6+
from soulbrowser import SoulBrowser
7+
8+
browser = SoulBrowser(
9+
headless=False,
10+
proxy=None,
11+
fingerprint_protection=True
12+
)
13+
```
14+
15+
### Methods
16+
17+
#### new_page()
18+
Create a new browser page.
19+
20+
```python
21+
page = browser.new_page()
22+
```
23+
24+
#### close()
25+
Close the browser.
26+
27+
```python
28+
browser.close()
29+
```
30+
31+
## Page Methods
32+
33+
### Navigation
34+
35+
```python
36+
page.goto("https://example.com")
37+
page.reload()
38+
page.go_back()
39+
page.go_forward()
40+
```
41+
42+
### Interaction
43+
44+
```python
45+
page.click("button#submit")
46+
page.fill("input[name=email]", "test@example.com")
47+
page.select("select#country", "US")
48+
```
49+
50+
### Privacy
51+
52+
```python
53+
page.enable_fingerprint_protection()
54+
page.set_proxy("socks5://localhost:9050")
55+
page.enable_tor()
56+
```
57+
58+
### Media
59+
60+
```python
61+
page.mute_all()
62+
page.enable_pip()
63+
page.set_playback_rate(1.5)
64+
```
65+
66+
## Events
67+
68+
```python
69+
page.on("request", lambda req: print(req.url))
70+
page.on("response", lambda res: print(res.status))
71+
```
72+
73+
## Async API
74+
75+
```python
76+
import asyncio
77+
from soulbrowser import AsyncSoulBrowser
78+
79+
async def main():
80+
browser = AsyncSoulBrowser()
81+
page = await browser.new_page()
82+
await page.goto("https://example.com")
83+
await browser.close()
84+
85+
asyncio.run(main())
86+
```

docs/ARCHITECTURE.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Soul Browser Architecture
2+
3+
## Overview
4+
5+
Soul Browser is built on a modular architecture that separates concerns into distinct components.
6+
7+
```
8+
soulbrowser/
9+
├── browser.py # Core browser engine
10+
├── config.py # Configuration management
11+
├── download.py # Binary download manager
12+
├── geoip.py # GeoIP handling
13+
├── accessibility/ # Accessibility features
14+
├── adblock/ # Ad blocking engine
15+
├── ai/ # AI-powered features
16+
├── automation/ # Browser automation
17+
├── devtools/ # Developer tools
18+
├── human/ # Human-like behavior simulation
19+
├── media/ # Media handling
20+
├── network/ # Network layer
21+
├── performance/ # Performance optimization
22+
├── privacy/ # Privacy protection
23+
├── security/ # Security features
24+
├── session/ # Session management
25+
├── ui/ # UI components
26+
└── web3/ # Web3 integration
27+
```
28+
29+
## Core Components
30+
31+
### Browser Engine
32+
- Chromium-based rendering
33+
- Multi-process architecture
34+
- GPU acceleration
35+
36+
### Privacy Module
37+
- Fingerprint protection
38+
- Cookie isolation
39+
- Tracking prevention
40+
41+
### Network Module
42+
- HTTP/3 support
43+
- Proxy management
44+
- DNS-over-HTTPS
45+
46+
### Session Module
47+
- Tab management
48+
- Workspace organization
49+
- State persistence
50+
51+
## Data Flow
52+
53+
1. User request → Browser Engine
54+
2. Network interception → Privacy filters
55+
3. Content rendering → Security checks
56+
4. Response → User
57+
58+
## Extension Points
59+
60+
- Custom filter lists
61+
- User scripts
62+
- Themes
63+
- Plugins

docs/INSTALL.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# Soul Browser Installation Guide
2+
3+
## Quick Install
4+
5+
```bash
6+
pip install soulbrowser
7+
```
8+
9+
## Platform-Specific Instructions
10+
11+
### Windows
12+
13+
**Using pip:**
14+
```bash
15+
pip install soulbrowser
16+
```
17+
18+
**Using pipx (recommended for CLI):**
19+
```bash
20+
pipx install soulbrowser
21+
```
22+
23+
### macOS
24+
25+
```bash
26+
pip install soulbrowser
27+
# or with Homebrew Python
28+
python3 -m pip install soulbrowser
29+
```
30+
31+
### Ubuntu/Debian
32+
33+
```bash
34+
sudo apt update
35+
sudo apt install python3-pip
36+
pip3 install soulbrowser
37+
```
38+
39+
### Fedora
40+
41+
```bash
42+
sudo dnf install python3-pip
43+
pip3 install soulbrowser
44+
```
45+
46+
### Arch Linux
47+
48+
```bash
49+
pip install soulbrowser
50+
```
51+
52+
### Kali Linux
53+
54+
```bash
55+
pip3 install soulbrowser
56+
```
57+
58+
## From Source
59+
60+
```bash
61+
git clone https://github.com/vikrant-project/soulbrowser.git
62+
cd soulbrowser
63+
pip install -e .
64+
```
65+
66+
## Docker
67+
68+
```bash
69+
docker pull soulbrowser/soulbrowser
70+
docker run -it soulbrowser/soulbrowser
71+
```
72+
73+
## Verify Installation
74+
75+
```bash
76+
python -c "import soulbrowser; print(soulbrowser.__version__)"
77+
```
78+
79+
## Dependencies
80+
81+
Soul Browser automatically installs required dependencies:
82+
- playwright
83+
- aiohttp
84+
- cryptography
85+
- And more...
86+
87+
## Troubleshooting
88+
89+
### Browser binary not found
90+
91+
```bash
92+
python -m soulbrowser install
93+
```
94+
95+
### Permission errors on Linux
96+
97+
```bash
98+
sudo chown -R $USER:$USER ~/.soulbrowser
99+
```

0 commit comments

Comments
 (0)