Skip to content

sharify-labs/canvas

Repository files navigation

Canvas

The public-facing content delivery service for the Sharify platform.

Canvas works alongside other Sharify components:

  • Zephyr: Core upload API and storage service
  • Spine: Web panel backend for user/content management
  • Sharify-Go: Go SDK for programmatic uploads
  • Sharify-Desktop: Cross-platform desktop app

Note: This project is not actively maintained and should not be used in a production environment.

What it does

Canvas takes a hostname + path combination and converts it into a storage key to fetch content. So when someone visits username.example.com/abc123, Canvas hashes it and retrieves the actual content from Redis or R2. It supports redirects, images, files, and pastes.

Key Features

  • Multi-tier storage (Redis + Cloudflare R2)
  • Automatic content type detection
  • Custom domain support
  • Syntax-highlighted paste viewer
  • Basic security with path sanitization and rate limiting

API Endpoints

  • GET / - Just returns OK (health check)
  • GET /p - Simple paste creation frontend interface
  • GET /:secret - The main content retrieval endpoint

Development Setup

  1. Copy the env file:
cp .env.example .env
  1. Spin up Redis:
docker run --name=canvas_redis -d -p 6379:6379 redis redis-server --requirepass "canvas"
  1. Fill out the .env file with your credentials.

  2. Run it:

make run

About

The content delivery service powering Sharify

Resources

License

Stars

Watchers

Forks