Remove Google Sheets mirror entirely (cut Google dependency) #13

Closed
opened 2026-07-23 11:34:13 +02:00 by mivanchenko · 1 comment
Owner

This was generated by AI during triage.

Decision: remove the Google Sheets mirror entirely — Postgres is the sole source of truth; being independent of Google infra is preferred and the second data path adds no value.

Scope

  • Delete backoffice/app/sheets.py and backoffice/app/import_from_sheets.py.
  • Strip mirror calls from backoffice/app/app.py (mirror_entity, mirror_async, _mirror_worker, the /api/sync route, and mirror_async(...) calls in add/edit/delete).
  • Remove the Sheets read/coupling from n8n/renewal-reminder.json (read renewals from the DB API instead).
  • Remove Google Sheets creds/config from deploy env + the local vault; drop any gspread/google-api deps from requirements.txt.
  • Update sheets/SCHEMA.md / README references.

Acceptance

  • App builds and runs with no Google/Sheets imports; CRUD + renewal reminder work end-to-end against Postgres only.
  • grep -ri sheet backoffice/ n8n/ returns nothing load-bearing.

Closes the old #5 (atomic mirror) as moot.

> *This was generated by AI during triage.* **Decision:** remove the Google Sheets mirror entirely — Postgres is the sole source of truth; being independent of Google infra is preferred and the second data path adds no value. ## Scope - Delete `backoffice/app/sheets.py` and `backoffice/app/import_from_sheets.py`. - Strip mirror calls from `backoffice/app/app.py` (`mirror_entity`, `mirror_async`, `_mirror_worker`, the `/api/sync` route, and `mirror_async(...)` calls in add/edit/delete). - Remove the Sheets read/coupling from `n8n/renewal-reminder.json` (read renewals from the DB API instead). - Remove Google Sheets creds/config from deploy env + the local vault; drop any `gspread`/google-api deps from `requirements.txt`. - Update `sheets/SCHEMA.md` / `README` references. ## Acceptance - App builds and runs with no Google/Sheets imports; CRUD + renewal reminder work end-to-end against Postgres only. - `grep -ri sheet backoffice/ n8n/` returns nothing load-bearing. Closes the old #5 (atomic mirror) as moot.
mivanchenko added the ready-for-agentcrmenhancement labels 2026-07-23 11:34:13 +02:00
Author
Owner

Implemented (commit 319218c on main):

  • Deleted backoffice/app/sheets.py and backoffice/app/import_from_sheets.py.
  • Stripped mirror_entity/mirror_async/_mirror_worker, the /api/sync route, and all mirror_async(...) calls from backoffice/app/app.py; dropped the tab/mirror keys from db.py's TABLES.
  • Re-pointed n8n/renewal-reminder.json at the CRM's own API (GET /api/clients, POST /api/activity_log) instead of the Google Sheets nodes.
  • Removed SHEET_ID/GOOGLE_SA_JSON from backoffice/.env.example and backoffice/docker-compose.yml; dropped the now-unused requests dep from requirements.txt (PyJWT[crypto] kept — still used by booking_api.py for booking tokens). Retired the local service-account key in .secrets/ (renamed, pending manual rotation/revocation in the Google Cloud console).
  • Updated README.md, Documentation.md, TODO.md, playbooks/tier-a-google.md, playbooks/tier-b-selfhosted.md; deleted sheets/SCHEMA.md.

Acceptance checks: full backoffice test suite passes (123 passed), app compiles clean, and grep -ri sheet backoffice/ n8n/ returns nothing load-bearing (fixed two stray references in backoffice/db/init.sql and the dashboard footer along the way).

Closes the old #5 (atomic mirror) as moot, per this issue's own note.

Implemented (commit 319218c on main): - Deleted `backoffice/app/sheets.py` and `backoffice/app/import_from_sheets.py`. - Stripped `mirror_entity`/`mirror_async`/`_mirror_worker`, the `/api/sync` route, and all `mirror_async(...)` calls from `backoffice/app/app.py`; dropped the `tab`/`mirror` keys from `db.py`'s `TABLES`. - Re-pointed `n8n/renewal-reminder.json` at the CRM's own API (`GET /api/clients`, `POST /api/activity_log`) instead of the Google Sheets nodes. - Removed `SHEET_ID`/`GOOGLE_SA_JSON` from `backoffice/.env.example` and `backoffice/docker-compose.yml`; dropped the now-unused `requests` dep from `requirements.txt` (`PyJWT[crypto]` kept — still used by `booking_api.py` for booking tokens). Retired the local service-account key in `.secrets/` (renamed, pending manual rotation/revocation in the Google Cloud console). - Updated `README.md`, `Documentation.md`, `TODO.md`, `playbooks/tier-a-google.md`, `playbooks/tier-b-selfhosted.md`; deleted `sheets/SCHEMA.md`. Acceptance checks: full backoffice test suite passes (123 passed), app compiles clean, and `grep -ri sheet backoffice/ n8n/` returns nothing load-bearing (fixed two stray references in `backoffice/db/init.sql` and the dashboard footer along the way). Closes the old #5 (atomic mirror) as moot, per this issue's own note.
Sign in to join this conversation.