Skip to content

Add shopping list - #5

Open
Mihilih wants to merge 1 commit into
feature/choresfrom
feature/shopping
Open

Mihilih wants to merge 1 commit into
feature/choresfrom
feature/shopping

Conversation

@Mihilih

@Mihilih Mihilih commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

Overview

Adds the shared shopping list: adding items, "I'll get it" claims, marking items bought, and the running total of bought items that can be split. Also adds demo seed data and the full API docs and Postman collection. This is the last MVP PR, stacked on #4 (chores), and is taken from mvp-features, which is what the dev server runs.

Changes Made

New src/shopping/ module

  • shoppingController.ts, shoppingRouter.ts, shopping.schema.ts: routes, logic and request validation
  • Prices are stored as whole cents ($4.29 → 429)
  • Categories: GROCERIES (default), HOUSEHOLD, OTHER

Endpoints (all under /houses/:houseId/shopping-items, members only)

  • GET /: the list split into Needed and Bought, plus a billable total of bought items with a price that aren't on a bill yet. Filter with ?category= and ?status=
  • POST /: add an item
  • PATCH /:itemId: edit name, category or price
  • DELETE /:itemId: delete an item
  • POST / DELETE /:itemId/claim: "I'll get it" and undo
  • POST /:itemId/buy with an optional priceCents, and DELETE /:itemId/buy to undo. Buying clears any claim

Houses

  • Mounted the shopping router in houseRouter.ts
  • Leaving or being removed from a house now also releases that person's "I'll get it" claims, finishing the leave cleanup started in the chores PR. Bought items stay in the history

Seed data and docs

  • prisma/seed.ts and npm run db:seed: demo house "The Linden Loft" from the Figma designs, with three members, chores and shopping items. It wipes the database first and refuses to run in production. Sign in locally with Bearer dev:lk452, dev:sc2291 or dev:mv384
  • docs/API.md: chores and shopping sections
  • docs/roomie.postman_collection.json: every MVP endpoint

No schema changes. The shopping tables were already in the initial migration.

Test Coverage

test/shopping.test.ts (8 tests):

  • Adding items and showing who added them
  • Claiming and unclaiming
  • Buying moves items to Bought and updates the billable total
  • Buying clears the claim, and buying can be undone
  • Prices must be whole cents
  • Deleting items
  • Claims are released when someone moves out
  • Other houses' lists can't be seen or changed

Existing login, houses and chores tests still pass.

Next Steps

  • Bills: turn the billable total into a bill and split it between roommates
  • After this merges, main matches mvp-features except for the README and deploy settings, so the dev server can switch to deploying from main

@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a72f13b5-86ed-41e0-bfd5-ee90fe19d389
Commits

Reviewing files that changed from the base of the PR and between 281c1a4 and 7e35275.

Files selected for processing: 12

  • docs/API.md
  • docs/roomie.postman_collection.json
  • package.json
  • prisma.config.ts
  • prisma/seed.ts
  • src/app.ts
  • src/houses/houseRouter.ts
  • src/houses/houseService.ts
  • src/shopping/shopping.schema.ts
  • src/shopping/shoppingController.ts
  • src/shopping/shoppingRouter.ts
  • test/shopping.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@Mihilih
Mihilih added this pull request to stack #6 November 11, 2026 22:28
@Mihilih Mihilih mentioned this pull request Nov 11, 2026
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