We welcome contributions from the community to help improve Deta Surf! Whether you're fixing bugs, adding new features, or improving documentation, your contributions are valuable to us.
Please note that Surf has been open-sourced for transparency and community involvement, but it is still in active development. A lot of the code has been written quickly to prototype features, so please be patient and understanding when contributing.
We encourage you to review the current issues and feature requests before contributing. If you find something you'd like to work on, please comment on the issue or create a new one to let us know you're interested.
This project and everyone participating in it is governed by the Surf Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to hello@deta.surf.
If you need help getting started or have questions about the codebase, feel free to reach out to us on our Discord server, open an issue on GitHub or email us at hello@deta.surf.
The Deta Surf codebase is structured as a monorepo with several ´packages´ and the core Electron application in app. It uses Yarn Workspaces and Turborepo to manage dependencies and build processes.
The core Electron application is located in the app folder. It is built with electron-vite and uses the other packages in this monorepo as dependencies.
The core app is split into the different processes, main, preload and renderer.
Within the renderer there are several different entrypoints for the different view types in Surf, each one essentially acts as its own web application (using Svelte):
Core: main app UIResource: notebooks and resource views like the notesPDF: custom PDF viewerOverlay: overlay window used for dialogs and other floaty UIs^Settings: settings windowSetup: setup windowUpdates: updates windowAnnouncements: announcements window
Within the preload there are different scripts for the different view types, each one exposing a tailored API to the renderer process via contextBridge. The most important are:
core: for main app UI rendererresource: for the resource rendererwebcontents: for external web pages
The main directory is the main process of the Electron app, responsible for window management, app lifecycle, IPC handling and more. It's the entrypoint of the Electron app.
@deta/backend: a Rust backend that's compiled to a Node.js module@deta/backend-server: a Rust backend that's compiled to a standalone server, responsible for compute intensive AI tasks (embeddings)@deta/services: core services powering the application like tabs, resources, notebooks, settings, etc.@deta/editor: Tiptap based rich text editor component@deta/teletype: custom command menu library@deta/dragcula: drag and drop library@deta/web-parser: web content parsing library used for resource extraction / web clipping@deta/ui: UI component library@deta/utils: shared utilities used by multiple packages and the app@deta/icons: icon library based ontabler@deta/types: shared TypeScript types used throughout the monorepo
Each package is either written in TypeScript or Rust, the UI parts are built with Svelte.
To use a non-notarized version on MacOS:
- download a suitable
dmgfrom releases - move it to your
Applicationsfolder - run
xattr -cr /Applications/{release_name}.appin your Terminal, replace {release_name} with the actual release name - start the app
- Node.js (version
22.18.0or higher) - Yarn (version 1.x)
- Rust and Cargo
Run the following command to install all dependencies:
yarn installTo run the app and required packages in development mode, run the following command:
yarn devTo build all apps and packages, run the following command:
yarn buildTo create the final distributable build, run the following command:
Mac (Arm):
yarn build:desktop:mac:armor for Windows (x64):
yarn build:desktop:win:x64Check the package.json scripts section for more build options.
Before starting work on significant features or changes, please open an issue to discuss your proposal. This helps ensure:
- The change aligns with the project's direction
- You don't waste time on something that may not be accepted
- We can provide guidance and feedback early in the process
Small bug fixes and documentation improvements can skip this step.
-
Fork this repository
-
Create a new branch for your changes
git checkout -b feature/my-feature
Write clean, well-documented code. Include tests when applicable.
This project uses a Developer Certificate of Origin (DCO) to certify contribution rights.
Each commit must be signed by adding a Signed-off-by line to your commit message:
git commit -s -m "Add new feature"
This will automatically add:
Signed-off-by: Your Name <you@example.com>
If you forgot to sign a commit, you can fix it with:
git commit --amend --signoff
By contributing, you agree to the Developer Certificate of Origin:
Developer Certificate of Origin
Version 1.1
By making a contribution to this project, I certify that:
(a) The contribution is my original work, and I have the right to submit it under the open source license indicated in the file; or
(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license; or
(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it; and
(d) I understand and agree that this project and its contributions are public and that a record of the contribution (including my name and email) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.
Before submitting a pull request:
- Make sure your code builds without errors
- Follow existing code style
- Add tests if needed
- Include a clear description of the change
Use the following format for PR titles: type: description
Available types:
feat: New feature or enhancementfix: Bug fixeschore: Refactors, git workflow updates, dependency updates, etc.docs: Documentation changes
By contributing, you agree that your contributions will be licensed under the Apache License 2.0, in line with this repository.
If you have any questions, feel free to open an issue. Thank you for your contribution!