Skip to content

LessUp/brave-sync-notes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

76 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Note Sync Now / Brave Sync Notes

End-to-End Encrypted Note Synchronization

License: MIT CI Status Pages Status React 18 Express 5 Socket.IO 4

๐Ÿ“š Documentation โ€ข ๐Ÿ  Project Home โ€ข ๐Ÿ“ฆ Releases โ€ข ๐Ÿค Contributing

English | ็ฎ€ไฝ“ไธญๆ–‡


โœจ Features

๐Ÿ” End-to-End Encryption

  • Client-side AES-256-GCM encryption
  • Server only relays ciphertext
  • 12-word mnemonic recovery

โšก Real-time Sync

  • WebSocket + Socket.IO
  • Automatic chunked transfer (>50KB)
  • Smart reconnection

๐Ÿ”„ Conflict Resolution

  • Three-way merge algorithm
  • Manual resolution UI
  • Version tracking

๐Ÿ’พ Multi-Layer Storage

  • Server: Redis / SQLite / Memory
  • Client: IndexedDB / LocalStorage
  • Automatic fallback

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 18+ (20 LTS recommended)
  • npm 9+
  • Redis (optional, for persistent storage)

Installation

# 1. Clone the repository
git clone https://github.com/LessUp/brave-sync-notes.git
cd brave-sync-notes

# 2. Start the server
cd apps/api && npm ci && cp .env.example .env && node index.js

# 3. Start the client (new terminal)
cd apps/web && npm ci && cp .env.example .env && npm run dev

Access the application:

Docker Deployment

cd brave-sync-notes
docker-compose up -d

For detailed setup instructions, see our Getting Started Guide.


โŒจ๏ธ Keyboard Shortcuts

Shortcut Action
Ctrl/โŒ˜ + S Save
Ctrl/โŒ˜ + B Toggle sidebar
Ctrl/โŒ˜ + P Toggle preview
Ctrl/โŒ˜ + H Toggle history
Ctrl/โŒ˜ + N New note
Ctrl/โŒ˜ + / Toggle dark mode
Esc Close modal

๐Ÿ“– Documentation

We provide comprehensive documentation in both English and ็ฎ€ไฝ“ไธญๆ–‡.

Specifications (Single Source of Truth)

Spec Description
Product Requirements Feature definitions & acceptance criteria
Core Architecture System design & technical decisions
API Specification WebSocket & REST API definitions
Database Schema Data models & storage structure
Testing Strategy Test frameworks & correctness properties

User & Developer Guides

English Documentation

Document Description
Getting Started Complete installation and setup guide
Architecture System design and data flow
Deployment Production deployment guide
Security Encryption and synchronization
Contributing Development guidelines
API Reference WebSocket and REST API docs

ไธญๆ–‡ๆ–‡ๆกฃ

ๆ–‡ๆกฃ ่ฏดๆ˜Ž
ๅฟซ้€Ÿๅ…ฅ้—จ ๅฎŒๆ•ดๅฎ‰่ฃ…ๅ’Œ่ฎพ็ฝฎๆŒ‡ๅ—
ๆžถๆž„่ฏดๆ˜Ž ็ณป็ปŸ่ฎพ่ฎกไธŽๆ•ฐๆฎๆต
้ƒจ็ฝฒๆŒ‡ๅ— ็”Ÿไบง็Žฏๅขƒ้ƒจ็ฝฒๆŒ‡ๅ—
ๅฎ‰ๅ…จๆœบๅˆถ ๅŠ ๅฏ†ไธŽๅŒๆญฅๆœบๅˆถ
่ดก็ŒฎๆŒ‡ๅ— ๅผ€ๅ‘่ง„่Œƒ
API ๅ‚่€ƒ WebSocket ๅ’Œ REST API ๆ–‡ๆกฃ

Full Documentation Site: https://lessup.github.io/brave-sync-notes/


