Clean repository artifacts and update README
CI - Build & Verify / Build, Typecheck & Hygiene (push) Successful in 56s
CI - Build & Verify / Deploy to award.noveria.net (push) Successful in 53s

This commit is contained in:
AzuTear
2026-06-26 18:56:48 +02:00
parent 90795759f3
commit 47fe59c42a
13 changed files with 70 additions and 1606 deletions
+56 -70
View File
@@ -1,85 +1,66 @@
# VTuber Star Awards
Monorepo for the VTuber Star Awards MVP.
Production monorepo for the VTuber Star Awards platform.
## Stack
- Frontend: Vue 3, Vite, Pinia, Tailwind CSS, PrimeVue, shadcn-style Vue UI primitives
- Frontend: Vue 3, Vite, Pinia, Tailwind CSS, PrimeVue, lucide icons
- Backend: ASP.NET Core 8, EF Core 8, PostgreSQL
- Delivery: Gitea Actions, Docker Compose, Nginx-served frontend, ASP.NET API
## Structure
## Repository Structure
- `frontend/` Vue application
- `Backend/` ASP.NET Core API
- `prototype/` earlier visual prototype work
- `docker-compose.dev.yml` optional local PostgreSQL container
- `frontend/` Vue application and public assets
- `Backend/` ASP.NET Core API, EF Core migrations, services and endpoints
- `.gitea/workflows/ci.yaml` build, hygiene, deploy and live verification pipeline
- `docker-compose.dev.yml` optional local PostgreSQL container for development
## Frontend
Generated archives, prototype exports, Word handoff files and local document-update scripts are intentionally ignored and should not be committed.
## Local Development
Start the database:
```bash
cd frontend
npm install
cp .env.example .env
npm run dev
docker compose -f docker-compose.dev.yml up -d
```
The frontend uses a lightweight demo session flow for development and preview deployments:
- Sign in from the header
- `Viewer Login` unlocks nomination and voting
- `Admin Login` unlocks the admin routes and management views
- Voting and nominations can be resubmitted; the backend updates the existing user state instead of blindly duplicating submissions
## Backend
Development uses the same local PostgreSQL defaults as `docker-compose.dev.yml`:
```text
Host=localhost;Port=5433;Database=vtuber_star_awards_dev;Username=vtsa_dev;Password=change-me-local-only
```
Those defaults are already present in `Backend/appsettings.Development.json`. For other environments, keep `Backend/appsettings.json` empty and set `VTSA_POSTGRES` or `ConnectionStrings__Postgres`.
Run the backend:
```bash
cd Backend
dotnet restore
dotnet build
dotnet ef database update
ASPNETCORE_ENVIRONMENT=Development dotnet run --urls http://127.0.0.1:5084
```
## Local Database
If Docker is available locally:
Run the frontend:
```bash
docker compose -f docker-compose.dev.yml up -d
cd Backend
dotnet ef database update
cd frontend
npm ci
cp .env.example .env
npm run dev
```
Default dev database:
Default development database:
```text
Host=localhost;Port=5433;Database=vtuber_star_awards_dev;Username=vtsa_dev;Password=change-me-local-only
```
Override `VTSA_DEV_POSTGRES_USER` and `VTSA_DEV_POSTGRES_PASSWORD` before starting Docker if you want different local credentials.
The same defaults live in `Backend/appsettings.Development.json`. For non-local environments, set `VTSA_POSTGRES` or `ConnectionStrings__Postgres`.
If `dotnet ef database update` is unavailable in the current environment, the repository also contains a bootstrap SQL script:
## Useful Endpoints
```bash
cd Backend
psql "Host=localhost Port=5433 Database=vtuber_star_awards_dev Username=vtsa_dev Password=change-me-local-only" -f Migrations/InitialCreate.manual.sql
```
- Public API: `/api/public/*`
- Admin dashboard: `/api/admin/dashboard`
- Admin moderation and risk workflows: `/api/admin/*`
- Sessions and auth: `/api/auth/*`
- App health: `/api/health`
- Database health and migrations: `/api/health/database`
Verify the runtime wiring:
```bash
curl http://127.0.0.1:5084/api/health
curl http://127.0.0.1:5084/api/health/database
```
Development auth/session endpoints:
Development admin session example:
```bash
curl -X POST http://localhost:5084/api/auth/dev-login \
@@ -87,26 +68,31 @@ curl -X POST http://localhost:5084/api/auth/dev-login \
-d '{"twitchUserId":"jayuhime_demo","displayName":"Jayuhime","role":"admin"}'
```
## Notes
## Validation
- Public endpoints live under `/api/public/*`
- Admin summary endpoint lives under `/api/admin/dashboard`
- Session endpoints live under `/api/auth/*`
- Database connectivity and pending migrations are exposed at `/api/health/database`
- Current frontend store falls back to static seed-like data if the API is unavailable
- The admin dashboard now includes a lightweight risk center and audit log for suspicious submit patterns and reviewed admin actions
Run these before pushing application changes:
## Suggested Backend Rollout Phases
```bash
cd frontend
npm run build
1. Public participation core
- Home, nominations, voting, clip submission, winner archive
- Backend focus: overview/category/archive reads plus persisted user participation state
2. Admin season setup
- Admin years, categories, candidates, season status
- Backend focus: season/category/candidate CRUD and current-year switching
3. Review and moderation
- Admin reviews, nominations inbox, clips, risk center
- Backend focus: nomination approval/rejection, clip moderation states, risk resolution workflows
4. Reporting and operations
- Admin dashboard, analytics, user logs, settings health checks
- Backend focus: richer aggregates, audit search/filtering, operational health endpoints
cd ..
dotnet build Backend/Backend.csproj --configuration Release
git diff --check
```
## Deployment
Pushes to `main` run `.gitea/workflows/ci.yaml`.
The pipeline:
1. Checks repository hygiene.
2. Builds the backend and frontend.
3. Syncs the repository to the production host.
4. Builds and recreates the Docker Compose `api` and `web` services.
5. Writes a PostgreSQL predeploy backup.
6. Applies EF Core migrations.
7. Verifies live health, database connectivity and frontend assets.
Production runs at `https://award.noveria.net`.