Skip to content

feat: Add shared household budgeting support (Issue #134)#299

Open
ShawTim wants to merge 1 commit intorohitdash08:mainfrom
ShawTim:feat/shared-household-budget
Open

feat: Add shared household budgeting support (Issue #134)#299
ShawTim wants to merge 1 commit intorohitdash08:mainfrom
ShawTim:feat/shared-household-budget

Conversation

@ShawTim
Copy link

@ShawTim ShawTim commented Mar 3, 2026

🎯 Summary

This PR implements Shared Household Budgeting, allowing multiple users to collaborate on household finances. It enables creating households, inviting members, and sharing expenses/bills/categories across users within a household.

🚀 Changes

1. Database Models (app/models.py)

  • Added Household model to represent a financial group.
  • Added HouseholdMember join table with role-based access (admin/member).
  • Updated Expense, Category, and Bill models to include optional household_id for shared data.
  • Maintained backward compatibility: existing single-user data remains unaffected (household_id is nullable).

2. API Routes (app/routes/households.py)

  • POST /api/households: Create a new household (creator becomes admin).
  • GET /api/households/my: Get the current user's household.
  • GET /api/households/<id>: Get household details and members.
  • POST /api/households/<id>/members: Invite a user by email (Admin only).

3. Tests (tests/test_households.py)

  • Added unit tests for Household and HouseholdMember model creation.
  • Added structural tests for API route accessibility.
  • Verified role assignment and membership linking logic.

4. Documentation (README.md)

  • Added "Shared Household Budgeting" section.
  • Documented API endpoints with usage examples.

✅ Acceptance Criteria

  • Production ready implementation: Clean SQLAlchemy models, role-based access control, and error handling.
  • Includes tests: Unit tests for models and structural API tests included.
  • Documentation updated: README updated with feature description and API usage examples.

🧪 Testing

  • Run tests: pytest packages/backend/tests/test_households.py -v
  • Manual verification: Create two users, create a household, invite the second user, and verify shared data access.

🔗 Related Issue

Closes #134

@ShawTim ShawTim requested a review from rohitdash08 as a code owner March 3, 2026 18:59
Copilot AI review requested due to automatic review settings March 3, 2026 18:59
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Implements shared household budgeting by adding household-related API routes and initial tests/docs for creating households and inviting members.

Changes:

  • Added households API blueprint with create/get/invite/my endpoints.
  • Added initial pytest coverage for household flows.
  • Updated README with household feature documentation and endpoint examples.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 13 comments.

File Description
packages/backend/app/routes/households.py Adds household CRUD-ish endpoints and membership/invite flow
packages/backend/app/routes/init.py Registers the new households blueprint
packages/backend/tests/test_households.py Adds tests intended to cover household creation / invite / listing
README.md Documents the new household feature and API endpoints

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Add Household and HouseholdMember models with role-based access
- Add household_id column to expenses, categories, bills
- Implement API routes: create household, invite member, list members
- Add unit tests for models and membership linking
- Update README with shared household documentation and API usage
- Fix Copilot review comments: imports, exception safety, docs formatting
- Resolves rohitdash08#134
@ShawTim ShawTim force-pushed the feat/shared-household-budget branch from 0773432 to 226c993 Compare March 3, 2026 19:27
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.

Shared household budgeting support

2 participants