- Updated the OAuth routes to be included under the main API prefix for better organization.
- Changed the Google login URL in the SocialLoginButtons component to reflect the new API structure.
These changes aim to improve the clarity and consistency of the API routing and enhance the login flow for users.
- Changed the Google and Apple redirect URIs in the configuration to include the API version in the path.
- Reorganized the inclusion of OAuth routes in the main application to ensure they are properly prefixed and accessible.
These updates aim to enhance the API structure and ensure consistency in the authentication flow.
- Updated the OAuth routes to be included under the main API prefix for better organization.
- Changed the Google login URL in the SocialLoginButtons component to reflect the new API structure.
These changes aim to improve the clarity and consistency of the API routing and enhance the login flow for users.
- Changed the Google and Apple redirect URIs in the configuration to include the API version in the path.
- Reorganized the inclusion of OAuth routes in the main application to ensure they are properly prefixed and accessible.
These updates aim to enhance the API structure and ensure consistency in the authentication flow.
- Updated the OAuth routes to be included under the main API prefix for better organization.
- Changed the Google login URL in the SocialLoginButtons component to reflect the new API structure.
These changes aim to improve the clarity and consistency of the API routing and enhance the login flow for users.
This commit addresses two issues:
1. A `TypeError` during Alembic migrations (`upgrade() takes 0 positional
arguments but 1 was given`). This was caused by the `upgrade` and
`downgrade` functions in the initial migration script not accepting
any arguments, while the custom migration runner in `migrations.py`
was passing a context argument.
- Modified `be/alembic/versions/0001_initial_schema.py` to ensure
`upgrade` and `downgrade` functions accept a `context` argument.
2. Redundant execution of migrations. Migrations were being triggered
both by the `entrypoint.sh` script and within the FastAPI application's
startup event in `app/main.py`.
- Commented out the `await run_migrations()` call in `app/main.py`
to ensure migrations are only handled by the `entrypoint.sh` script.
These changes should ensure that database migrations run correctly and only
once when the backend container starts.
- 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.
- 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.
- 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.