A minimal real-time collaborative text editor
Project description
bluep
A secure real-time collaborative text editor with TOTP authentication and a blue theme. Multiple users can connect and edit text simultaneously through their browsers.
Quick Start
# Clone the repository
git clone https://github.com/glassontin/bluep.git
cd bluep
# Run the setup script
python setup.py
Features
- Two-factor authentication using TOTP
- Real-time text synchronization across clients
- Secure WebSocket communication over HTTPS
- Session management with replay attack prevention
- Machine-specific encryption for TOTP secrets
- Cross-platform configuration storage
- Auto-discovery of local IP address
- Blue minimalist interface
Requirements
- Python 3.7+
- OpenSSL for certificate generation
Installation
git clone https://github.com/glassontin/bluep.git
cd bluep
pip install .
Configuration
- Generate self-signed SSL certificates:
openssl req -x509 -newkey rsa:4096 -nodes -keyout key.pem -out cert.pem -days 365
- Visit the setup page to configure TOTP:
https://<your-local-ip>:8500/setup
- Scan the QR code with your authenticator app
- Save the secret key as backup
Usage
- Start the server:
bluep
- Access the editor:
https://<your-local-ip>:8500
- Enter your TOTP code to join the editing session
Security Features
- TOTP-based access control
- Rate limiting for failed authentication attempts
- Secure session management
- HTTPS/WSS encryption
- HTTP-only secure cookies
- Machine-bound configuration encryption
Dependencies
- FastAPI
- uvicorn
- Pillow
- websockets
- pyotp
- qrcode
- cryptography
- pydantic
- jinja2
Running as a System Service
On Linux systems with systemd, you can install bluep as a system service:
# Install the service (requires sudo)
sudo python install_service.py
# Start the service
sudo systemctl start bluep
# Enable service to start on boot
sudo systemctl enable bluep
# Check service status
sudo systemctl status bluep
# View logs
sudo journalctl -u bluep
The service will run with reduced privileges and several security measures enabled:
- Private /tmp directory
- Read-only access to /home
- Protected system directories
- No new privileges
- No kernel module or tunable access
- No device access
You can customize the user the service runs as:
sudo python install_service.py --user your_username
License
MIT License
Copyright (c) 2024 glassontin
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bluep-0.4.5-py3-none-any.whl.
File metadata
- Download URL: bluep-0.4.5-py3-none-any.whl
- Upload date:
- Size: 16.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23e8657a7c7d9c533612556facdab1de98b27c4de98b46824d64ad0e638002ca
|
|
| MD5 |
660d8b6b6ece32ec6e63a103955c9435
|
|
| BLAKE2b-256 |
88eca313839abebdf8a16e296803500161bfc1e719044b586a3de40bf60f5345
|