Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
152 commits
Select commit Hold shift + click to select a range
ef38f62
security: remove exposed configuration and unauthenticated test/admin…
BTheCoderr Oct 10, 2026
59197eb
fix: validate bookings server-side and enforce paid rental transitions
BTheCoderr Oct 10, 2026
1d543ee
fix: connect checkout UI, rental status actions and verified Stripe w…
BTheCoderr Oct 10, 2026
874d611
fix: correct checkout totals and add idempotent owner transfers and d…
BTheCoderr Oct 10, 2026
cfa7b69
fix: remove static Netlify fallback and add security regression checks
BTheCoderr Oct 10, 2026
c61066f
ci: add security regression and dependency validation
BTheCoderr Oct 10, 2026
ad0f4a9
ci: use available checkout action release
BTheCoderr Oct 10, 2026
86069d6
ci: regenerate patched dependency lockfile on repair branch
BTheCoderr Oct 10, 2026
a985c54
security: upgrade Next.js and React to patched releases [skip ci]
github-actions[bot] Oct 10, 2026
461bed8
fix: resolve checkout router and booking type imports
BTheCoderr Oct 10, 2026
18f5af2
fix: resolve checkout router and booking type imports
BTheCoderr Oct 10, 2026
6905483
cleanup: use one canonical Next.js configuration and retain patched l…
BTheCoderr Oct 10, 2026
027fd2c
security: prevent user-approved ID verification and notification spoo…
BTheCoderr Oct 10, 2026
c6d4518
fix: align messaging APIs and inbox with current Prisma fields
BTheCoderr Oct 10, 2026
9573e11
fix: resolve message handler import from correct directory
BTheCoderr Oct 10, 2026
e6888db
ci: apply non-breaking dependency advisory repairs
BTheCoderr Oct 10, 2026
9829c31
fix: align rental dashboards and remove inert approval actions
BTheCoderr Oct 10, 2026
936a19c
test: share pricing logic with production and cover booking overlap c…
BTheCoderr Oct 10, 2026
96622ea
ci: run booking tests and fail release checks on type and dependency …
BTheCoderr Oct 10, 2026
ba10978
ci: safely rebase dependency lockfile fixes before updating repair br…
BTheCoderr Oct 10, 2026
f18613c
security: apply non-breaking npm advisory fixes [skip ci]
github-actions[bot] Oct 10, 2026
1a2b832
ci: retire one-time dependency update workflow after successful lockf…
BTheCoderr Oct 10, 2026
2da8bdd
fix: reconcile Prisma model types, availability routes and equipment …
BTheCoderr Oct 10, 2026
e843a13
fix: add missing notification preferences data model and migration
BTheCoderr Oct 10, 2026
4755d3b
fix: protect rented equipment from bulk deletion
BTheCoderr Oct 10, 2026
208d277
fix: require paid rental states for admin transitions
BTheCoderr Oct 10, 2026
7ca0fe5
fix: align seed scripts to Prisma client and prevent production resee…
BTheCoderr Oct 10, 2026
21715ee
fix: fail closed on nonfunctional dispute resolution route
BTheCoderr Oct 10, 2026
8c7f132
fix: resolve targeted type regressions and avoid duplicate CI runs
BTheCoderr Oct 10, 2026
6eaad50
fix: replace broken search SQL interpolation with safe Prisma filters
BTheCoderr Oct 10, 2026
09c0e28
fix: stabilize global provider and booking form typings; correct paid…
BTheCoderr Oct 10, 2026
8c26917
security: block unsigned Apple notifications from mutating accounts
BTheCoderr Oct 10, 2026
d5f8f39
fix: accurate admin dashboard status labels and zero-safe metrics
BTheCoderr Oct 10, 2026
036eb8f
fix: avoid NaN rental percentages when marketplace has no rentals
BTheCoderr Oct 10, 2026
825cf60
fix: replace broken admin rental detail with payment-aware functional…
BTheCoderr Oct 10, 2026
c2f1007
fix: use Sonner toast API for disconnected status
BTheCoderr Oct 10, 2026
139de9f
fix: load inbox recipients using actual Prisma relation
BTheCoderr Oct 10, 2026
f162db0
fix: reconcile payment admin table with actual payment model and Stri…
BTheCoderr Oct 10, 2026
abb39b5
fix: connect owner payout button to supported payload
BTheCoderr Oct 10, 2026
603b92b
fix: calculate owner earnings from actual Stripe payout records
BTheCoderr Oct 10, 2026
27f5b59
fix: harden auth session claims, protect socket endpoint, repair noti…
BTheCoderr Oct 10, 2026
6f7872c
fix: persist chat messages, wire search filters, align modern page props
BTheCoderr Oct 10, 2026
2bad764
security: prevent production test phone bypass; fix Firebase and cale…
BTheCoderr Oct 10, 2026
2a985e6
test: prevent production test-code bypass and exercise guard in CI
BTheCoderr Oct 10, 2026
0739192
fix: unify rental status labels and correct booking detail component …
BTheCoderr Oct 10, 2026
d764549
fix: update Tesseract worker API and stop presenting OCR as verified …
BTheCoderr Oct 10, 2026
cdad32c
fix: let renters list their own equipment; enforce owner auth and con…
BTheCoderr Oct 10, 2026
fd9fa17
fix: simplify authenticated SSE stream and remove stale socket/search…
BTheCoderr Oct 10, 2026
eefdf8e
fix: make equipment listing and photo upload real, validated, and con…
BTheCoderr Oct 10, 2026
1a149ae
security: authorize SSE subscriptions and push broadcasts; disable fa…
BTheCoderr Oct 10, 2026
abacad8
fix: repair notification rendering, mobile prompts, booking component…
BTheCoderr Oct 10, 2026
6e50f40
fix: align seed payments and review states, remove dead feature impor…
BTheCoderr Oct 10, 2026
d2be0c8
fix: cap SSE clients, correctly clean stream timers and report push d…
BTheCoderr Oct 10, 2026
2764ae0
test: guard authenticated uploads and broadcasts, fix PWA effect comp…
BTheCoderr Oct 10, 2026
ff2bf2e
fix: replace nonfunctional phone-first login with verified email and …
BTheCoderr Oct 10, 2026
f9e8b85
fix: repair SSE stream syntax and use proper cancellable heartbeat li…
BTheCoderr Oct 10, 2026
4effa58
security: remove identity override and scope upload keys to authentic…
BTheCoderr Oct 10, 2026
a7b9539
security: remove duplicate plaintext-password auth implementation
BTheCoderr Oct 10, 2026
015bb4a
test: prevent a duplicate insecure password auth provider
BTheCoderr Oct 10, 2026
c3dc825
cleanup: replace sample browse listings with live catalog and remove …
BTheCoderr Oct 10, 2026
a90a017
fix: clean stale imports and dead components on marketplace pages
BTheCoderr Oct 10, 2026
b022239
fix: align unused route request arguments with TypeScript strict checks
BTheCoderr Oct 10, 2026
5a25df2
fix: clean unused code and use cryptographically secure phone verific…
BTheCoderr Oct 10, 2026
fb2dd87
security: require expiring rate-limited server OTP for phone ownershi…
BTheCoderr Oct 10, 2026
65837c1
fix: correct vote request binding and remaining search and hook type …
BTheCoderr Oct 10, 2026
dc5da14
fix: remove leftover comment fragment from equipment browser cleanup
BTheCoderr Oct 10, 2026
ba2482d
fix: make test seed payments valid and require explicit destructive-r…
BTheCoderr Oct 10, 2026
c7cd49e
security: disable unsigned inbound SMS handler that logged verificati…
BTheCoderr Oct 10, 2026
ecc44d1
fix: correct S3 diagnostic scripts and upload configuration
BTheCoderr Oct 10, 2026
9a4c16d
fix: enforce calendar blackout selection and resolve remaining UI hoo…
BTheCoderr Oct 10, 2026
69d33ec
test: remove misleading unsigned Stripe webhook script that cannot ve…
BTheCoderr Oct 10, 2026
167f80d
fix: reconcile experiment props and remove remaining dead code and ty…
BTheCoderr Oct 10, 2026
95701cb
security: stop writing AWS secret backups and replace unsigned Cloudi…
BTheCoderr Oct 10, 2026
16658a0
security: remove unused Firebase phone auth and add OTP and secret-ba…
BTheCoderr Oct 10, 2026
0d5ac0a
ci: validate removal of unused vulnerable dependencies on repair branch
BTheCoderr Oct 10, 2026
68abec9
chore: prune unused vulnerable dependencies and type Supertest
github-actions[bot] Oct 10, 2026
b149d0b
chore: remove completed one-time dependency cleanup workflow
BTheCoderr Oct 10, 2026
b6d6022
test: stage Next 16 and Tailwind 4 upgrade in isolated validation branch
BTheCoderr Oct 10, 2026
e812990
fix: migrate dynamic API route context signatures to Next 16 async pa…
BTheCoderr Oct 10, 2026
0d562fa
fix: convert Next 16 page params and searchParams to asynchronous props
BTheCoderr Oct 10, 2026
10b9afa
fix: remove unused React default imports revealed by Next 16 compilation
BTheCoderr Oct 10, 2026
36d1105
fix: pass resolved Next 16 search params to admin filters and pagination
BTheCoderr Oct 10, 2026
ea70f86
fix: avoid invalid Prisma datasource override and eager DB connection…
BTheCoderr Oct 10, 2026
2912660
ci: report dependency security audit even if production build fails
BTheCoderr Oct 10, 2026
03a5191
fix: lazily initialize Resend and escape untrusted contact form HTML
BTheCoderr Oct 10, 2026
af90a7a
fix: lazily construct Stripe SDK and require configured key on first use
BTheCoderr Oct 10, 2026
63a2afe
security: remove unauthenticated synthetic Stripe webhook and public …
BTheCoderr Oct 10, 2026
915fd32
chore: lock validated Next 16 and Tailwind 4 upgrade
github-actions[bot] Oct 10, 2026
f8d4f51
ci: remove completed isolated framework upgrade validation workflow
BTheCoderr Oct 10, 2026
3797490
security: test patched uuid override across legacy Google and calenda…
BTheCoderr Oct 10, 2026
cd25e9b
chore: lock patched uuid dependencies
github-actions[bot] Oct 10, 2026
78c0502
ci: remove completed UUID-only workflow after clean build and full pr…
BTheCoderr Oct 10, 2026
3d91d93
fix: remove duplicate NotificationPreference migration and validate i…
BTheCoderr Oct 10, 2026
f49e792
ci: expose nonexecuted schema reconciliation SQL for safe migration r…
BTheCoderr Oct 10, 2026
b6b27fc
db: add non-destructive legacy schema reconciliation with strict paym…
BTheCoderr Oct 10, 2026
43ed784
test: exercise legacy paid rental and message preservation through mi…
BTheCoderr Oct 10, 2026
d071a1f
security: preserve and block duplicate legacy payouts and deposit ref…
BTheCoderr Oct 10, 2026
392d036
test: block unexpected schema drift while retaining approved legacy f…
BTheCoderr Oct 10, 2026
3d75331
ci: enforce production build, zero-vulnerability audit and legacy-pre…
BTheCoderr Oct 10, 2026
622edfa
fix: serializable Stripe settlement and strict payment metadata and s…
BTheCoderr Oct 10, 2026
bca2b7e
test: exercise checkout webhook conflicts transfer and deposit refund…
BTheCoderr Oct 10, 2026
a371ab0
ci: include mocked Stripe settlement, payout and deposit scenarios in…
BTheCoderr Oct 10, 2026
6a1c939
ci: remove completed temporary Stripe validation workflow
BTheCoderr Oct 10, 2026
b13d0b1
security: remove hardcoded Neon and service credentials from setup he…
BTheCoderr Oct 10, 2026
d5abbf8
style: unify JackerBox colors across desktop and mobile UI
BTheCoderr Oct 10, 2026
feba00d
style: align auth, messaging, forms, and error actions with JackerBox…
BTheCoderr Oct 10, 2026
6024842
fix: avoid guest SSE 401 errors and hide debug status overlay
BTheCoderr Oct 10, 2026
0ee16fa
docs: record JackerBox Supabase bootstrap and secure release gates
BTheCoderr Oct 11, 2026
30f4df7
docs: verify Supabase server-only RLS and API privilege lockdown
BTheCoderr Oct 11, 2026
a1d9240
test: add read-only Supabase preview database connection guard
BTheCoderr Oct 11, 2026
37a7ed4
chore: prepare Supabase preview connection guidance (.env.example)
BTheCoderr Oct 11, 2026
c08b818
chore: prepare Supabase preview connection guidance (package.json)
BTheCoderr Oct 11, 2026
f37168f
chore: prepare Supabase preview connection guidance (docs/supabase-fr…
BTheCoderr Oct 11, 2026
1356293
security: guard JackerBox preview against incorrect Supabase project URL
BTheCoderr Oct 11, 2026
62ad746
fix: respect signup account type and protect registration responses
BTheCoderr Oct 11, 2026
8fd79c7
fix: handle signup sign-in failure and optional phone correctly
BTheCoderr Oct 11, 2026
e06743e
fix: align equipment photo count and reject fabricated upload fallbacks
BTheCoderr Oct 11, 2026
049c2ad
fix: remove disabled Apple registration option
BTheCoderr Oct 11, 2026
4a24f11
test: lock signup role, session handling and real listing photos
BTheCoderr Oct 11, 2026
a6f6de9
fix: return paginated, searchable equipment with real images and tags
BTheCoderr Oct 11, 2026
ca7091d
fix: keep equipment city filter synchronized with URL and backend
BTheCoderr Oct 11, 2026
7a5d1a5
fix: real equipment categories, city filter and accurate sort options
BTheCoderr Oct 11, 2026
aeaa291
fix: show one filterable listing grid instead of duplicate equipment …
BTheCoderr Oct 11, 2026
fbb78b8
fix: correct equipment page layout closing tag
BTheCoderr Oct 11, 2026
cd42d76
fix: point all listing cards at the existing equipment detail route
BTheCoderr Oct 11, 2026
2ad9c93
test: guard marketplace listing search API and UI parity
BTheCoderr Oct 11, 2026
18f7d77
security: remove embedded Upstash Redis tokens and fail closed on mis…
BTheCoderr Oct 11, 2026
aa45d52
security: enforce distributed signup attempt limits and fail closed w…
BTheCoderr Oct 11, 2026
f0072bc
docs: document Redis requirements for secure signup
BTheCoderr Oct 11, 2026
9f816ae
docs: document Redis requirements for secure signup
BTheCoderr Oct 11, 2026
fe3ea6b
test: enforce safe Redis configuration and distributed signup rate li…
BTheCoderr Oct 11, 2026
6900c88
fix: calculate booking estimates with server-side rental pricing logic
BTheCoderr Oct 11, 2026
917768f
test: ensure booking quote reuses server pricing rules
BTheCoderr Oct 11, 2026
e5730c9
fix: remove stray booking form effect braces breaking TypeScript build
BTheCoderr Oct 13, 2026
a5bdb10
security: add fail-closed JackerBox staging configuration guard
BTheCoderr Oct 13, 2026
649b56c
security: require verified staging configuration for Netlify previews
BTheCoderr Oct 13, 2026
10aa6dc
test: cover fail-closed staging configuration safety checks
BTheCoderr Oct 13, 2026
7bae2ee
ci: run staging safety guard tests before release build
BTheCoderr Oct 13, 2026
ffe63a2
security: add request-time guard for unapproved JackerBox staging pre…
BTheCoderr Oct 13, 2026
986e497
security: freeze unapproved staging previews without changing product…
BTheCoderr Oct 13, 2026
1f3951d
config: pin staging project reference and preview marker only for non…
BTheCoderr Oct 13, 2026
5133e4f
test: check preview request freeze and production host isolation
BTheCoderr Oct 13, 2026
22e0344
ci: verify staging runtime lock alongside existing security regressio…
BTheCoderr Oct 13, 2026
b17309f
docs: clarify secure Netlify preview setup and release approval gates
BTheCoderr Oct 13, 2026
c43ef1d
test: avoid credential-shaped dummy URL flagged by GitGuardian
BTheCoderr Oct 13, 2026
707a788
security: enforce staging checks on separate Netlify site even in pro…
BTheCoderr Oct 13, 2026
f0edc7e
security: recognize independently isolated staging Netlify site
BTheCoderr Oct 13, 2026
3fe5ddb
config: gate dedicated Netlify staging site before any build
BTheCoderr Oct 13, 2026
8295a64
security: block unapproved requests on independent staging hostname
BTheCoderr Oct 13, 2026
dac3599
test: cover separate staging site host and deploy aliases
BTheCoderr Oct 13, 2026
c5eef77
test: enforce dedicated site staging gate without impacting production
BTheCoderr Oct 13, 2026
341dbf5
docs: record isolated staging Netlify site and exact safe connection …
BTheCoderr Oct 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 0 additions & 58 deletions .env.backup

This file was deleted.

11 changes: 0 additions & 11 deletions .env.cloud

This file was deleted.

113 changes: 42 additions & 71 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,72 +1,43 @@
# Environment variables declared in this file are automatically made available to Prisma.
# See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema

# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB.
# See the documentation for all the connection string options: https://pris.ly/d/connection-strings

# Database configuration
# For local development, use direct connection
DATABASE_URL="postgresql://username:password@host:port/database?sslmode=require"
DIRECT_DATABASE_URL="postgresql://username:password@host:port/database?sslmode=require"
# For local development, you can keep the SQLite connection as a fallback
# DATABASE_URL="file:./dev.db"

# NextAuth.js
# JackerBox local configuration TEMPLATE. No real credentials belong in Git.
# Add real values only to your local .env (ignored) or to your hosting provider's secrets.
DATABASE_URL=
DIRECT_DATABASE_URL=
# Non-secret safety guard for the read-only preview verification script
JACKERBOX_SUPABASE_PROJECT_REF=
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your-nextauth-secret

# OAuth Providers (add your own credentials when setting up)
GOOGLE_CLIENT_ID="your-google-client-id"
GOOGLE_CLIENT_SECRET="your-google-client-secret"
APPLE_CLIENT_ID=""
APPLE_CLIENT_SECRET=""

# Stripe (Payment Processing)
# Using test keys for development
STRIPE_SECRET_KEY=your-stripe-secret-key
STRIPE_PUBLISHABLE_KEY=your-stripe-publishable-key
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=your-stripe-publishable-key

STRIPE_WEBHOOK_SECRET=your-stripe-webhook-secret
STRIPE_IDENTITY_WEBHOOK_SECRET=your-stripe-identity-webhook-secret
STRIPE_ACCOUNT_COUNTRY=US

# Cloudinary (Image Upload)
NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME="your-cloudinary-cloud-name"
CLOUDINARY_API_KEY="your-cloudinary-api-key"
CLOUDINARY_API_SECRET="your-cloudinary-api-secret"
CLOUDINARY_URL="cloudinary://your-api-key:your-api-secret@your-cloud-name"

# AWS (for S3 and Rekognition)
AWS_REGION="your-aws-region"
AWS_ACCESS_KEY_ID="your-aws-access-key-id"
AWS_SECRET_ACCESS_KEY="your-aws-secret-access-key"
AWS_S3_BUCKET_NAME="your-s3-bucket-name"

# Twilio (SMS Verification)
TWILIO_ACCOUNT_SID=""
TWILIO_AUTH_TOKEN=""
TWILIO_PHONE_NUMBER=""

# Email (optional)
EMAIL_FROM=noreply@example.com
EMAIL_SERVER=smtp://username:password@smtp.example.com:587

# Firebase (for phone verification)
NEXT_PUBLIC_FIREBASE_API_KEY="your-firebase-api-key"
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN="your-firebase-auth-domain"
NEXT_PUBLIC_FIREBASE_PROJECT_ID="your-firebase-project-id"
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET="your-firebase-storage-bucket"
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID="your-firebase-messaging-sender-id"
NEXT_PUBLIC_FIREBASE_APP_ID="your-firebase-app-id"

APPLE_TEAM_ID=2PF2FNX9X6
APPLE_CLIENT_ID=com.jackerbox
APPLE_KEY_ID=HX8H87KYWG
APPLE_PRIVATE_KEY=-----BEGIN PRIVATE KEY-----
MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgjlLbtFOdb20cmqfL
ESK0IB01iRrNDEZnY2meztsOENugCgYIKoZIzj0DAQehRANCAAQWADQcTbwAEUEi
9u3THkeByaDPIGVq7Nvi9oA1KY9dbn/p64K1R+fdD6CaM5J6m9fJpUQ3zoYKGHYp
c7mRl5ps
-----END PRIVATE KEY-----
# Add other environment variables as needed
NEXTAUTH_SECRET=
# Required for distributed signup rate limiting (set as Netlify secrets)
UPSTASH_REDIS_REST_URL=
UPSTASH_REDIS_REST_TOKEN=
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
APPLE_CLIENT_ID=
APPLE_CLIENT_SECRET=
STRIPE_SECRET_KEY=
STRIPE_PUBLISHABLE_KEY=
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=
STRIPE_WEBHOOK_SECRET=
STRIPE_IDENTITY_WEBHOOK_SECRET=
STRIPE_ACCOUNT_COUNTRY=
NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME=
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=
CLOUDINARY_URL=
AWS_REGION=
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_S3_BUCKET_NAME=
TWILIO_ACCOUNT_SID=
TWILIO_AUTH_TOKEN=
TWILIO_PHONE_NUMBER=
EMAIL_FROM=
EMAIL_SERVER=
NEXT_PUBLIC_FIREBASE_API_KEY=
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=
NEXT_PUBLIC_FIREBASE_PROJECT_ID=
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=
NEXT_PUBLIC_FIREBASE_APP_ID=
APPLE_TEAM_ID=
APPLE_KEY_ID=
APPLE_PRIVATE_KEY=
29 changes: 0 additions & 29 deletions .env.production

This file was deleted.

96 changes: 96 additions & 0 deletions .github/workflows/jackerbox-repair.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: JackerBox repair checks

on:
pull_request:
branches:
- main

permissions:
contents: read

jobs:
security-and-unit:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: npm
- name: Install dependencies
run: npm ci --legacy-peer-deps
- name: Generate Prisma client
run: npx prisma generate
- name: Verify security repair regression tests
run: npx jest tests/unit/security-guardrails.test.ts tests/unit/rental-pricing.test.ts tests/unit/test-verification-guard.test.ts tests/unit/uuid-compatibility.test.ts tests/unit/migration-history.test.ts tests/unit/stripe-workflow.test.ts tests/unit/staging-preview.test.ts --runInBand
- name: Verify non-production staging isolation guard
run: node --test tests/unit/staging-env-guard.test.mjs
- name: TypeScript diagnostics (release gate)
run: npx tsc --noEmit
- name: Production Webpack build (release gate)
run: npm run build
env:
NEXT_TELEMETRY_DISABLED: '1'
- name: Dependency audit with zero-vulnerability threshold
if: always()
run: npm audit --omit=dev --audit-level=moderate

migrate-fresh-postgres:
runs-on: ubuntu-latest
timeout-minutes: 15
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: jackerbox
POSTGRES_PASSWORD: isolated_test_password
POSTGRES_DB: jackerbox_migrations
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U jackerbox -d jackerbox_migrations"
--health-interval 5s
--health-timeout 5s
--health-retries 12
env:
DATABASE_URL: postgresql://jackerbox:isolated_test_password@localhost:5432/jackerbox_migrations?schema=public
DIRECT_DATABASE_URL: postgresql://jackerbox:isolated_test_password@localhost:5432/jackerbox_migrations?schema=public
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: npm
- name: Reproducible dependency install
run: npm ci --legacy-peer-deps
- name: Validate schema formatting and generate client
run: |
npx prisma validate
npx prisma generate
- name: Apply historical migrations and seed legacy financial/message records
run: |
mv prisma/migrations/20261010130000_reconcile_legacy_schema /tmp/jackerbox_reconcile_migration
npx prisma migrate deploy
psql "postgresql://jackerbox:isolated_test_password@localhost:5432/jackerbox_migrations" -v ON_ERROR_STOP=1 -f tests/fixtures/legacy-schema-before.sql
mv /tmp/jackerbox_reconcile_migration prisma/migrations/20261010130000_reconcile_legacy_schema
- name: Apply safe reconciliation migration and verify surviving data
run: |
npx prisma migrate deploy
psql "postgresql://jackerbox:isolated_test_password@localhost:5432/jackerbox_migrations" -v ON_ERROR_STOP=1 -f tests/fixtures/legacy-schema-after.sql
- name: Verify migration status
run: npx prisma migrate status
- name: Verify migrations can be reapplied idempotently
run: npx prisma migrate deploy
- name: Review SQL needed to reconcile model drift (do not execute)
run: npx prisma migrate diff --from-url "$DIRECT_DATABASE_URL" --to-schema-datamodel prisma/schema.prisma --script
- name: Validate intentional legacy-data retention only
run: |
npx prisma migrate diff --from-url "$DIRECT_DATABASE_URL" --to-schema-datamodel prisma/schema.prisma --script > /tmp/jackerbox-schema-drift.sql
node scripts/validate-legacy-schema-drift.mjs /tmp/jackerbox-schema-drift.sql
- name: Verify retention allowlist rejects unexpected schema changes
run: node --test tests/unit/legacy-schema-drift.test.mjs
- name: Production type checks
run: npx tsc --noEmit
23 changes: 23 additions & 0 deletions REPAIR-VERIFICATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# JackerBox Repair Verification

This branch is **not** a production release. It removes exposed configuration from the latest tree, closes unauthenticated debug and test routes, secures checkout and changes the rental state machine.

## Release prerequisites

1. **Rotate exposed credentials immediately**: all database URLs/passwords, NextAuth secret, Redis/Upstash, Stripe, AWS, Google OAuth, Apple, Resend and Cloudinary values discovered in historical env files. Removing files from Git does not revoke the credentials. Review Git history and provider audit logs separately.
2. Review Netlify environment variable names and update values in Netlify. No tokens should be pasted into GitHub issues, PRs or chat.
3. Next.js is upgraded to 15.5.27 and React to 19.0.6. The manifest and lockfile were regenerated together. Confirm `npm ci` succeeds before releasing.
4. Run `npm ci --legacy-peer-deps`, `npm run test:unit -- --runInBand`, `npx tsc --noEmit`, and a full Next.js build in a test environment with dummy/non-production keys. Existing type and ESLint errors are **not** considered resolved by this security patch.
5. Exercise the end-to-end renter/owner Stripe **test-mode** flow: create equipment -> book -> pay -> webhook -> PAID -> ACTIVE -> COMPLETED -> admin payout -> admin deposit refund. Test overlaps, abandoned pending holds, duplicate Stripe webhooks and payout retries.
6. Publish only after successful checks and owner approval. Confirm `jackerbox.app` serves Next.js routes, not the former static placeholder.

## Known limitations requiring follow-up

- Old database records may use obsolete rental/payment states and need reconciliation before release.
- Payout and deposit refund services now call Stripe with stable idempotency keys but are not validated against a connected Stripe test account.
- Historical Git commits still contain secrets; rotation is required even after source cleanup.
- Booking availability supports blackout dates and rental overlaps, but recurring availability schedules and calendar sync still need integrated test coverage.
- Identity verification should be finalized using signed Stripe Identity webhooks and human review where appropriate.
- An old client may still be looking for obsolete payment routes; run real browser checks on mobile and desktop.

No production deployment or database migration is included in this repair branch.
Loading
Loading