# VANTRA START HERE — GTAHUB Test Build

## Package purpose

This package is prepared for Vantra Studios to ingest and test the current GTAHUB application.

The runnable application is in:

`GTAHUB_APP/`

This is the Round 9 feature build containing:
- GTAHUB social/video platform foundation
- Vantra Studios attribution
- profiles and crews
- uploads / Mux integration paths
- Stripe creator/tip infrastructure
- Launch Hub/admin surfaces
- The Block multiplayer world
- avatar/world systems
- realistic in-world weapon roles
- blood hit/death visual effects
- account-level violence acknowledgment gate
- selectable touch controller layouts

## Important status

This is a **test build**, not a public-production release.

The visual/product features should be tested now.

The Round 10 multiplayer hardening findings are included under `DOCS/`.
Those security/integrity changes have NOT yet been applied to this test source.

Do not expose The Block broadly to untrusted public users until the Round 10 hardening items are completed.

---

# Run locally

From `GTAHUB_APP/`:

```bash
npm install
cp .env.example .env.local
npm run dev
```

Then open:

`http://localhost:3000`

## Required services/configuration

Fill `.env.local` with the services actually being tested:

### Supabase
- `NEXT_PUBLIC_SUPABASE_URL`
- `NEXT_PUBLIC_SUPABASE_ANON_KEY`
- `SUPABASE_SERVICE_ROLE_KEY`

### Mux
Needed for real upload/live testing:
- `MUX_TOKEN_ID`
- `MUX_TOKEN_SECRET`
- `MUX_WEBHOOK_SECRET`

### Stripe
Needed for real test-mode tip/onboarding testing:
- `STRIPE_SECRET_KEY`
- `STRIPE_WEBHOOK_SECRET`
- `NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY`

Use **Stripe test-mode keys**, not live-money credentials, during this test cycle.

### App / Vantra
- `NEXT_PUBLIC_APP_URL`
- `NEXT_PUBLIC_VANTRA_STUDIOS_URL`

### Optional
- `YOUTUBE_API_KEY`
- `AVATAR_PROVIDER_API_KEY`

---

# Database

Apply the Supabase migrations in numerical order:

1. `supabase/migrations/0001_init.sql`
2. `supabase/migrations/0002_avatars_and_world.sql`
3. `supabase/migrations/0003_world_combat.sql`
4. `supabase/migrations/0004_realistic_weapons_and_gate.sql`

## Migration warning

Before applying `0004` to a database that already contains Round 8 KO rows using old weapon ids such as:
- `bat`
- `water_blaster`
- `paintball_gun`

read:

`DOCS/ROUND10_WORLD_HARDENING_AUDIT.md`

The migration may require correction/mapping before use on existing data.

For a completely fresh test database this historical-row issue does not apply.

---

# Test order

## 1. Core
- create/sign in to account
- profile page
- navigation
- Vantra Studios attribution
- crews
- Launch Hub

## 2. Video
- create upload
- upload/process/play video
- profile video display
- delete video

Use test Mux credentials only.

## 3. Stripe
- Connect onboarding
- test-mode tips
- refund/dispute paths only in Stripe test mode

Do not use real creator money during this test cycle.

## 4. The Block
Test:
- avatar/world entry
- violence acknowledgment gate
- controller layouts
- movement
- chat
- pickups
- Fists / Knife / Pistol / Shotgun
- blood splatter
- blood pool/death visuals
- respawn / KO display
- leaderboard

The current multiplayer implementation is suitable for controlled testing with trusted testers, not adversarial public use.

---

# Build checks

Run:

```bash
npm run typecheck
npm run lint
npm run build
```

If Google Font downloads fail in a network-restricted environment, distinguish that from application compile errors.

---

# Vantra task

Vantra should:

1. ingest `GTAHUB_APP/` as the application source
2. keep source unchanged before creating a test checkpoint
3. configure a test environment
4. run typecheck/lint/build
5. launch locally/staging
6. test every section above
7. record bugs/screenshots
8. then use the Round 10 audit to harden The Block before public exposure

Do not redesign GTAHUB during this test pass.
The goal is to prove the current product functions end to end.
