mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-05 18:48:41 +00:00
this is a LOT, i should've commited in stages but oh well, from what i can remember:
- paste interactions (reactions)
- comments
- comment interactions (reactions)
- rich text editor
- move all report apis into report controller
- rename size to sizeStored
- rename trueSize to originalSize
- fixed compression on paste compression
- implemented compression threshold
- use longs instead of ints where possible in the entities
- improve record view + remove redundant check for existing view
SharpbinV3 Server
This is the backend API for SharpbinV3, built with ASP.NET Core and Entity Framework Core.
Development Setup
Prerequisites
- .NET 10 SDK
- Entity Framework Core Tools (
dotnet tool install --global dotnet-ef)
Configuration
The server configuration is managed in appsettings.json. For development, ensure you have set the following in appsettings.Development.json or as environment variables:
ConnectionStrings__DefaultConnection: SQLite connection string (e.g.,Data Source=/app/data/sharpbin.db).JwtSettings__Secret: A secure string used for signing JWT tokens.PasteSettings__View_HMAC_Secret: Required to securely hash viewer identifiersPasteSettings__View_Internal_API_Key: Enforces views to be counted/recorded only by the frontend, if set it needs to be the same for both backend and frontend.
Database Migrations
Apply the database migrations to initialize the SQLite database:
dotnet ef database update
Running in Development
Use the following command to run the server with hot reload:
dotnet watch run
The API will be accessible at http://localhost:5050 by default (check Properties/launchSettings.json or your specific configuration).