Commit Graph
95 Commits
Author SHA1 Message Date
Herculino Trotta 1369c3edbf Merge remote-tracking branch 'origin/main' into feat/bank-sync-2
# Conflicts:
#	app/apps/export_app/views.py
#	app/templates/includes/sidebar.html
2026-11-08 16:17:06 -03:00
Herculino Trotta 76090ceb4a Merge remote-tracking branch 'origin/main' into feat/investments 2026-11-08 15:01:22 -03:00
Herculino Trotta 620e7df015 feat(bank-sync): sync bank transactions from external providers
Provider registry modeled after automatic exchange rates: each provider
declares its own settings fields, rendered dynamically in the service form.
Lunch Flow is the first provider.

- Map provider accounts to WYGIWYH accounts with a start date and an
  optional currency filter
- Hourly task syncs due services; manual sync from the list
- Deduplicates through Transaction.internal_id, optionally matching
  transactions already entered by hand
- Per account errors and provider reported connection problems

Refs #498
2026-11-08 12:39:16 -03:00
Asish Kumar 6cf8cbf786 fix(import): stop hardcoding the Docker image's paths
Import uploads were always written to /usr/src/app/temp, presets were
read from /usr/src/app/import_presets and the caches lived in /var/tmp,
so WYGIWYH only worked from the Docker image's layout. Running it as a
systemd service with a strict sandbox, or on an immutable distro like
NixOS, needs these folders to follow the app or be configurable.

- Presets are read from IMPORT_PRESETS_ROOT, the import_presets folder
  next to the app.
- Uploads wait in IMPORT_TEMP_ROOT, the temp folder next to the app by
  default, and movable with the IMPORT_TEMP_ROOT env var. The web views,
  the API and the import service all use it.
- The file-based caches live under CACHE_ROOT, /var/tmp by default, and
  movable with the CACHE_ROOT env var.

In the Docker image the app sits in /usr/src/app, so every default
resolves to the same folder as before.

The import service checked that a file was inside the temp folder with a
plain string prefix, which also accepted sibling folders such as
/usr/src/app/temp-other. It now compares paths.

CI no longer needs to create /usr/src/app before running the tests.

Fixes #472
2026-11-07 14:56:55 +05:30
Herculino Trotta 359e5880cc feat(investments): add investment tracker
Investments are accounts flagged as investments; performance is derived from their transactions. Linked transfers are contributions and withdrawals (average cost, realized gains), unlinked transactions are gains or losses, and income comes from the accounts' income entities.

- Unit-priced (exchange currency) or value-tracked accounts
- Money-weighted return (XIRR), annualized after a year
- Totals converted along each currency's exchange chain, with currency effect
- Investments list and detail pages; buy/sell/income use the transfer and transaction forms
- GET /api/accounts/<id>/performance/
2026-11-05 11:07:32 -03:00
Herculino Trotta b10897e64b fix(updates): keep update banner across page loads and restarts
The update check shared the file-based default cache with cachalot, whose culling randomly deleted the key as pages loaded. Store only the latest release in a dedicated cache, compare it to APP_VERSION at render time, and drop the startup delete. Hide the banner when CHECK_FOR_UPDATES is off or APP_VERSION isn't a valid version.
2026-11-02 17:24:28 -03:00
Herculino Trotta 5b98779070 test(auth): add positive controls for local login and tighten basic auth check
- Add flag-off login page and admin password tests so the refusal tests can't pass for unrelated reasons
- Expect exactly 401 from refused basic auth
- Gate OIDC_DISABLE_LOCAL_LOGIN on an explicit OIDC_CONFIGURED flag
- Realign the README OIDC table, use "email" consistently, and warn about lockout with OIDC_ALLOW_SIGNUP=false
2026-11-02 16:41:52 -03:00
fariskazmi 161fc19721 feat(auth): add OIDC_DISABLE_LOCAL_LOGIN to turn off password logins
When the flag is on and an OIDC provider is configured, every e-mail and
password check is refused: the login page, the admin and the API's basic
auth. OIDC logins, API tokens, OAuth apps and permission checks keep working.
The login page hides the password form.
2026-11-02 09:08:30 -06:00
Herculino Trotta 59de9f2443 feat(auth): configure OIDC email trust
Allow verified-only linking with OIDC_TRUST_EMAIL=false while retaining case-insensitive matching. Keep unconditional trust enabled by default for compatibility with #518; that mode retains the documented takeover risk.
2026-10-10 17:01:52 -03:00
Herculino Trotta d0e9c05283 feat: disable oauth and token creation while on demo mode 2026-06-27 18:02:03 -03:00
4273c541c5 Add API tokens and OAuth2 client support for external integrations
- Personal API tokens (model, user-settings UI, admin, management command,
  DRF auth class) for non-interactive API access from automations like n8n.
  Raw token shown once; only a SHA-256 hash is stored; last_used_at writes
  are throttled.
- OAuth2 authorization server via django-oauth-toolkit with authorization
  server metadata and optional, off-by-default Dynamic Client Registration
  (RFC 7591), so remote OAuth/MCP clients can authenticate and self-register.
- Tests for token auth, DCR gating and the management commands, plus
  .env.example and README documentation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 19:15:31 +04:00
Herculino Trotta 6a19381672 feat(transactions): add attachments 2026-06-06 04:33:06 -03:00
Herculino Trotta 86cf625158 Merge pull request #518 from eitchtee/dev
feat(auth): trust OIDC connections and automatically connect them with local accounts
2026-02-15 14:43:33 -03:00
Herculino Trotta ea097ab6f0 feat(auth): trust OIDC connections and connect them with local accounts 2026-02-15 14:41:45 -03:00
Herculino Trotta c11f525373 Merge pull request #515 from eitchtee/dev
add allauth logging and fix allauth not sending https redirect_uri
2026-02-11 21:43:12 -03:00
Herculino Trotta ea5d86dbf8 fix: allauth not sending https redirect_uri 2026-02-11 21:42:00 -03:00
Herculino Trotta a1d3539e3c feat: add allauth logging 2026-02-11 21:41:17 -03:00
icovada a122733a47 Enable filtering and sorting on all API views 2026-01-11 12:19:30 +01:00
Herculino Trotta ab4075c500 fix: missing list close 2026-01-10 17:44:57 -03:00
Herculino Trotta 96318f003d Merge branch 'main' into rest_filtering 2026-01-10 17:43:45 -03:00
icovada 2588404876 Merge branch 'main' into pagination_simplification 2026-01-10 18:16:34 +01:00
icovada c015b78cd6 Apply CustomNumberPagination to all API views 2026-01-10 17:14:53 +00:00
icovada 7687ff81c3 Enable filtering and sorting on all API views 2026-01-08 22:51:49 +01:00
icovada b0815e00c7 Add token authentication to the API 2026-01-02 13:56:15 +01:00
Herculino Trotta 0545fb7651 fix: try to fix stale database connections (again) 2025-12-19 21:59:55 -03:00
Herculino Trotta 01ea0de4b3 fix: decouple DEBUG env variable from vite dev server 2025-12-06 17:32:34 -03:00
Herculino Trotta 92f7bcfd9e fix: try to fix "the connection is closed" db errors 2025-12-06 16:46:33 -03:00
Herculino Trotta eb4723e890 feat: cleanup vite configs 2025-11-23 20:15:06 -03:00
Herculino Trotta 89b2d0118d feat: another batch of fixes 2025-11-02 03:03:22 -03:00
Herculino Trotta a63367a772 feat: first batch of work 2025-11-01 03:15:44 -03:00
Herculino Trotta e600d87968 feat: automated replacement 2025-10-28 14:13:30 -03:00
Herculino Trotta abf3a148cc feat(sidebar): add button to keep it open 2025-08-22 17:15:32 -03:00
Herculino Trotta a544dc4943 feat(tasks:check_for_updates): add env variable to disable checking 2025-08-06 16:58:58 -03:00
Herculino Trotta 76822224a0 feat: check and notify users of new versions
checks are done against github's API with one request every 12 hours
2025-07-27 01:28:27 -03:00
Herculino Trotta 4291a5b97d feat: allow only social auth with django-allauth 2025-06-16 22:20:10 -03:00
Herculino Trotta c8d316857f feat: changes 2025-06-16 21:33:59 -03:00
google-labs-jules[bot] 5d5d172b3b feat: Initial OIDC integration with django-allauth
I've added django-allauth and configured it for OIDC authentication.
This included changes to settings, URLs, and login templates to support OIDC.
I verified that the User model and UserSettings creation are compatible.
I also added documentation for OIDC environment variables to README.md.
2025-05-31 02:31:01 +00:00
Herculino Trotta 3463c7c62c locale: add all supported languages by django as an available option 2025-04-13 00:58:57 -03:00
Herculino Trotta f74946cba7 fix(app): rename DEMO_MODE variable to DEMO for simplicity 2025-03-31 02:45:09 -03:00
Herculino Trotta 26b218ae51 feat(app): disable API when demo mode is enabled 2025-03-31 02:28:48 -03:00
Herculino Trotta 47d34f3c27 feat(app): add a demo mode 2025-03-31 02:14:00 -03:00
Herculino Trotta 45d939237d locale(de): enable Deutsch 2025-02-24 16:33:14 -03:00
Herculino Trotta 3080df9b66 feat: export (WIP) 2025-02-18 19:55:12 -03:00
Herculino Trotta 02376ad02b feat(insights): sankey diagram (WIP) 2025-02-15 00:48:59 -03:00
Herculino Trotta 94e2bdf93d fix(dev): django-browser-reload not working 2025-02-08 16:00:45 -03:00
Herculino Trotta 86112931d9 fix(logging): procrastinate job logs not showing up 2025-02-08 04:18:33 -03:00
Herculino Trotta 852ffd5634 feat: cleanup and format logs 2025-02-07 11:31:14 -03:00
Herculino Trotta 62bfaaa62a feat: add TZ env var 2025-02-07 11:29:28 -03:00
Herculino Trotta 85794f5c01 feat: expose current version 2025-01-31 11:15:15 -03:00
Herculino Trotta 19a65ac45f feat: reduce db queries when saving order on session 2025-01-29 00:12:47 -03:00