Commit Graph

74 Commits

Author SHA1 Message Date
mohamad
821a26e681 feat: Add Recurrence Pattern and Update Expense Schema
- Introduced a new `RecurrencePattern` model to manage recurrence details for expenses, allowing for daily, weekly, monthly, and yearly patterns.
- Updated the `Expense` model to include fields for recurrence management, such as `is_recurring`, `recurrence_pattern_id`, and `next_occurrence`.
- Modified the database schema to reflect these changes, including alterations to existing columns and the removal of obsolete fields.
- Enhanced the expense creation logic to accommodate recurring expenses and updated related CRUD operations accordingly.
- Implemented necessary migrations to ensure database integrity and support for the new features.
2025-06-01 14:23:05 +02:00
mohamad
ee6d96d9ec feat: Revamp ChoresPage with enhanced UI and functionality
- Redesigned the ChoresPage layout to improve user experience, introducing a new header with tabs for viewing overdue, today, upcoming, all pending, and completed chores.
- Implemented a calendar view for better visualization of chores, allowing users to navigate between months and add chores directly on specific dates.
- Added a loading state to enhance feedback during data fetching.
- Introduced a shortcuts modal to display keyboard shortcuts for improved accessibility.
- Enhanced chore card interactions with improved styling and responsiveness, including a transition effect for list items.
- Updated chore management functionalities, including create, edit, and delete operations, with better validation and auto-save features.
2025-06-01 13:19:28 +02:00
mohamad
8c52bbb307 feat: Integrate Storybook for component development 2025-05-31 14:43:59 +02:00
mohamad
ce67570cfb feat: Update deployment workflow and enhance ListDetailPage functionality
- Modified the production deployment workflow to trigger on pushes to the 'prod' branch and updated Docker registry login to use Gitea Container Registry.
- Enhanced ListDetailPage.vue to improve loading states and error handling, introducing a new loading mechanism for items and utilizing session storage for cached data.
- Implemented Intersection Observer for pre-fetching list details to optimize user experience during navigation.
- Improved touch feedback for list cards and optimized styles for mobile responsiveness.
2025-05-31 14:08:40 +02:00
mohamad
cb51186830 feat: Add production deployment configuration and environment setup
- Introduced `docker-compose.prod.yml` to define services for production deployment, including PostgreSQL, FastAPI backend, frontend, and Redis.
- Created `env.production.template` to outline necessary environment variables for production, ensuring sensitive data is not committed.
- Added `PRODUCTION.md` as a deployment guide detailing the setup process using Docker Compose and Gitea Actions for CI/CD.
- Implemented Gitea workflows for build, test, and deployment processes to streamline production updates.
- Updated backend and frontend Dockerfiles for optimized production builds and configurations.
- Enhanced application settings to support environment-specific configurations, including CORS and health checks.
2025-05-28 08:23:22 +02:00
mohamad
84b046508a feat: Implement refresh token functionality in authentication flow
- Added support for refresh tokens in the authentication backend, allowing users to obtain new access tokens using valid refresh tokens.
- Created a new `BearerResponseWithRefresh` model to structure responses containing both access and refresh tokens.
- Updated the `AuthenticationBackend` to handle login and logout processes with refresh token support.
- Introduced a new `/auth/jwt/refresh` endpoint to facilitate token refreshing, validating the refresh token and generating new tokens as needed.
- Modified OAuth callback logic to generate and return both access and refresh tokens upon successful authentication.
- Updated frontend API service to send the refresh token in the Authorization header for token refresh requests.
2025-05-25 12:51:02 +02:00
mohamad
a0d67f6c66 feat: Add comprehensive notes and tasks for project stabilization and enhancements
- Introduced a new `notes.md` file to document critical tasks and progress for stabilizing the core functionality of the MitList application.
- Documented the status and findings for key tasks, including backend financial logic fixes, frontend expense split settlement implementation, and core authentication flow reviews.
- Outlined remaining work for production deployment, including secret management, CI/CD pipeline setup, and performance optimizations.
- Updated the logging configuration to change the log level to WARNING for production readiness.
- Enhanced the database connection settings to disable SQL query logging in production.
- Added a new endpoint to list all chores for improved user experience and optimized database queries.
- Implemented various CRUD operations for chore assignments, including creation, retrieval, updating, and deletion.
- Updated frontend components and services to support new chore assignment features and improved error handling.
- Enhanced the expense management system with new fields and improved API interactions for better user experience.
2025-05-24 21:36:57 +02:00
mohamad
81577ac7e8 feat: Add Recurrence Pattern and Update Expense Schema
- Introduced a new `RecurrencePattern` model to manage recurrence details for expenses, allowing for daily, weekly, monthly, and yearly patterns.
- Updated the `Expense` model to include fields for recurrence management, such as `is_recurring`, `recurrence_pattern_id`, and `next_occurrence`.
- Modified the database schema to reflect these changes, including alterations to existing columns and the removal of obsolete fields.
- Enhanced the expense creation logic to accommodate recurring expenses and updated related CRUD operations accordingly.
- Implemented necessary migrations to ensure database integrity and support for the new features.
2025-05-23 21:01:49 +02:00
google-labs-jules[bot]
b0100a2e96 Fix: Ensure financial accuracy in cost splitting and balances
I've refactored the group balance summary logic to correctly account for
SettlementActivity. A SettlementActivity now reduces your
effective total_share_of_expenses, ensuring that net balances within
a group sum to zero. Previously, SettlementActivity amounts were
incorrectly added to total_settlements_paid, skewing balance
calculations.

I updated the existing `test_group_balance_summary_with_settlement_activity`
to assert the corrected balance outcomes.

I also added an extensive suite of API-level tests for:
- All expense splitting types (EQUAL, EXACT_AMOUNTS, PERCENTAGE, SHARES, ITEM_BASED),
  covering various scenarios and input validations.
- Group balance summary calculations, including multiple scenarios with
  SettlementActivity, partial payments, multiple expenses, and
  interactions with generic settlements. All balance tests verify that
  the sum of net balances is zero.

The CRUD operations for expenses and settlement activities were reviewed
and found to be sound, requiring no changes for this fix.

This resolves the flawed logic identified in
`be/tests/api/v1/test_costs.py` (test_group_balance_summary_with_settlement_activity)
and ensures that backend financial calculations are provably correct.
2025-05-22 17:04:46 +00:00
Mohamad.Elsena
5018ce02f7 feat: Implement recurring expenses feature with scheduling and management
- Added support for recurring expenses, allowing users to define recurrence patterns (daily, weekly, monthly, yearly) for expenses.
- Introduced `RecurrencePattern` model to manage recurrence details and linked it to the `Expense` model.
- Implemented background job scheduling using APScheduler to automatically generate new expenses based on defined patterns.
- Updated expense creation logic to handle recurring expenses, including validation and database interactions.
- Enhanced frontend components to allow users to create and manage recurring expenses through forms and lists.
- Updated documentation to reflect new features and usage guidelines for recurring expenses.
2025-05-22 16:37:14 +02:00
Mohamad.Elsena
52fc33b472 feat: Add CreateExpenseForm component and integrate into ListDetailPage
- Introduced CreateExpenseForm.vue for creating new expenses with fields for description, total amount, split type, and date.
- Integrated the CreateExpenseForm into ListDetailPage.vue, allowing users to add expenses directly from the list view.
- Enhanced UI with a modal for the expense creation form and added validation for required fields.
- Updated styles for consistency across the application.
- Implemented logic to refresh the expense list upon successful creation of a new expense.
2025-05-22 13:05:49 +02:00
whtvrboo
e7b072c2bd
Merge pull request #4 from whtvrboo/feat/traceable-expense-settlement
feat: Implement traceable expense splitting and settlement activities
2025-05-22 09:06:13 +02:00
google-labs-jules[bot]
f1152c5745 feat: Implement traceable expense splitting and settlement activities
Backend:
- Added `SettlementActivity` model to track payments against specific expense shares.
- Added `status` and `paid_at` to `ExpenseSplit` model.
- Added `overall_settlement_status` to `Expense` model.
- Implemented CRUD for `SettlementActivity`, including logic to update parent expense/split statuses.
- Updated `Expense` CRUD to initialize new status fields.
- Defined Pydantic schemas for `SettlementActivity` and updated `Expense/ExpenseSplit` schemas.
- Exposed API endpoints for creating/listing settlement activities and settling shares.
- Adjusted group balance summary logic to include settlement activities.
- Added comprehensive backend unit and API tests for new functionality.

