Skip to main content

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

  1. Generate self-signed SSL certificates:
openssl req -x509 -newkey rsa:4096 -nodes -keyout key.pem -out cert.pem -days 365
  1. 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

  1. Start the server:
bluep
  1. Access the editor:
https://<your-local-ip>:8500
  1. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bluep-0.4.3-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

Details for the file bluep-0.4.3-py3-none-any.whl.

File metadata

  • Download URL: bluep-0.4.3-py3-none-any.whl
  • Upload date:
  • Size: 16.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for bluep-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 88565a3194d73c58657ec225a2723099593f27e780cedaa62da68f7a902e7d4b
MD5 27ca16c0e2a4ea27c1c27f77c123bf28
BLAKE2b-256 54d5bb29b818367da3cb428027bbff4ee71b21c7383acbbab0037b04817f8446

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page