Skip to content

Add inventory system for in-person hackathon#13

Draft
dropalltables wants to merge 6 commits intomainfrom
inventory-implementation
Draft

Add inventory system for in-person hackathon#13
dropalltables wants to merge 6 commits intomainfrom
inventory-implementation

Conversation

@dropalltables
Copy link
Copy Markdown
Collaborator

@dropalltables dropalltables commented Mar 24, 2026

No description provided.

@dropalltables dropalltables self-assigned this Mar 24, 2026
dropalltables and others added 3 commits March 28, 2026 12:58
- Add visual distinction for disabled item cards (opacity, red text, "Unavailable" label)
- Remove backdrop click-to-close on checkout modal to prevent accidental dismissal
- Add title tooltips to truncated cart item names
- Create InventoryAccessContext to share access data from layout, eliminating duplicate /api/inventory/access calls in admin layout, dashboard, and browse pages
- Add relative z-10 to admin sub-tab links to fix click target overlap
- Move themeColor from metadata to viewport export (Next.js deprecation fix)
- Add dogfood-output to .gitignore

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Resolve conflicts: keep both inventory and main additions for admin/dashboard
layouts, middleware CSP, prisma schema (bomTax, bomShipping, deletedProjects,
UserGoalPrize, DESIGN_APPROVED, REVIEWER_PAYMENT + all inventory models),
and viewport export for themeColor.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Verify caller is a team member or admin before allowing member removal
  (previously any authenticated user could kick anyone off any team)
- Exclude cancelled orders from maxPerTeam quota calculations in both
  item display and order validation queries
- Verify SSE subscribers belong to the requested team (or are admin)
  to prevent cross-team event snooping

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dropalltables dropalltables changed the title WIP: inventory system implementation Add inventory system for in-person hackathon Mar 28, 2026
dropalltables and others added 2 commits March 28, 2026 16:07
- Add input sanitization (DOMPurify) to all user-supplied fields across
  inventory routes (team names, locations, item names, descriptions)
- Fix IDOR: require team membership/admin to add members or view team details
- Fix authorization: restrict member removal to self-leave or admin only
- Fix race condition: use Serializable isolation on order stock transactions
- Remove email from non-admin API responses to protect minor PII
- Add requireInventoryAccess() gate to items, tools, teams, orders, rentals
- Validate quantity (positive int), floor (1-N range), location (max 200 chars),
  team name (max 100 chars), imageUrl (HTTPS-only, rejects javascript:/data:)
- Add audit logging for all user actions (order place/cancel, rental create,
  team create/join/leave/delete/rename, member add/kick, badge assign)
- Cap SSE connections (50/key, 500 total) to prevent DoS
- Block team deletion when active orders or rentals exist
- Fix shop purchase error re-throw that could leak internal state
- Add import hardening (500 item cap, Infinity blocked, sanitized strings)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant