Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brave/sync
deprecated Brave sync server. (sync now uses a fork of the Chromium sync protocol.)
https://github.com/brave/sync
brave-sync javascript sync
Last synced: about 1 month ago
JSON representation
deprecated Brave sync server. (sync now uses a fork of the Chromium sync protocol.)
- Host: GitHub
- URL: https://github.com/brave/sync
- Owner: brave
- License: mpl-2.0
- Archived: true
- Created: 2016-11-17T08:24:52.000Z (about 8 years ago)
- Default Branch: staging
- Last Pushed: 2020-07-29T20:57:15.000Z (over 4 years ago)
- Last Synced: 2024-10-02T09:05:22.964Z (2 months ago)
- Topics: brave-sync, javascript, sync
- Language: JavaScript
- Homepage:
- Size: 2.96 MB
- Stars: 204
- Watchers: 27
- Forks: 41
- Open Issues: 79
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome - sync - cross platform, client encrypted, cloud data sync 🔼✨🔮✨🔼 (JavaScript)
README
# Brave Sync
[![Build
Status](https://travis-ci.org/brave/sync.svg?branch=master)](https://travis-ci.org/brave/sync)A client/server for Brave sync
## Building
Install dependencies:
```
npm install
```Build a bundled JS library for the client:
```
npm run build
```Run the server:
```sh
npm run start
```## Testing
The sync client uses Browserify to transform Node js into browser js. To unittest
the library in a browser (default: electron), run `npm run browsertest`.
To test in a different browser run `npm run browsertest -- --browser chrome`.
Results appear in both the browser inspector and your terminal.To run tests in Node, just do `npm test`.
To do a basic client/server integration test against the production server, run
`npm run client` and navigate to `http://localhost:8000/`). The page
should not show any 'ERROR' messages and should end with 'success'.## Development
### Server
`server/config` contains settings; defaults in defaults.json and environment variable mappings in custom-environment-variables.json.
To configure locally you can create a file `config-dev.sh` and `source config-dev.sh` when needed:
```sh
#!/bin/bash
export AWS_ACCESS_KEY_ID="{stuff}"
export AWS_SECRET_ACCESS_KEY="{secret stuff}"
```Run the server with file watching and autoreloading:
```sh
npm run start-dev
```### Client integration
To integrate Brave sync on a platform (iOS, Android, Laptop):
1. Make a new branch.
2. In the main browser process, implement an IPC message handler as specified
in `client/constants/messages.js`.
3. If webviews on your platform do not support `chrome.ipcRenderer.{send, on}`,
edit `client/polyfill/chrome.js` as needed to polyfill this functionality.#### Building for browser-laptop
1. Make sure this repo is checked out next to `browser-laptop/`
2. Checkout the `feature/syncing` branch in browser-laptop
3. `npm run dist`
4. If developing, do `npm start` in browser-laptop. Console messages from the
sync client will be logged in `Library/Application
Support/brave-development/chrome-debug.log`.### Tests
To run tests you need to configure these environment variables:
- AWS_REGION
- AWS_S3_BUCKET
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY