Skip to content

Chores Cooperative encourages members of families, neighbourhoods and groups of roommates to perform common activities like cleaning, maintenance, cooking, shopping, etc.

License

Notifications You must be signed in to change notification settings

SebastianCelejewski/chocoop

Chores Cooperative

Application engaging members of families, neighbourhoods, or groups of roommates to perform common tasks (shopping, cleaning, maintenance, etc.) using gamification.

The goal of the application is to encourage collaboration through visibility, fairness, and experience-based motivation.


Core Concepts

Users

People who perform common tasks.

Each user:

  • has a nickname
  • gains experience points (XP)
  • can react to activities

Activities

Things that have already been done.

Each activity contains:

  • type – e.g. cooking, vacuuming, shopping
  • exp – experience points awarded
  • date
  • optional comment
  • reactions from other users

Activities are displayed in a virtualized list for performance.


Work Requests

Things that should be done in the future.

Each work request contains:

  • type
  • exp
  • priority

A work request can later be promoted into an activity once completed.


Architecture Overview

  • Frontend: React + TypeScript
  • Authentication: AWS Cognito (Amplify Authenticator)
  • Backend: AWS GraphQL
  • UI: Virtualized lists (react-virtualized)
  • Testing: Playwright (E2E, headless supported)

The application uses gamification mechanics:

  • XP system
  • visibility of contributions
  • reactions

Running the Application

Install dependencies

npm install

Start development server

npm run dev

The app runs at:

http://localhost:5173

End-to-End Testing

The project uses Playwright for E2E testing.

Run all tests

npx playwright test

Run in headed mode

npx playwright test --headed

Run a single test file

npx playwright test tests/e2e/activity.spec.ts

Authentication in Tests

Tests use a dedicated Cognito test user.

A setup test logs in and stores session state in:

tests/e2e/.auth/state.json

Subsequent tests reuse that session to avoid repeated login.


Important Notes About Virtualized Lists

The activity list is virtualized using react-virtualized.

This means:

  • Only visible rows are rendered in the DOM
  • Tests may need to scroll the virtualized container
  • Sorting new activities by creation time improves test stability

Design Decisions

  • data-testid attributes are used for stable test selectors
  • Business logic is tested, not native browser behavior
  • Date picker logic is tested (e.g. “Today”, “Yesterday” buttons), not browser UI
  • E2E tests rely on backend IDs intercepted from GraphQL responses

Roadmap Ideas

  • Kimbalontek, a spirit of the house that is happy or upset depending on the chores queue length and chores priorities
  • Notifications
    • about new work requests
    • about lack of any activities reported a given day
    • custom engagement messages generated by AI
  • End-year "wrapped" (like in Spotify)

🤝 Contributing

  1. Create a branch
  2. Make changes
  3. Add or update tests
  4. Open a pull request

All new features should include appropriate E2E coverage.


About

Chores Cooperative encourages members of families, neighbourhoods and groups of roommates to perform common activities like cleaning, maintenance, cooking, shopping, etc.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published