How omidomidvari/webnet works
1. Overall shape
- This is a very small Electron desktop browser. The architecture is centered in a single main entrypoint, main.js, which likely owns window creation, navigation policy, session setup, and security controls.
- There are no separate backend services or large module boundaries visible in the repo; the app is essentially a desktop shell around Electron’s browser primitives.
2. Primary runtime
- The runtime is Node.js + Electron.
- package.json and main.js indicate the app starts from the Electron main process, with the browser UI and behavior managed locally on the desktop.
3. Core user interface layer
- The UI is a custom browser chrome rather than a standard browser frame: URL bar plus Back and Reload controls.
- This UI sits above an embedded page-rendering surface, forming a simple two-layer model: app controls → web content view.
4. Navigation and search flow
- User input goes through a navigation router in the main app logic.
- The app distinguishes between:
- direct URL navigation for typed addresses
- DuckDuckGo search navigation when the input is treated as a query
- The search path is specialized with DuckDuckGo parameters (&rpl=1&kp=1&ia=web), which means search is an explicit architectural integration, not just a generic browser search box.
5. Persistent browsing mode
- The default mode uses a persistent session/cache, so cookies, site data, and login state survive between launches.
- Architecturally, this is the “normal profile” path and is optimized for convenience and faster revisits.
6. Incognito / “Ghost” mode
- The app has a separate memory-only session boundary for Ghost mode.
- This mode intentionally avoids persistent history and cookies, so it behaves like an isolated ephemeral profile rather than a regular tab state toggle.
- For an architecture diagram, this is the key second browser profile alongside the default persistent session.
7. Security controls
- The app enforces security policies at the browser engine layer:
- pop-up blocking
- disabled dangerous hardware permissions by default
- These are not content features; they are runtime policy hooks that sit between web pages and the underlying Electron permissions APIs.
8. External dependency boundary
- The only obvious external service is DuckDuckGo, used as the search backend for query-style navigation.
- All other behavior is local to the desktop app and Electron runtime.
9. Data persistence boundary
- The main architectural data boundary is persistent local browser data vs. ephemeral in-memory data.
- Normal browsing writes cache/cookies/site state to disk through Electron’s default session; Ghost mode keeps those artifacts out of durable storage.
10. Concurrency and component count
- This repo appears intentionally minimal: one app entrypoint, no separate services, no database, no API layer, no worker tier.
- For diagramming, treat it as a single-process orchestration app that configures the Electron browser engine and exposes a custom browsing experience.
11. Build/run boundary
- npm install and npm start suggest a standard local Electron development workflow.
- There is no evidence of a separate build pipeline or deployment infrastructure in the repository snapshot.
12. What matters most in the diagram
- The most important boxes are:
- Electron main process
- Custom browser window / UI controls
- Embedded web content
- Persistent session
- Ghost in-memory session
- Navigation/search router
- Security policy hooks
- The most important arrows are:
- user input → navigation router
- router → URL or DuckDuckGo
- controls → browser content
- browser content → session layer
- security hooks → content permissions/popups
Main entry points: main.js Main
Components 11
Runtime
Electron main-process orchestration and browser chrome.
- Main · Main-process entrypoint that wires the app together.
main.js - Window · Creates and manages the desktop browser shell.
- Chrome · Custom URL bar and navigation controls.
- Router · Decides whether input is a direct URL or a search query.
- URL Load · Loads typed addresses directly into the web view.
- Search · Transforms queries into DuckDuckGo search navigation.
- Web View · Rendered web content surface inside the app.
- Security · Applies popup blocking and restrictive permission handling.
Profiles
Persistent and ephemeral browser session boundaries.
- Normal Mode · Default profile with durable cookies, cache, and site state.
- Ghost Mode · Ephemeral profile with no durable browsing state.
External
Outside service used for search navigation.
- DuckDuckGo · External search service used for query-style navigation.
Connections 14
- Main → Window: creates · Main process creates the browser window.
- Main → Chrome: hosts · Main process wires the custom browser controls.
- Main → Router: wires · Main process connects input handling to navigation logic.
- Main → Web View: manages · Main process controls the embedded web content surface.
- Main → Security: enforces · Main process applies browser policy hooks.
- Chrome → Router: input · URL bar and buttons feed navigation requests to the router.
- Router → URL Load: direct URL · Typed addresses are loaded as direct navigation.
- Router → Search: query · Search terms are converted into DuckDuckGo navigation.
- URL Load → Web View: loads · Direct navigation updates the embedded page view.
- Search → DuckDuckGo: searches · Query navigation is sent to DuckDuckGo.
- DuckDuckGo → Web View: returns results · Search results are displayed in the web view.
- Web View → Normal Mode: default profile · Normal browsing uses durable session storage.
- Web View → Ghost Mode: ephemeral profile · Ghost mode uses an in-memory session boundary.
- Security → Web View: limits · Popup and permission policies constrain page behavior.