deckhearth/pages
Randall Stillwell b6891f1fa6 fix(api): delete dev endpoints + CI guard (Brief 3 of fix-auth-bypass)
Removes four unauthenticated dev endpoints that were shipped to production:

- pages/api/simple.js          (info leak)
- pages/api/test-auth.js       (auth diagnostic / token-mint side door)
- pages/api/test-db.js         (DB connection diagnostic)
- pages/api/setup-database.js  (public POST that ran DDL + seeded admin)

setup-database is the highest-impact removal: it was a public endpoint
that triggered schema bootstrap and seeded the default admin credentials
(admin@tcgvault.com / admin123). AGENTS.md gotcha #5.

Also adds a new `forbidden-endpoints` job to .github/workflows/ci.yml
that fails the build if any of the four deleted paths re-appear OR if
any new pages/api/test-*.js file is added. Cheap insurance against a
future agent re-introducing a dev endpoint from an outdated tutorial.

README: drops the single `GET /api/test-db` line under "Health Check".
Rest of the API list is intentionally left for the doc-writer pass.

Verified locally:
- npm run build exits 0 (no source callers — confirmed via grep across
  pages/, components/, lib/)
- CI guard local simulation: clean → OK; with test-fake.js → FAIL; OK
  after cleanup

Resolves AGENTS.md gotcha #5. Brief 1/2/4/5 still pending in convoy.

Convoy: fix-auth-bypass / Brief 3
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-23 09:54:09 -05:00
..
admin Fixed SSR and null user issues for production deployment 2025-07-24 17:04:06 -05:00
api fix(api): delete dev endpoints + CI guard (Brief 3 of fix-auth-bypass) 2026-05-23 09:54:09 -05:00
card Major Scanner Improvements 2025-07-29 14:19:48 -05:00
collection Major Scanner Improvements 2025-07-29 14:19:48 -05:00
community Major Scanner Improvements 2025-07-29 14:19:48 -05:00
deck Major Scanner Improvements 2025-07-29 14:19:48 -05:00
invite 🎉 COMPLETED: Full Collaborative Collections System 2025-07-25 08:34:28 -05:00
_app.js Major redesign: Enhanced card display with particle effects, improved filters, and search functionality 2025-07-23 21:26:54 -05:00
cards.js Major Scanner Improvements 2025-07-29 14:19:48 -05:00
collections.js 🔧 Fix System Collections & Database Schema Issues 2025-07-27 19:17:55 -05:00
dashboard.js Major Scanner Improvements 2025-07-29 14:19:48 -05:00
deck-builder.js Major Scanner Improvements 2025-07-29 14:19:48 -05:00
decks.js Major Scanner Improvements 2025-07-29 14:19:48 -05:00
index.js Major Scanner Improvements 2025-07-29 14:19:48 -05:00
login.js Clean Up Login & Add Signup Flow 2025-07-28 11:09:58 -05:00
logout.js 🎨 Restructured Layout System 2025-07-25 11:28:04 -05:00
my-cards.js Major Scanner Improvements 2025-07-29 14:19:48 -05:00
profile.js 🎯 Build Comprehensive User Profile & Settings System 2025-07-26 18:05:55 -05:00
scanner.js Marker: Fixed card queue property mismatch - cards now properly separate in scanner queue 2025-08-01 17:41:42 -05:00
settings.js 🎯 Build Comprehensive User Profile & Settings System 2025-07-26 18:05:55 -05:00
signup.js 🎨 Enhanced Signup with Username & Profile Images 2025-07-28 11:18:58 -05:00