๐Ÿ—๏ธ Architecture Overview

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                        Clients                              โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”‚
โ”‚  โ”‚  Browser A  โ”‚โ—„โ”€โ”€โ–บโ”‚  Browser B  โ”‚โ—„โ”€โ”€โ–บโ”‚  Mobile App โ”‚     โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ”‚
โ”‚         โ”‚                  โ”‚                  โ”‚             โ”‚
โ”‚  [React + Vite]      [Zustand State]   [AES-256 Crypto]    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
          โ”‚                  โ”‚                  โ”‚
          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                             โ”‚ WebSocket
                             โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                       Server                                โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚  Express + Socket.IO                                   โ”‚  โ”‚
โ”‚  โ”‚  โ€ข Room Management                                     โ”‚  โ”‚
โ”‚  โ”‚  โ€ข Event Distribution                                  โ”‚  โ”‚
โ”‚  โ”‚  โ€ข Rate Limiting                                       โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ”‚                     โ”‚                                       โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                   โ”‚
โ”‚  โ”‚      Persistence Layer              โ”‚                   โ”‚
โ”‚  โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”         โ”‚                   โ”‚
โ”‚  โ”‚  โ”‚  Redis   โ”‚ โ”‚  SQLite  โ”‚ (Fallback)                  โ”‚
โ”‚  โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜         โ”‚                   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

For detailed architecture, see Architecture Documentation.


๐Ÿ› ๏ธ Development

Testing

# Client tests
cd apps/web && npm test -- --run

# Server tests
cd apps/api && npm test

# Property-based tests
cd apps/api && npm run test:property

Project Structure

brave-sync-notes/
โ”œโ”€โ”€ apps/
โ”‚   โ”œโ”€โ”€ web/             # React + Vite frontend
โ”‚   โ”‚   โ”œโ”€โ”€ src/         # Source code
โ”‚   โ”‚   โ””โ”€โ”€ tests/       # Test files
โ”‚   โ””โ”€โ”€ api/             # Express + Socket.IO backend
โ”‚       โ”œโ”€โ”€ src/         # Source code
โ”‚       โ””โ”€โ”€ tests/       # Test files
โ”œโ”€โ”€ docs/                # Documentation (EN/ZH)
โ”œโ”€โ”€ changelog/           # Version history
โ””โ”€โ”€ .github/workflows/   # CI/CD configuration

๐Ÿ“Š Project Status

Metric Status
Latest Version v2.2.0
Build Status CI
Documentation Pages
License MIT

๐Ÿ”„ OpenSpec Integration

This project uses OpenSpec for spec-driven development with AI assistance. All changes are managed through structured proposals.

Quick Commands

Command Description
/opsx:propose Create a new change proposal
/opsx:explore Explore ideas before committing
/opsx:apply Implement tasks from a change
/opsx:archive Archive a completed change

Workflow

/opsx:propose "feature-name"  โ†’  /opsx:apply  โ†’  /opsx:archive

Two-Tier Specification System

Directory Purpose
specs/ Stable, approved specifications (Single Source of Truth)
openspec/ Change management and delta specs

See AGENTS.md for detailed workflow instructions.


๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guide for details.

Quick links:


๐Ÿ“œ License

This project is licensed under the MIT License.


โ“ FAQ

Is Redis required?

No, the system automatically falls back to SQLite or in-memory storage if Redis is unavailable.

What's the maximum note size?

Notes up to 5MB are supported through automatic chunked transfer.

How does the 12-word recovery work?

The mnemonic follows the BIP39 standard. Your encryption key is derived from these 12 words, enabling secure recovery on any device.


๐Ÿ”ง Troubleshooting

Connection Failed

  • Ensure the backend server is running on port 3002
  • Check if the port is occupied: lsof -i :3002
  • Verify firewall settings allow WebSocket connections

Sync Not Working

  • Confirm both devices use the same mnemonic
  • Check browser console for errors
  • Ensure WebSocket connection is established (green indicator)

Redis Connection Error

  • Verify Redis is running: redis-cli ping
  • Or let the system fall back to SQLite automatically

๐Ÿ™ Acknowledgments


Made with โค๏ธ by LessUp

๐ŸŒ Website โ€ข ๐Ÿ‘ฅ GitHub

Packages

 
 
 

Contributors

Languages