Skip to content

Milestone 1: Tenant System + Shared Contacts + Tags + Activities

Status:Completed Datum: 2026-03-05 Revision: 015_tenant_contacts

Summary

Foundation for the modular product system (xynap.cloud). Multi-tenant architecture with shared components: contact management, tags and activity timeline.

What was built

Backend (FastAPI)

6 new database tables (Alembic Migration015_tenant_contacts):

Table Purpose
tenants Clients with Slug, Plan, Quota, Trial
tenant_modules Activated modules per tenant (crm, cms, mail...)
contacts Contacts/Companies with Emails, Telephone, Tags, Custom Fields
contact_relations Relationships between contacts (employees, partners...)
tags Tenant-specific tags with color
activities Chronological Activity Timeline (email, call, note...)

4 SQLAlchemy Models:Tenant,TenantModule,Contact,ContactRelation,Tag,Activity

2 API Router under/api/v1/:

Endpoint Method Description
/tenants GET All Tenants list
/tenants POST Create new tenant (with modules)
/tenants/{id} GET Tenant details
/tenants/{id} PUT Update Tenant
/tenants/{id}/modules GET Modules of Tenants
/tenants/{id}/modules POST Enable module
/tenants/{id}/modules/{slug} DELETE Disable module
/contacts GET List contacts (Search, Filter, Pagination)
/contacts POST Create contact (+ car activity)
/contacts/{id} GET Contact details
/contacts/{id} PUT Update contact (+ Change Activity)
/contacts/{id} DELETE Contact
/contacts/{id}/activities GET Activities of a contact
/contacts/activities POST Create an activity manually
/contacts/tags GET List tags
/contacts/tags POST Create a tag
/contacts/tags/{id} DELETE Loose day

Frontend (Vue 3)

*3 new views: *

  • ContactsView— Contact list with real-time search, type filter, Pagination, Create/Edit Modal
  • ContactDetailView— Contact details with contact data, tags, notes, activity timeline, activity creation
  • TenantsView— Tenant cards with module tags, Create-Modal with module selection, detail-Modal with module management

Navigation:New sidebar section "Products" with tenants, contacts, XyNaP.cms, XyNaP.crm

Files

New files

File Type
backend/app/core_models/tenant.py Model
backend/app/core_models/contact.py Model
backend/app/core_models/tag.py Model
backend/app/core_models/activity.py Model
backend/app/core/tenants/router.py API Router
backend/app/core/contacts/router.py API Router
backend/alembic/versions/015_tenant_contacts_tags.py Migration
frontend/src/shell/contacts/ContactsView.vue View
frontend/src/shell/contacts/ContactDetailView.vue View
frontend/src/shell/tenants/TenantsView.vue View

Modified files

File Change
backend/app/core_models/__init__.py New Model Imports
backend/app/main.py Router registration (tenants, contacts)
frontend/src/shell/router.ts New routes
frontend/src/shell/layout/SidebarNav.vue Navigation
frontend/src/main.ts i18n labels

Next steps (MS-2)

  • CRM Pipeline + Deals
  • Deal-Stages (Canban-Board)
  • Lead scoring
  • Dashboard with sales widgets