Frontend (Foundation & TODOs due to my current capabilities):
- Created TypeScript interfaces for all new/updated models.
- Set up `listDetailStore.ts` with an action to handle `settleExpenseSplit` (API call is a placeholder) and refresh data.
- Created `SettleShareModal.vue` component for payment confirmation.
- Added unit tests for the new modal and store logic.
- Updated `ListDetailPage.vue` to display detailed expense/share statuses and settlement activities.
- `mitlist_doc.md` updated to reflect all backend changes and current frontend status.
- A `TODO.md` (implicitly within `mitlist_doc.md`'s new section) outlines necessary manual frontend integrations for `api.ts` and `ListDetailPage.vue` to complete the 'Settle Share' UI flow.

This set of changes provides the core backend infrastructure for precise expense share tracking and settlement, and lays the groundwork for full frontend integration.
2025-05-22 07:05:31 +00:00
whtvrboo
8bb960b605
Merge pull request #3 from whtvrboo/feat/frontend-tests
feat: Add comprehensive unit and E2E tests for Vue frontend
2025-05-22 08:43:11 +02:00
google-labs-jules[bot]
0bf7a7cb49 feat: Add comprehensive unit and E2E tests for Vue frontend
This commit introduces a suite of unit and E2E tests for the Vue.js
frontend, significantly improving code coverage and reliability.

Unit Test Summary:
- Setup: Configured Vitest and @vue/test-utils.
- Core UI Components: Added tests for EssentialLink, SocialLoginButtons,
  and NotificationDisplay.
- Pinia Stores: Implemented tests for auth, notifications, and offline
  stores, including detailed testing of actions, getters, and state
  management. Offline store tests were adapted to its event-driven design.
- Services:
  - api.ts: Tested Axios client config, interceptors (auth token refresh),
    and wrapper methods.
  - choreService.ts & groupService.ts: Tested all existing service
    functions for CRUD operations, mocking API interactions.
- Pages:
  - AccountPage.vue: Tested rendering, data fetching, form submissions
    (profile, password, preferences), and error handling.
  - ChoresPage.vue: Tested rendering, chore display (personal & grouped),
    CRUD modals, and state handling (loading, error, empty).
  - LoginPage.vue: Verified existing comprehensive tests.

E2E Test (Playwright) Summary:
- Auth (`auth.spec.ts`):
  - User signup, login, and logout flows.
  - Logout test updated with correct UI selectors.
- Group Management (`groups.spec.ts`):
  - User login handled via `beforeAll` and `storageState`.
  - Create group and view group details.
  - Update and Delete group tests are skipped as corresponding UI
    functionality is not present in GroupDetailPage.vue.
  - Selectors updated based on component code.
- List Management (`lists.spec.ts`):
  - User login handled similarly.
  - Create list (within a group), view list, add item to list,
    and mark item as complete.
  - Delete list test is skipped as corresponding UI functionality
    is not present.
  - Selectors based on component code.

This work establishes a strong testing foundation for the frontend.
Skipped E2E tests highlight areas where UI functionality for certain
CRUD operations (group update/delete, list delete) may need to be added
if desired.
2025-05-22 06:41:35 +00:00
whtvrboo
653788cfba
Merge pull request #2 from whtvrboo/feat/frontend-tests
feat: Add comprehensive unit tests for Vue frontend
2025-05-21 21:08:10 +02:00
google-labs-jules[bot]
c0dcccd970 feat: Add comprehensive unit tests for Vue frontend
This commit introduces a suite of unit tests for the Vue.js frontend,
significantly improving code coverage and reliability.

Key areas covered:
- **Setup**: Configured Vitest and @vue/test-utils.
- **Core UI Components**: Added tests for SocialLoginButtons and NotificationDisplay.
- **Pinia Stores**: Implemented tests for auth, notifications, and offline stores,
  including detailed testing of actions, getters, and state management.
  Offline store tests were adapted to its event-driven design.
- **Services**:
  - `api.ts`: Tested Axios client config, interceptors (auth token refresh),
    and wrapper methods.
  - `choreService.ts` & `groupService.ts`: Tested all existing service
    functions for CRUD operations, mocking API interactions.
- **Pages**:
  - `AccountPage.vue`: Tested rendering, data fetching, form submissions
    (profile, password, preferences), and error handling.
  - `ChoresPage.vue`: Tested rendering, chore display (personal & grouped),
    CRUD modals, and state handling (loading, error, empty).
  - `LoginPage.vue`: Verified existing comprehensive tests.

These tests provide a solid foundation for frontend testing. The next planned
step is to enhance E2E tests using Playwright.
2025-05-21 19:07:34 +00:00
mohamad
0204fb6f3a Add .env to .gitignore to prevent environment configuration files from being tracked 2025-05-21 20:23:57 +02:00
Mohamad.Elsena
29ccab2f7e feat: Implement chore management feature with personal and group chores
This commit introduces a comprehensive chore management system, allowing users to create, manage, and track both personal and group chores. Key changes include:
- Addition of new API endpoints for personal and group chores in `be/app/api/v1/endpoints/chores.py`.
- Implementation of chore models and schemas to support the new functionality in `be/app/models.py` and `be/app/schemas/chore.py`.
- Integration of chore services in the frontend to handle API interactions for chore management.
- Creation of new Vue components for displaying and managing chores, including `ChoresPage.vue` and `PersonalChoresPage.vue`.
- Updates to the router to include chore-related routes and navigation.

This feature enhances user collaboration and organization within shared living environments, aligning with the project's goal of streamlining household management.
2025-05-21 18:18:22 +02:00
Mohamad.Elsena
ed222c840a Remove obsolete Alembic migration files related to chore tables and assignments. This cleanup eliminates unused migration scripts that are no longer needed in the project. 2025-05-21 13:38:00 +02:00
whtvrboo
04b0ad7059
Merge pull request #1 from whtvrboo/feat/chore-management-backend-core
feat: Initial backend setup for Chore Management (Models, Migrations,…
2025-05-21 13:23:07 +02:00
google-labs-jules[bot]
16c9abb16a feat: Initial backend setup for Chore Management (Models, Migrations, Schemas, Chore CRUD)
I've implemented the foundational backend components for the chore management feature.

Key changes include:
- Definition of `Chore` and `ChoreAssignment` SQLAlchemy models in `be/app/models.py`.
- Addition of corresponding relationships to `User` and `Group` models.
- Creation of an Alembic migration script (`manual_0001_add_chore_tables.py`) for the new database tables. (Note: Migration not applied in sandbox).
- Implementation of a utility function `calculate_next_due_date` in `be/app/core/chore_utils.py` for determining chore due dates based on recurrence rules.
- Definition of Pydantic schemas (`ChoreCreate`, `ChorePublic`, `ChoreAssignmentCreate`, `ChoreAssignmentPublic`, etc.) in `be/app/schemas/chore.py` for API data validation.
- Implementation of CRUD operations (create, read, update, delete) for Chores in `be/app/crud/chore.py`.

This commit lays the groundwork for adding Chore Assignment CRUD operations and the API endpoints for both chores and their assignments.
2025-05-21 09:28:38 +00:00
Mohamad.Elsena
185e89351e Update expense creation to include current user ID for better tracking. Introduce a utility function to round monetary values to two decimal places. Enhance ListDetailPage styles by adding overflow handling for improved UI layout. 2025-05-21 09:34:51 +02:00
Mohamad
17bebbfab8 Refactor UI styles across multiple pages to enhance consistency and responsiveness. Update background colors to use CSS variables for improved theming in GroupDetailPage, GroupsPage, ListDetailPage, and ListsPage. Ensure all components align with the overall design system for a cohesive user experience. 2025-05-20 10:42:55 +02:00
Mohamad
fc355077ab Enhance database connection management by adding pool_pre_ping to ensure connections are live. Update connection pool settings for improved reliability. 2025-05-20 10:42:34 +02:00
mohamad
eb19230b22 Refactor frontend components and styles for improved UI consistency and responsiveness. Update HTML structure in index.html, enhance SCSS variables in valerie-ui.scss, and implement new layout styles across various pages. Adjust component props and event emissions for better data handling in CreateListModal and ConflictResolutionDialog. Add Material Icons for better visual representation in navigation. Ensure all changes align with the overall design system for a cohesive user experience. 2025-05-20 01:19:52 +02:00
mohamad
c8cdbd571e Add FastAPI database transaction management strategy and update requirements
Introduce a new technical specification for managing database transactions in FastAPI, ensuring ACID compliance through standardized practices. The specification outlines transaction handling for API endpoints, CRUD functions, and non-API operations, emphasizing the use of context managers and error handling.

Additionally, update the requirements file to include new testing dependencies for async operations, enhancing the testing framework for the application.
2025-05-20 01:19:37 +02:00
mohamad
d6d19397d3 Refactor authentication and user management to standardize session handling across OAuth flows. Update configuration to include default token type for JWT authentication. Enhance error handling with new exceptions for user operations, and clean up test cases for better clarity and reliability. 2025-05-20 01:19:21 +02:00
mohamad
323ce210ce Refactor database session management across multiple API endpoints to utilize a transactional session, enhancing consistency in transaction handling. Update dependencies in costs, financials, groups, health, invites, items, and lists modules for improved error handling and reliability. 2025-05-20 01:19:06 +02:00
mohamad
98b2f907de Refactor CRUD operations across multiple modules to standardize transaction handling using context managers, improving error logging and rollback mechanisms. Enhance error handling for database operations in expense, group, invite, item, list, settlement, and user modules, ensuring specific exceptions are raised for integrity and connection issues. 2025-05-20 01:18:49 +02:00
mohamad
e4175db4aa Implement test fixtures for async database sessions and enhance test coverage for CRUD operations. Introduce mock settings for financial endpoints and improve error handling in user and settlement tests. Refactor existing tests to utilize async mocks for better reliability and clarity. 2025-05-20 01:18:31 +02:00
mohamad
2b7816cf33 Update user model migration to include secure password hashing; set default hashed password for existing users. Refactor database session management for improved transaction handling and ensure session closure after use. 2025-05-20 01:17:47 +02:00
mohamad
5abe7839f1 Enhance configuration and error handling in the application; add new error messages for OCR and authentication processes. Refactor database session management to include transaction handling, and update models to track user creation for expenses and settlements. Update API endpoints to improve cost-sharing calculations and adjust invite management routes for clarity. 2025-05-17 13:56:17 +02:00
mohamad
c2aa62fa03 Update user model migration to set invalid password placeholder; enhance invite management with new endpoints for active invites and improved error handling in group invite creation. Refactor frontend to fetch and display active invite codes. 2025-05-16 22:31:44 +02:00
mohamad
f2ac73502c Enhance OAuth token handling in authentication flow; update frontend to support access and refresh tokens. Refactor auth store to manage refresh token state and improve token storage logic. 2025-05-16 22:08:56 +02:00
mohamad
9ff293b850 Ensure database transaction is committed after list creation in the API endpoint; improve reliability of list creation process. 2025-05-16 22:08:47 +02:00
mohamad
7a88ea258a Refactor database session management and exception handling across CRUD operations; streamline transaction handling in expense, group, invite, item, list, settlement, and user modules for improved reliability and clarity. Introduce specific operation errors for better error reporting. 2025-05-16 21:54:29 +02:00
mohamad
515534dcce Add conflict resolution for list creation and updates; implement offline action handling for list items. Enhance service worker with background sync capabilities and improve UI for offline states. 2025-05-16 02:07:41 +02:00
mohamad
3f0cfff9f1 Refactor authentication endpoints and user management; update CORS settings and JWT handling for improved security and compatibility with FastAPI-Users. Remove deprecated user-related endpoints and streamline API structure. 2025-05-14 01:04:09 +02:00
mohamad
72b988b79b Refactor authentication and database session handling; update user schemas for enhanced functionality and compatibility with FastAPI-Users. 2025-05-14 00:24:51 +02:00
mohamad
1c08e57afd fastapi-users, oauth, docker support, cleanup 2025-05-14 00:10:31 +02:00
mohamad
29682b7e9c Refactor input elements for consistency and readability; update styles for better alignment and spacing in SignupPage and ListDetailPage. 2025-05-13 22:46:40 +02:00
mohamad
18f759aa7c Add Sentry integration for error tracking; update requirements and configuration files. Introduce new Alembic migration for missing indexes and constraints in the database schema. 2025-05-13 21:45:45 +02:00
mohamad
9583aa4bab Remove repomix-output.xml file; update package.json and package-lock.json to include Supabase dependencies for enhanced authentication and real-time features. 2025-05-13 21:29:17 +02:00
mohamad
cacfb2a5e8 commit i guess 2025-05-13 20:33:02 +02:00
mohamad
227a3d6186 migrate to vue+vueuse+valerieui bc quasar customisation is sad 2025-05-13 19:23:15 +02:00
mohamad
9230d1f626 Remove ExampleComponent and example-store files 2025-05-09 00:11:02 +02:00
mohamad
5a910a29e2 Refactor data types in ConflictResolutionDialog and OfflineIndicator components for improved type safety; update OfflineAction interface to use 'unknown' instead of 'any' for data property, and enhance action label handling in OfflineIndicator for better clarity. 2025-05-09 00:10:37 +02:00
mohamad
db5f2d089e Implement offline functionality with conflict resolution; add OfflineIndicator component for user notifications, integrate offline action management in the store, and enhance service worker caching strategies for improved performance. 2025-05-08 23:52:11 +02:00
mohamad
7bbec7ad5f Add cost summary feature to ListDetailPage; implement API endpoints for costs and enhance UI with a dialog for displaying cost details, including user balances and total costs. 2025-05-08 23:38:07 +02:00