Bumps the npm_and_yarn group with 6 updates in the /SharpbinV3.Client directory: | Package | From | To | | --- | --- | --- | | [dompurify](https://github.com/cure53/DOMPurify) | `3.4.14` | `3.4.16` | | [sharp](https://github.com/lovell/sharp) | `0.35.4` | `0.35.5` | | [brace-expansion](https://github.com/juliangruber/brace-expansion) | `1.1.18` | `1.1.21` | | [cookie](https://github.com/jshttp/cookie) | `0.6.0` | `2.0.1` | | [handlebars](https://github.com/handlebars-lang/handlebars.js) | `4.7.9` | `4.7.10` | | [source-map-js](https://github.com/7rulnik/source-map-js) | `1.2.1` | `1.2.2` | Updates `dompurify` from 3.4.14 to 3.4.16 - [Release notes](https://github.com/cure53/DOMPurify/releases) - [Commits](https://github.com/cure53/DOMPurify/compare/3.4.14...3.4.16) Updates `sharp` from 0.35.4 to 0.35.5 - [Release notes](https://github.com/lovell/sharp/releases) - [Commits](https://github.com/lovell/sharp/compare/v0.35.4...v0.35.5) Updates `brace-expansion` from 1.1.18 to 1.1.21 - [Release notes](https://github.com/juliangruber/brace-expansion/releases) - [Commits](https://github.com/juliangruber/brace-expansion/compare/v1.1.18...v1.1.21) Updates `cookie` from 0.6.0 to 2.0.1 - [Release notes](https://github.com/jshttp/cookie/releases) - [Commits](https://github.com/jshttp/cookie/compare/v0.6.0...v2.0.1) Updates `handlebars` from 4.7.9 to 4.7.10 - [Release notes](https://github.com/handlebars-lang/handlebars.js/releases) - [Changelog](https://github.com/handlebars-lang/handlebars.js/blob/v4.7.10/release-notes.md) - [Commits](https://github.com/handlebars-lang/handlebars.js/compare/v4.7.9...v4.7.10) Updates `source-map-js` from 1.2.1 to 1.2.2 - [Release notes](https://github.com/7rulnik/source-map-js/releases) - [Changelog](https://github.com/7rulnik/source-map-js/blob/main/CHANGELOG.md) - [Commits](https://github.com/7rulnik/source-map-js/compare/v1.2.1...v1.2.2) --- updated-dependencies: - dependency-name: dompurify dependency-version: 3.4.16 dependency-type: direct:production dependency-group: npm_and_yarn - dependency-name: sharp dependency-version: 0.35.5 dependency-type: direct:production dependency-group: npm_and_yarn - dependency-name: brace-expansion dependency-version: 1.1.21 dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: cookie dependency-version: 2.0.1 dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: handlebars dependency-version: 4.7.10 dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: source-map-js dependency-version: 1.2.2 dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com>
SharpbinV3
Sharpbin is a pastebin-style website built with ASP.NET Core and SvelteKit.
A live instance is available at sharpbin.cc.
Features
- User authentication and account management.
- Syntax highlighting for various programming languages.
- Private pastes with client-side encryption.
- Raw text serving for easy sharing and scripting.
- Paste editing including content, syntax, title, and expiration.
- Configurable paste expiration.
- Server-side paste compression to save storage.
- Captcha support via Cloudflare Turnstile.
Getting Started
The easiest way to run SharpbinV3 is using Docker Compose.
- Ensure Docker and Docker Compose are installed.
- Clone the repository.
git clone https://github.com/whoswhip/Sharpbin.git
- In the repository root, copy
backend.env.exampletobackend.envandfrontend.env.exampletofrontend.env. - Replace the secret placeholders and configure your domain and Turnstile keys. Set
ORIGINto the public frontend URL, including the scheme. For local Docker testing, useORIGIN=http://localhost:5173,Domain=localhost:5173,Https=false, andAllowedCorsOrigins__0=http://localhost:5173. - Run the following command in the root directory:
docker compose up -d --build
Configuration
Configure the backend in backend.env and the frontend in frontend.env when using Docker Compose. The backend also loads appsettings.json, with environment variables taking precedence.
Compose explicitly sets ConnectionStrings__DefaultConnection, DATA_PROTECTION_KEY_PATH, and the frontend's VITE_API_URL. These override values from the environment files; change docker-compose.yml to override them.
The example secrets are placeholders, not secure defaults. Generate a separate secret for JWT signing, API-key hashing, and view hashing, plus one shared internal API key. This command generates a 64-character random hex value; run it once for each secret:
docker run --rm node:24-alpine node -e "console.log(require('node:crypto').randomBytes(32).toString('hex'))"
or use openSSL:
openssl rand -hex 32
Set the same shared value in PasteSettings__View_Internal_API_Key in backend.env and VIEW_INTERNAL_API_KEY in frontend.env. Keep generated secrets across restarts and updates. Changing the API-key HMAC secret invalidates existing API keys.
When configuring via
appsettings.jsoninstead of for exampleConnectionStrings__DefaultConnectionit would be:
"ConnectionStrings": {
"DefaultConnection": "Data Source=sharpbin.db"
},
Backend (SharpbinV3.Server)
Domain: The domain your instance of Sharpbin will be hosted at (e.g., example.com)Https: Whether the public instance uses HTTPS. Used when generating email links; this does not enable TLS on the server.AllowedCorsOrigins__0: An allowed browser origin for the backend API (e.g.,https://example.com). Use numbered entries for additional origins.ConnectionStrings__DefaultConnection: SQLite connection string (e.g.,Data Source=/app/data/sharpbin.db).JwtSettings__Secret: A random secret of 32-128 characters used for signing JWT tokens.AuthSettings__CF_Turnstile_SecretKey: Your Cloudflare Turnstile secret key.AuthSettings__CF_Turnstile_SiteKey: Your Cloudflare Turnstile site key.AuthSettings__Registration_Enabled:true: Enables/disables registration.AuthSettings__First_User_Admin: Gives the first user the admin role, it is recommended to disable this after use.AuthSettings__Admins_Require_2FA: Enforces Admins to have 2FA when trying to do certain actions.AuthSettings__API_Key_HMAC_Secret: Recommended to securely hash API keys, but is not required.PasteSettings__MaxTitleLength: Max title length in characters.PasteSettings__MaxPasteSizeInBytes:1_048_576 (1MB): Max Paste Size set in bytes.PasteSettings__EnablePasteCompression:true: Enables/Disables server-side paste compression.PasteSettings__RequiresVerification:true: Enables/Disables CAPTCHA verification when creating pastes.PasteSettings__View_HMAC_Secret: A required random secret of 32–128 characters used to hash viewer identifiers.PasteSettings__View_Internal_API_Key: A shared key of 32–128 characters used to authorize view recording. Match the frontend'sVIEW_INTERNAL_API_KEY.
Frontend (SharpbinV3.Client)
VITE_API_URL: The backend URL reachable from the frontend server. Defaults tohttp://localhost:5050; Compose overrides it withhttp://backend:8080. Browser requests use the frontend's/apiproxy.ORIGIN: The public frontend URL, including its scheme (e.g.,https://example.com). Used by the production Node server; see SvelteKit's Node adapter documentation.VITE_ALLOWED_HOSTS: A comma-separated list used only by Vite dev/preview (e.g.,localhost,sharpbin.cc). Export it in the shell before starting Vite; the config readsprocess.envdirectly. It does not configure production host restrictions.VIEW_INTERNAL_API_KEY: The production frontend's shared view-recording key. Falls back toView_HMAC_Internal_API_Keyif unset. The frontend does not readPasteSettings__View_Internal_API_Key.
When NODE_ENV=development, the frontend uses a fixed development-only internal key matching the backend's checked-in development configuration and ignores both environment key names. See the client README for development and standalone production setup.
The frontend will be accessible at http://localhost:5173.
Project Structure
- SharpbinV3.Server: Backend API built with C# and ASP.NET Core. Refer to its README for server-side development and configuration.
- SharpbinV3.Client: Frontend application built with SvelteKit and TypeScript. Refer to its README for client-side development and setup.