License System Backend
ASP.NET Core 8 API service for the software authorization system.
Requirements
- .NET 8 SDK
- PostgreSQL 16+
- Redis 7+ (optional, for rate limiting)
Quick Start
- Create database and apply schema:
psql -U postgres -d license -f scripts/init.sql
-
Update
src/License.Api/appsettings.jsonwith your connection string and JWT secret. -
Run the API:
dotnet restore
ASPNETCORE_URLS=http://localhost:39256 dotnet run --project src/License.Api
- Swagger:
http://localhost:39256/swagger
Docker Compose
- Copy env file:
cp .env.example .env
- Start services:
docker compose up -d
- Check health:
curl http://localhost:39256/health/ready
Notes
- On first run, a
super_adminuser is seeded fromSeedconfig inappsettings.json. - Files are stored under the
Storage:UploadRootpath (defaults touploads/). - If
Storage:ClientRsaPublicKeyPemis empty, files are stored unencrypted and no key headers are returned. - CORS can be restricted via
Cors:AllowedOriginsor envCors__AllowedOrigins__0(setCors:AllowAnytotruefor dev). - When
Storage:RequireHttpsForDownloadKeyistrue, encrypted downloads require HTTPS to return the decryption key. - Auth signature accepts
ProjectSecretorProjectKey(use ProjectKey for client integrations).