Files
vtuber-awards/Backend
AzuTear 24f9a69022 Align backend with frontend, make clips end-to-end, polish admin
Backend
- Add ClipSubmission entity + table (runtime bootstrapper) and
  POST /api/public/clips (server-derives platform from the link)
- Surface clip submissions in the admin season detail
- Add DELETE candidate/category/clip endpoints with audit entries

Frontend
- Clips admin: real moderation view (list, open link, delete) instead
  of placeholder; wired clipSubmissions through types/api/store
- Categories admin: add delete with confirm modal (matches Candidates)
- Voting ranking bar uses the unified purple gradient
- Fix ASCII transliterations to proper German umlauts across admin
- Remove orphan AdminView 2.vue

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 07:53:19 +02:00
..
2026-06-17 11:35:45 +02:00

Backend

PostgreSQL

The API targets PostgreSQL through EF Core 8 and Npgsql.EntityFrameworkCore.PostgreSQL.

Default local development connection string:

Host=localhost;Port=5433;Database=vtuber_star_awards_dev;Username=postgres;Password=postgres

You can override it with:

  • Backend/appsettings.Development.json
  • environment variable VTSA_POSTGRES

If Docker is available locally, start a dev database from the repository root with:

docker compose -f docker-compose.dev.yml up -d

Commands

Restore and build:

dotnet restore
dotnet build

Create a migration:

dotnet ef migrations add InitialCreate

Generate a SQL migration script:

dotnet ef migrations script 0 20260617060000_InitialCreate --output Migrations/InitialCreate.sql

Apply migrations once PostgreSQL is running:

dotnet ef database update

Fallback bootstrap if dotnet ef is not usable in the current environment:

psql "Host=localhost Port=5433 Database=vtuber_star_awards_dev Username=postgres Password=postgres" -f Migrations/InitialCreate.manual.sql

Run the API:

ASPNETCORE_ENVIRONMENT=Development dotnet run

Check the API and database wiring:

curl http://localhost:5084/api/health
curl http://localhost:5084/api/health/database

Development auth/session:

curl -X POST http://localhost:5084/api/auth/dev-login \
  -H "Content-Type: application/json" \
  -d '{"twitchUserId":"admin_demo","displayName":"Admin Demo","role":"admin"}'