How nextcloud/contacts works
Nextcloud Contacts is a vCard 3.0/4.0 contacts app for editing and syncing contacts, address books, and related collaboration features. Users enter through the routed Vue app, browse or edit contacts, and manage address books or imports; optional branches cover team views, social-profile enrichment, and federated OCM invitations. The frontend uses Vuex stores and contact models, while PHP controllers and services implement server-side features. The README identifies CardDAV as a backend responsibility outside this repository; some capability links below are documented rather than verified in sampled implementation.
Main entry points: Contacts.vue Contacts view · main.js Vue app · addressbooks.js Address books · index.js Vuex store
Components 21
Contacts interface
- Vue app
src/main.js - App routes
src/router/index.js - Contacts view
src/views/Contacts.vue - Root navigation
src/components/AppNavigation/RootNavigation.vue - Contact details
src/components/ContactDetails.vue - Contact import
src/views/Processing/ImportView.vue
Contact data
- Vuex store
src/store/index.js - Address books
src/store/addressbooks.js - vCard contact model
src/models/contact.js
Collaboration
- Team circles
src/components/AppContent/CircleContent.vue - Contact charts
src/components/AppContent/ChartContent.vue - Federated invites
src/components/AppContent/OcmInvitesContent.vue
Server features
- Invite endpoints
lib/Controller/FederatedInvitesController.php - Invite service
lib/Service/FederatedInvitesService.php - Invite persistence
lib/Db/FederatedInviteMapper.php - Invite record
lib/Db/FederatedInvite.php - Social API
lib/Controller/SocialApiController.php - Social profiles
lib/Service/SocialApiService.php
Other components
- Contacts user
- CardDAV backend
- Nextcloud platform
Connections 22
- Contacts user → Vue app: opens
- Vue app → App routes: registers
src/main.js - Vue app → Vuex store: registers
src/main.js - App routes → Contacts view: routes to
src/router/index.js - Contacts view → Root navigation: renders
src/views/Contacts.vue - Contacts view → Vuex store: dispatches
src/views/Contacts.vue - Contacts view → Contact details: renders
src/components/ContactDetails.vue - Vuex store → Address books: registers
src/store/index.js - Address books → vCard contact model: uses
src/store/addressbooks.js - Contact details → vCard contact model: uses
src/components/ContactDetails.vue - Address books → CardDAV backend: syncs with
- Contacts view → Contact import: opens
src/views/Contacts.vue - Contacts view → Team circles: renders
src/views/Contacts.vue - Contacts view → Contact charts: renders
src/views/Contacts.vue - Contacts view → Federated invites: renders
src/views/Contacts.vue - Contacts view → Invite endpoints: accepts invite
src/views/Contacts.vue - Invite endpoints → Invite service: delegates to
lib/Controller/FederatedInvitesController.php - Invite service → Invite persistence: reads and writes
lib/Service/FederatedInvitesService.php - Invite persistence → Invite record: maps
lib/Db/FederatedInviteMapper.php - Social API → Social profiles: delegates to
lib/Controller/SocialApiController.php - Nextcloud platform → Vue app: hosts
- Nextcloud platform → CardDAV backend: provides