[Feature] Implement vCard-compatible contact model, import, and export #4

Closed
opened 2026-07-13 00:53:46 +02:00 by zemion · 2 comments
Owner

Goal

Use vCard as the reference model before adding sync.

Scope

  • vCard-compatible DTOs
  • normalized query fields plus preserved original imported representation
  • .vcf import into a selected address book
  • address-book/contact export as vCard
  • validation for common vCard fields
  • round-trip tests for names, emails, phones, postal addresses, organization fields, notes, categories, and URLs

Acceptance Criteria

  • Common vCard files import and export without losing core fields.
  • Normalized search fields are populated during import.
  • Invalid entries produce actionable validation messages.

See govoplan-addresses/docs/ADDRESS_MODULE_ARCHITECTURE.md and govoplan-addresses/docs/IMPLEMENTATION_PLAN.md.

## Goal Use vCard as the reference model before adding sync. ## Scope - vCard-compatible DTOs - normalized query fields plus preserved original imported representation - `.vcf` import into a selected address book - address-book/contact export as vCard - validation for common vCard fields - round-trip tests for names, emails, phones, postal addresses, organization fields, notes, categories, and URLs ## Acceptance Criteria - Common vCard files import and export without losing core fields. - Normalized search fields are populated during import. - Invalid entries produce actionable validation messages. See `govoplan-addresses/docs/ADDRESS_MODULE_ARCHITECTURE.md` and `govoplan-addresses/docs/IMPLEMENTATION_PLAN.md`.
Author
Owner

Codex State: progress

Summary

  • Implemented the first vCard foundation: common-field parser/serializer, import into selected address books, address-book/contact export, and raw imported vCard provenance.
  • Added restore API/UI for soft-deleted address books and contacts from the Milestone 1 follow-up.
  • Updated the address book WebUI with show archived, restore, import vCard, export book vCard, and export contact vCard controls.

Changed Files

  • src/govoplan_addresses/backend/vcard.py
  • src/govoplan_addresses/backend/service.py
  • src/govoplan_addresses/backend/router.py
  • src/govoplan_addresses/backend/schemas.py
  • webui/src/api/addresses.ts
  • webui/src/features/addressbook/AddressBookPage.tsx
  • tests/test_addresses_service.py
  • docs/IMPLEMENTATION_PLAN.md

Verification

  • PYTHONPATH=/mnt/DATA/git/govoplan-core/src:/mnt/DATA/git/govoplan-addresses/src /mnt/DATA/git/govoplan/.venv/bin/python -m unittest discover -s tests
  • cd /mnt/DATA/git/govoplan-core/webui && /home/zemion/.nvm/versions/node/v22.22.3/bin/npm run build

Next / Blocked

  • Still open in #4: connector-grade validation messages, richer multi-value contact editing, and first-class original-payload/revision handling for future CardDAV conflicts.

Suggested status label: status/in-progress

## Codex State: progress ### Summary - Implemented the first vCard foundation: common-field parser/serializer, import into selected address books, address-book/contact export, and raw imported vCard provenance. - Added restore API/UI for soft-deleted address books and contacts from the Milestone 1 follow-up. - Updated the address book WebUI with show archived, restore, import vCard, export book vCard, and export contact vCard controls. ### Changed Files - `src/govoplan_addresses/backend/vcard.py` - `src/govoplan_addresses/backend/service.py` - `src/govoplan_addresses/backend/router.py` - `src/govoplan_addresses/backend/schemas.py` - `webui/src/api/addresses.ts` - `webui/src/features/addressbook/AddressBookPage.tsx` - `tests/test_addresses_service.py` - `docs/IMPLEMENTATION_PLAN.md` ### Verification - `PYTHONPATH=/mnt/DATA/git/govoplan-core/src:/mnt/DATA/git/govoplan-addresses/src /mnt/DATA/git/govoplan/.venv/bin/python -m unittest discover -s tests` - `cd /mnt/DATA/git/govoplan-core/webui && /home/zemion/.nvm/versions/node/v22.22.3/bin/npm run build` ### Next / Blocked - Still open in #4: connector-grade validation messages, richer multi-value contact editing, and first-class original-payload/revision handling for future CardDAV conflicts. Suggested status label: `status/in-progress`
Author
Owner

Codex State: done

Summary

  • Completed vCard foundation: import/export, partial import diagnostics, source payload/revision fields, and multi-value contact editing.

Changed Files

  • src/govoplan_addresses/backend/vcard.py
  • src/govoplan_addresses/backend/service.py
  • src/govoplan_addresses/backend/db/models.py
  • src/govoplan_addresses/backend/migrations/versions/c9d0e1f2a4b_v019_addresses_source_payload.py
  • webui/src/features/addressbook/AddressBookPage.tsx
  • docs/IMPLEMENTATION_PLAN.md

Verification

  • PYTHONPATH=/mnt/DATA/git/govoplan-core/src:/mnt/DATA/git/govoplan-addresses/src /mnt/DATA/git/govoplan/.venv/bin/python -m unittest discover -s tests
  • cd /mnt/DATA/git/govoplan-core/webui && /home/zemion/.nvm/versions/node/v22.22.3/bin/npm run build
## Codex State: done ### Summary - Completed vCard foundation: import/export, partial import diagnostics, source payload/revision fields, and multi-value contact editing. ### Changed Files - `src/govoplan_addresses/backend/vcard.py` - `src/govoplan_addresses/backend/service.py` - `src/govoplan_addresses/backend/db/models.py` - `src/govoplan_addresses/backend/migrations/versions/c9d0e1f2a4b_v019_addresses_source_payload.py` - `webui/src/features/addressbook/AddressBookPage.tsx` - `docs/IMPLEMENTATION_PLAN.md` ### Verification - `PYTHONPATH=/mnt/DATA/git/govoplan-core/src:/mnt/DATA/git/govoplan-addresses/src /mnt/DATA/git/govoplan/.venv/bin/python -m unittest discover -s tests` - `cd /mnt/DATA/git/govoplan-core/webui && /home/zemion/.nvm/versions/node/v22.22.3/bin/npm run build`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: add-ideas/govoplan-addresses#4
No description provided.