XyNaP Modular product system — overall concept¶
Status:Conception (v1.0, 2026-03-05) Ziel:Full-integrated modular SaaS platform under
*.xynap.cloud
1. Vision¶
XyNaP is a modular business platform. Customers book individualModule(components) and combine them freely. All modules share ** common components** (contacts, calendars, files, users) and run under a uniform surface with a login.
┌─────────────────────────────────────────────────────────────────┐
│ <firma>.xynap.cloud │
│ Ein Login. Ein UI. │
├─────────┬─────────┬─────────┬─────────┬─────────┬─────────────┤
│ XyNaP. │ XyNaP. │ XyNaP. │ XyNaP. │ XyNaP. │ XyNaP. │
│ crm │ cms │ mail │ cloud │ host │ voice │
│ │ │ │ │ │ │
│ Deals │ Seiten │ Webmail │ Dateien │ Websites│ Telefonie │
│ Leads │ Editor │ IMAP │ WebDAV │ PHP/DB │ SIP/VoIP │
│ Pipeline│ Themes │ Kalend. │ CalDAV │ FTP │ IVR │
│ Tickets │ Import │ Filter │ CardDAV │ SSL │ Voicemail │
├─────────┴─────────┴─────────┴─────────┴─────────┴─────────────┤
│ Shared Components (Kern) │
│ │
│ Kontakte │ Kalender │ Dateien │ Benutzer │ Domains │
│ Aufgaben │ Notizen │ Tags │ Teams │ Billing │
│ Workflows │ Suche │ Audit │ API │ Webhooks │
├─────────────────────────────────────────────────────────────────┤
│ Infrastruktur │
│ Multi-Tenant │ RBAC │ API Gateway │ Event-Bus │ Storage │
└─────────────────────────────────────────────────────────────────┘
Two. Modules in detail¶
2.1 XyNaP.crm — Customer Relationship Management¶
Kernfunktionen:
2.1.1 Contact Management (used Shared Componentcontacts)¶
- Persons & organizations with any Custom Fields
- Beziehungen:Person sorption Organisation (Rolle, Department, Position)
- Aktivitaetshistorie:All interactions (emails, calls, meetings, notes) chronological
- Tags & Segments: Dynamic lists based on filters
- Duplikat-Erkennung:Fuzzy match on name, email, phone → Merge Wizard
- Import/Export:vCard, CSV, LDAP-Sync
2.1.2 Sales pipeline¶
- Deals:Kanban board with drag & drop between phases
- Phasen:Freely configurable per pipeline (e.g. Lead → Qualified → Offer → Negotiation → Weights/Lowers)
- Mehrere Pipelines:e.g. new customer pipeline, upsell pipeline, partner pipeline
- Deal-Felder:Value, Waehrung, expected closing date, probability
- Gewichteter Forecast:sum(value × probability) per phase/month/quarter
- Rotting-Deals:Automatic Warning When Deal X Days stagnated in one phase
- Produkte/Positionen:quotes with quantity, single price, discount
2.1.3 Lead Management¶
- Lead-Erfassung:Web Forms (CMS Integration), E-Mail-Parser, API
- Lead-Scoring:Rule-based (sector +10, website visit +5 e-mail geoeffnet +3)
- Lead-Routing:Automatic assignment to sales staff (Round-Robin, Region, Skill)
- Lead-Nurturing:Automatic e-mail sequences based on score/behavior
- Conversion:Lead → Contact + Deal (with one click)
2.1.4 Offers & invoices¶
- Angebots-Generator:From Deal Positions, Own Templates (PDF)
- Angebots-Tracking:When geoeffnet, as often viewed
- Offer → Invoice: One-click conversion
- Rechnungs-Workflow:Design → Sended → Paid → Overbow → Gemahnt
- Zahlungseingaenge:Manual or via payment gateway (Stripe, PayPal)
- Mahnwesen:Automatic reminders (1st memory → 2nd reminder → 3rd last reminder)
- DATEV-Export:Accounting Service
- ZUGFeRD/XRechnung:E calculation standard (PDF/A-3 + XML)
2.1.5 Support & Tickets (extended tickets)¶
- Ticket-Kanaele:e-mail, web form, phone (→ voice module), chat
- SLA-Management:Reaction time, Loesation time per Priority/customer
- Eskalation:Automatically with SLA violation (Notification → Reassignment → Manager)
- Knowledge Base:Articles with categories, Full text search, Customer visibility
- Kundenzufriedenheit:CSAT query for ticket closing
- Canned Responses:Prefabricated answers with placeholders
2.1.6 Reporting & Dashboards¶
- Sales-Dashboard:Pipeline Value, Conversion Rate, Average Deal Duration, Win/Loss Rate
- Team-Performance:Assets per employee, Deals won, Turnover
- Forecast:Weighted Forecast per Month/Quartal with Trend
- Funnel-Analyse:Drop-off per phase, bottleneck detection
- Custom Reports:Drag & Drop Report Builder with Filters, Groupings, Charts
- Scheduled Reports:Automatic mail by e-mail (available/weekly/monthly)
- Export:PDF, CSV, Excel
2.1.7 CRM workflows (used Shared Componentworkflows)¶
Trigger:
| Trigger | Example |
|---|---|
contact.created |
New contact |
contact.updated |
Field changed (e.g. status) |
contact.tag_added |
Day "VIP" added |
deal.created |
New deal created |
deal.stage_changed |
Deal moved to new phase |
deal.won / deal.lost |
Deal won/lost |
deal.rotting |
Deal stagnated X days |
lead.score_threshold |
Lead score exceeds threshold |
ticket.created |
New ticket |
ticket.sla_warning |
SLA-Deadline approaches |
invoice.overdue |
Account available |
email.received |
Receive email from contact |
call.completed |
Telephone stop (voice module) |
form.submitted |
Web form sent (CMS) |
schedule.cron |
Time-controlled (daily/weekly) |
Aktionen:
| Action | Description |
|---|---|
send_email |
Send e-mail (Template + Spacer) |
send_sms |
Send SMS |
create_task |
Create and assign task |
create_deal |
Create a deal from Lead |
update_field |
Field to contact/deal change |
add_tag |
Add a tag |
assign_owner |
Changing the user |
move_stage |
Move Deal in Phase |
create_ticket |
Create support ticket |
webhook |
External HTTP call |
wait |
X minutes/hours/days waiting |
condition |
If/Else branching |
notify |
Internal notification (Push, E-Mail, Telegram) |
score_lead |
Customize lead score |
start_sequence |
Start email sequence |
call_contact |
Initate call (voice module) |
generate_invoice |
Accounting |
Beispiel-Workflows:
-
Lead-Nurturing Sequence:
Trigger: lead.created (Score < 50) → wait(1 day) → send_email("Willkommen bei XyNaP") → wait(3 days) → condition(email.opened?) → YES: score_lead(+10), send_email("Feature-Highlights") → NO: send_email("Haben Sie Fragen?") → wait(7 days) → condition(score > 40?) → YES: assign_owner(sales-team), create_task("Lead kontaktieren") → NO: add_tag("cold-lead") -
Deal-Rotation-Warnung:
-
After-Sales:
2.2 XyNaP.cms — Content Management System¶
Kernfunktionen:
2.2.1 Grid layout editor¶
- Block-basiert:Each page consists of blokes in a responsive grid
- Grid-System:CSS Grid with 12 columns, freely configurable (Colspan, Rowspan, Gap)
- Breakpoints:desktop (1200+), tablet (768-1199), mobile (< 768) — adjustable per block
- Live-Preview:WYSIWYG with real-time preview of all breakpoints
- Drag & Drop: Move Bloecke, resize via Handles, Snap-to-Grid
- Undo/Redo:Complete History (Ctrl+Z / Ctrl+Y)
2.2.2 Block Types (component library)¶
| Category | Blowing |
|---|---|
| Text | Heading, paragraph, Rich-Text, Blockquote, Code |
| Media | Image, Video, Gallery, Slider, Icon |
| Layout | Containers, Columns, Spacer, Divider, Accordion, Tabs |
| Navigation | Menu, Breadcrumb, Footer, Sidebar |
| Formulare | Contact form, newsletter, survey (→ CRM Lead-Erfassung) |
| E-Commerce | Product card, Price table, CTA button |
| Social | Social links, Share buttons, Feed-Embed |
| Daten | Table, Timeline, Counter, Statistics |
| Integration | Map (OpenStreetMap), HTML-Embed, iFrame |
| CRM | Contact form→Lead, quote calculator, appointment booking (calender) |
2.2.3 Design system¶
- Globale Styles:Color palette (Primary, Secondary, Accent, Neutral, Danger, Success)
- Typografie:Font-Family, Groessen, line height — globally defined, per block
- Spacing-System:Consistent distance scale (xs, sm, md, lg, xl, 2xl)
- Theme-Variablen:CSS Custom Properties, Dark / Light Mode
- Preset-Themes:10+ Prefabricated Themes (Business, Creative, Minimal, Bold, etc.)
2.2.4 Template engine¶
- Seitentypen:Home page, blog post, landing page, 404
- Master-Layouts:Header + Footer + Content Area, together for all pages
- Share and import your own templates
- Globale Bloecke:Header, Footer, CTA Banner — once defined, used everywhere
2.2.5 Website import¶
- HTML/CSS Import:Existing website crawling, detect structure, convert to blotches
- WordPress Import:WP Export XML → Pages, Posts, Media, Menues
- EnterSitemap-Crawler:URL → capture all pages → selectively import
- Asset-Migration:images, fonts, CSS automatically record in cloud storage
2.2.6 SEO & Performance¶
- SEO-Felder:Title, Description, OG tags, Canonical URL per page
- Sitemap:Automatic XML Sitemap Generating
- robots.txt: Configurable
- Performance:Lazy-Loading, Image Optimization (WebP/AVIF), Critical CSS
- Lighthouse-Score:Integrated check with recommendations
2.2.7 Publishing¶
- Design → Review → Opened: Workflow with release (if team)
- Versionierung:Any change saved, rollback available
- Scheduling:Page to date X
- One-Click Deploy:Directly on xynap hosting (Domain, SSL, DNS automatically)
- Preview-Links:Subscribable links for review before publication
2.3 XyNaP.mail — Integrated Webmailer¶
No roundcube! Own, fully integrated webmailer as part of the platform.
Kernfunktionen:
2.3.1 Mailbox view¶
- 3 columns Layout: Folder | Message list | Preview (configurable)
- Unified Inbox:All accounts in one view (or separated per account)
- Thread-Ansicht:E-mail conversations combined (Gmail style)
- Lazy-Loading:News loaded on-demand (no "load all 5000")
- Echtzeit-Updates:WebSocket-based, new mails appear immediately
- Schnellaktionen:Archiving, Loeschen, Marking, Move by Swipe/Shortcut
2.3.2 Composer¶
- Rich-Text Editor:Formatting, Images, Links, Tables
- Templates:Prefabricated email templates with placeholders (→ CRM Canned Responses)
- Anhang-Upload:Drag & Drop, Cloud Memory Integration (File from XyNaP.cloud)
- Signatur-Manager:Multiple signatures, HTML-capable, per account
- Empfaenger-Vorschlaege:Completion from Contacts (→ Shared Contacts)
- Spaeter senden:Send e-mail time-controlled
- Lesebestaetigungen:Optionally request
2.3.3 Folder & organization¶
- Standard-Ordner:Inbox, Shipped, Disarmament, Trash, Spam, Archive
- Benutzerdefinierte Ordner:Optionally nested, can be sorted by drag & drop
- Labels/Tags:Coloured labels (such as Gmail), several per mail available
- Sieve-Filter:Regulatory Email Sorting (serversite)
- Terms and conditions: sender, Subject, Header, Groesse
- Actions: Move, Label, Redirect, Answer, Loeschen
- Suche:Full text search for subject, content, sender, attachment name
- Advanced Search: Date, Groesse, Hat-Anhang, Unread, Label
2.3.4 Calendar Integration (→ Shared Componentcalendar)¶
- ICS-Einladungen:Automatically recognized, accept/delive
- Meeting-Vorschlaege:Suggest available times from calendar
- Termin per Mail:Create calendar date directly from email
2.3.5 Contact Integration (→ Shared Componentcontacts)¶
- Sender → Contact:Suggest email senders automatically as contact
- Kontakt-Sidebar:For e-mail selection → Contact info, last interactions, deals (CRM)
- Kontaktgruppen:mailing lists from contact segments
2.3.6 Several accounts & identity¶
- Multi-Account:Multiple mailboxes in one interface
- Identitaeten:Pro account multiple sender addresses (+ signature)
- ManageAliase:Directly on the Webmailer
- Weiterleitung:Configurable per account
2.3.7 Security¶
- Spam-Anzeige:Rspamd score visible, whitelist/blacklist
- Verschluesselung:S/MIME and/or PGP (key management in the browser)
- Phishing-Warnung:Remark the links
- 2FA: Login separately secure
2.3.8 Technical architecture¶
Browser ←WebSocket→ Platform-API ←IMAP/SMTP→ Dovecot/Postfix
↓
Redis (Mail-Cache)
↓
Kontakte/Kalender (DB)
2.4 XyNaP.cloud — Files & Groupware¶
Kernfunktionen:
2.4.1 File Manager¶
- Web-Interface:Explorer view with folders, Breadcrumb, Grid/List
- Upload:Drag & Drop, Folder Upload, Progress Display
- Vorschau:Images, PDFs, Office Documents, Videos, Audio inline
- Versionierung:Each file change saved as version, rollback possible
- Papierkorb:30 days storage, manually empty
- Freigabe:Internal (Team) and external links (with password, expiry date, download limit)
- Suche:File name, Type, Groesse, Date, Tags
- Speicherkontingent:Pro Tenant configurable, warning at 80%/90 %
2.4.2 WebDAV server¶
- Standard-konform:WebDAV/CalDAV/CardDAV (RFC 4918, 4791, 6352)
- Client-Sync:macOS Finder, Windows Explorer, Nautilus, Cyberduck
- Mobile:DAVx5 (Android), iOS native
- Desktop-Sync:own Sync client or compatible with standards (stretch goal)
2.4.3 Calendar (CalDAV) — Shared Component¶
- Monats/Wochen/Tagesansicht+ Agenda list
- Mehrere Kalender:Persoenlich, Team, Project — color coded
- Termin-Erstellung:Quick-Add, drag to time slot, form
- Einladungen:Add participants → iCal-Invitation by email (→ XyNaP.mail)
- Verfuegbarkeit:Free/Add for Team Members
- Wiederkehrende Termine:Daily, monthly, yes + exceptions
- Erinnerungen:Push, E-mail, SMS (configurable per appointment)
- Raum-/Ressourcen-Buchung:Meeting rooms, Vehicles, Equipment
- CalDAV-Sync:Outlook, Thunderbird, Google Calendar, Apple Calendar
2.4.4 Contacts (CardDAV) — Shared Component¶
- Kontaktkarten:Name, Company, Email(s), Telephone(s), Address(s), Photo, Notes
- Custom Fields:Any additional fields (text, date, link, selection)
- Gruppen:Contact Groups for distributor lists
- CardDAV-Sync:iOS, Android (DAVx5), Thunderbird, Outlook
- vCard Import/Export: v3.0 and v4.0
2.4.5 Tasks — Shared Component¶
- Aufgabenliste:Staff and Team
- Felder:Title, description, date of appeal, priority, instructed
- Status:Open → Edited → Done
- Verknuepfungen:Task to Contact, Deal, Ticket, Email, File
- Teilaufgaben:Checklists within a task
- CalDAV VTODO:Sync with clients to support tasks
2.5 XyNaP.host — Web hosting¶
Already largely implemented (M1+M2).
- Sites:nginx + PHP-FPM (8.4), vHost per site
- Datenbanken:MariaDB shared hosting, phpMyAdmin per customer
- SFTP/FTP:file access per site
- SSL:Automatically via Let's Encrypt (DNS-01 or HTTP-01)
- Domains:Custom Domains with DNS Management
- Deployment:Git Push-Deploy (Stretch-Goal), File Manager (→ XyNaP.cloud)
- Statistiken:Access Logs, Traffic, Memory Usage
- Backups:Automatic, Self-Service Restore
CMS-Integration: - XyNaP.cms "Publish" deployed directly to XyNaP.host - Static assets from CMS are stored in cloud storage - Domain + SSL automatically provided
2.6 XyNaP.voice — Telephone (available)¶
FreeSwitch + SIP agent, is integrated as module.
- SIP-Trunks:Provider connection (1&1, plusnet, etc.)
- Nebenstellen:Internal extensions
- IVR:Languagemenue Building (→ Workflow Engine)
- Voicemail:Recording → Email (→ XyNaP.mail)
- Call-Logging:Calls in Contact History (→ CRM)
- Click-to-Call:Call directly from CRM/contacts
- WebRTC:Browser telephony via LiveKit
3. Shared Components (core system)¶
These components exist exactly once and are used by all modules.
3.1 Contacts (shared.contacts)¶
┌─────────────────────────────────┐
│ Contact │
├─────────────────────────────────┤
│ id, tenant_id │
│ type: person | organization │
│ display_name │
│ first_name, last_name │
│ company_name (wenn org) │
│ emails[] │
│ phones[] │
│ addresses[] │
│ custom_fields: JSON │
│ tags[] │
│ avatar_url │
│ notes │
│ source: manual|import|web|api │
│ owner_id (User) │
│ created_at, updated_at │
├─────────────────────────────────┤
│ Relationen: │
│ → ContactRelation (n:n) │
│ → Deal (1:n, CRM) │
│ → Ticket (1:n, CRM) │
│ → Activity (1:n) │
│ → MailThread (1:n, Mail) │
│ → CalendarEvent (n:n) │
│ → File (n:n, Cloud) │
│ → Task (1:n) │
└─────────────────────────────────┘
Genutzt von:CRM (Deals, Pipeline), Mail (Sender Recognition, Sidebar), Cloud (Contact Files), Voice (Recognition), CMS (Forms → Contact)
3.2 Calendar (shared.calendar)¶
┌─────────────────────────────────┐
│ CalendarEvent │
├─────────────────────────────────┤
│ id, tenant_id, calendar_id │
│ uid (iCal UID) │
│ summary, description │
│ dtstart, dtend, all_day │
│ rrule (Wiederholung) │
│ location │
│ status: confirmed|tentative| │
│ cancelled │
│ organizer_id, attendees[] │
│ reminders[] │
│ color │
│ linked_contact_id │
│ linked_deal_id │
│ linked_task_id │
└─────────────────────────────────┘
Genutzt von:CRM (Meeting with Lead), Mail (ICS Invitations), Cloud (CalDAV-Sync), Voice (Rueckruf-Termin)
3.3 files (shared.files)¶
┌─────────────────────────────────┐
│ File │
├─────────────────────────────────┤
│ id, tenant_id, parent_folder_id │
│ name, mime_type, size_bytes │
│ storage_path │
│ version (int) │
│ owner_id │
│ shared_with[] (users/links) │
│ tags[] │
│ linked_contact_id │
│ linked_deal_id │
│ linked_ticket_id │
│ checksum_sha256 │
│ is_trashed, trashed_at │
└─────────────────────────────────┘
Genutzt von:CRM (offering PDFs, contracts), mail (concept from cloud), CMS (media library), host (file browser)
3.4 Tasks (shared.tasks)¶
┌─────────────────────────────────┐
│ Task │
├─────────────────────────────────┤
│ id, tenant_id │
│ title, description │
│ status: open|progress|done │
│ priority: low|medium|high|urgent│
│ due_date │
│ assigned_to (User) │
│ created_by (User) │
│ linked_contact_id │
│ linked_deal_id │
│ linked_ticket_id │
│ subtasks[] (Checkliste) │
│ tags[] │
└─────────────────────────────────┘
Genutzt von:CRM (follow-up), Mail ("From email → task"), Cloud (CalDAV VTODO), all modules
3.5 Workflows (shared.workflows)¶
Expands existing workflow engine (M2).
Architektur:
Event-Bus (Redis Streams)
↓
Workflow-Engine
↓
├── Trigger evaluieren
├── Conditions pruefen
├── Actions ausfuehren
└── Logging (Audit)
- Event-Bus:Each module publishes events (
contact.created,mail.received,deal.stage_changed) - Trigger:Workflow listens to events, evaluates conditions
- Actions:Module overlapping (CRM action in mail triggers, etc.)
- Visual Builder:Drag & Drop Flow Editor (available, expand)
- Templates:Prefabricated workflows to import
3.6 Search (shared.search)¶
- Globale Suche:Contacts, Emails, Files, Deals, Tickets, Calendar, Tasks
- Volltextindex:PostgreSQL/ElasticSearch for fast search over all deitaents
- Facetten:Filter by type, module, date, owner
- Keyboard-Shortcut:Cmd+K / Ctrl+K Opens search bar
3.7 users & teams (shared.users)¶
- Tenant-User:employees within a tenant
- Rollen:Admin, Manager, Staff, External (per tenant configurable)
- Teams:Groups of Users (Sales team, support team)
- Berechtigungen:Pro module and per Entitaet (own deals vs. all deals)
4. Multi-tenant architecture¶
4.1 Tenant model¶
┌─────────────────────────────────┐
│ Tenant │
├─────────────────────────────────┤
│ id │
│ slug (subdomain) │
│ name (Firmenname) │
│ domain: <slug>.xynap.cloud │
│ custom_domain (optional) │
│ owner_id (Admin-User) │
│ plan: starter|business|enterprise│
│ modules_enabled: ["crm","mail"] │
│ storage_quota_gb │
│ user_limit │
│ status: trial|active|suspended │
│ trial_ends_at │
│ created_at │
└─────────────────────────────────┘
4.2 Module activation¶
# Tenant hat Module als Array:
tenant.modules_enabled = ["crm", "mail", "cloud"]
# Middleware prueft bei jedem Request:
@require_module("crm")
async def get_deals(tenant: Tenant):
...
# Sidebar zeigt nur aktivierte Module
# Shared Components sind IMMER verfuegbar
4.3 Data insulation¶
- DB-Ebene:Each table has
tenant_id(Foreign Key) - Middleware:Automatic Tenant Filter on All Queries
- Dateisystem:
/var/lib/xynap/tenants/<tenant_id>/files/ - Mail:Virtual domains per tenant (existing mail stack)
- Backups:Pro Tenant exportable (GDPR Art. 20 data portabilitaet)
4.4 Subdomain routing¶
*.xynap.cloud → Traefik
→ Wildcard-SSL (Let's Encrypt DNS-01)
→ Host-Header → Tenant-Slug extrahieren
→ Platform-API: X-Tenant-Slug Header
→ Middleware: Slug → Tenant-ID resolve + Cache (Redis)
4.5 Custom Domains¶
kunde.de → CNAME → firma.xynap.cloud
→ Traefik: On-Demand TLS (Let's Encrypt HTTP-01)
→ custom_domain Lookup → Tenant-ID
Five. Booking model¶
5.1 Modular price structure¶
| Module | Starter | Business | Enterprise |
|---|---|---|---|
| XyNaP.crm | Contacts, pipeline, reports | + Workflows, Scoring, Mahnwesen | + API, Webhooks, Custom Fields |
| XyNaP.cms | 5 pages, templates | + Unlimited, Import, SEO | + Multi-site, Custom Blocks |
| XyNaP.mail | 5 Postfaecher, 5GB | + 25 Postfaecher, 25GB, Filter | + Unlimited, S/MIME |
| XyNaP.cloud | 10GB, WebDAV | + 100GB, versioning | + 1TB, audit log |
| XyNaP.host | 1 Site, 1GB | + 5 Sites, 10GB, Staging | + Unlimited, Git deploy |
| XyNaP.voice | 1 trunk, 3 ext. | + 5 Trunks, IVR | + Unlimited, Call Center |
5.2 Addons (available)¶
| Addon | Unit | Price |
|---|---|---|
| Extra memory | per 10 GB | X EUR/month |
| Extra mail books | per 5 pcs. | X EUR/month |
| Extra user | per user | X EUR/month |
| Custom domain | pro domain | X EUR/month |
| Backup retention | 90/365 days | X EUR/month |
| Priority Support | Flat | X EUR/month |
5.3 Package wounds¶
| Bundle | Modules | Discount |
|---|---|---|
| Office | mail + cloud + calendar + contacts | 20% |
| Sales | crm + mail + voice | 25% |
| Website | cms + host + mail | 20% |
| All-in-One | All modules | 35% |
6. DB-Schema extension¶
6.1 New tables (cores)¶
-- Tenant (ersetzt/erweitert Project)
tenants (
id, slug UNIQUE, name,
owner_id → users,
modules_enabled JSON, -- ["crm","mail","cloud"]
plan VARCHAR, -- starter|business|enterprise
storage_quota_gb INT,
user_limit INT,
status VARCHAR, -- trial|active|suspended|cancelled
trial_ends_at TIMESTAMP,
custom_domain VARCHAR,
settings JSON,
created_at, updated_at
)
-- Modul-Definitionen (Admin)
modules (
id, slug UNIQUE, -- crm, cms, mail, cloud, host, voice
name, description,
icon, color,
is_active BOOL,
dependencies JSON, -- ["contacts","calendar"] (shared components)
sort_order INT
)
-- Modul-Plaene (Preise pro Stufe)
module_plans (
id, module_id → modules,
tier VARCHAR, -- starter|business|enterprise
price_monthly DECIMAL,
price_yearly DECIMAL,
limits JSON, -- {"users": 5, "storage_gb": 10, ...}
features JSON, -- ["workflows","scoring","mahnwesen"]
sort_order INT
)
-- Tenant-Module (gebuchte Module)
tenant_modules (
id, tenant_id → tenants,
module_id → modules,
plan_id → module_plans,
status VARCHAR, -- active|trial|suspended
activated_at TIMESTAMP,
trial_ends_at TIMESTAMP
)
-- Tenant-Addons
tenant_addons (
id, tenant_id → tenants,
addon_type VARCHAR,
quantity INT,
price_monthly DECIMAL,
activated_at TIMESTAMP
)
6.2 Shared Component tables¶
-- Kontakte
contacts (
id, tenant_id, type, display_name,
first_name, last_name, company_name,
emails JSON, phones JSON, addresses JSON,
custom_fields JSON, tags JSON,
avatar_url, notes, source,
owner_id → users,
created_at, updated_at
)
-- Kontakt-Beziehungen
contact_relations (
id, tenant_id,
contact_a_id → contacts,
contact_b_id → contacts,
relation_type VARCHAR, -- employee_of, partner, supplier, ...
role VARCHAR
)
-- Kalender
calendars (
id, tenant_id, owner_id → users,
name, color, is_default BOOL,
caldav_url VARCHAR
)
-- Kalender-Events
calendar_events (
id, tenant_id, calendar_id → calendars,
uid VARCHAR UNIQUE,
summary, description, location,
dtstart TIMESTAMP, dtend TIMESTAMP, all_day BOOL,
rrule TEXT,
status VARCHAR,
organizer_id → users,
linked_contact_id, linked_deal_id,
reminders JSON,
created_at, updated_at
)
-- Event-Teilnehmer
event_attendees (
id, event_id → calendar_events,
user_id → users (nullable),
email VARCHAR,
status VARCHAR -- accepted|declined|tentative|needs-action
)
-- Dateien
files (
id, tenant_id, parent_id → files (nullable),
is_folder BOOL,
name, mime_type, size_bytes,
storage_path VARCHAR,
version INT DEFAULT 1,
owner_id → users,
checksum_sha256 VARCHAR,
tags JSON,
is_trashed BOOL, trashed_at TIMESTAMP,
linked_contact_id, linked_deal_id,
created_at, updated_at
)
-- Datei-Versionen
file_versions (
id, file_id → files,
version INT,
storage_path VARCHAR,
size_bytes BIGINT,
created_by → users,
created_at
)
-- Datei-Freigaben
file_shares (
id, file_id → files,
share_type VARCHAR, -- user|link
target_user_id → users (nullable),
token VARCHAR UNIQUE (fuer Links),
password_hash VARCHAR,
expires_at TIMESTAMP,
max_downloads INT,
permissions VARCHAR, -- read|write
created_at
)
-- Aufgaben
tasks (
id, tenant_id,
title, description,
status VARCHAR,
priority VARCHAR,
due_date DATE,
assigned_to → users,
created_by → users,
linked_contact_id, linked_deal_id, linked_ticket_id,
subtasks JSON,
tags JSON,
completed_at TIMESTAMP,
created_at, updated_at
)
-- Notizen
notes (
id, tenant_id,
content TEXT,
author_id → users,
linked_contact_id, linked_deal_id, linked_ticket_id,
is_pinned BOOL,
created_at, updated_at
)
-- Aktivitaeten (Timeline)
activities (
id, tenant_id,
type VARCHAR, -- email|call|meeting|note|task|deal_update|...
summary TEXT,
details JSON,
user_id → users,
contact_id → contacts,
deal_id, ticket_id, -- optional Links
occurred_at TIMESTAMP,
created_at
)
-- Tags (global, wiederverwendbar)
tags (
id, tenant_id,
name VARCHAR, color VARCHAR,
UNIQUE(tenant_id, name)
)
6.3 CRM-specific tables¶
-- Pipelines
pipelines (
id, tenant_id,
name, is_default BOOL,
sort_order INT
)
-- Pipeline-Phasen
pipeline_stages (
id, pipeline_id → pipelines,
name, color,
probability INT, -- 0-100%
rotting_days INT, -- Warnung nach X Tagen
sort_order INT
)
-- Deals
deals (
id, tenant_id,
title,
pipeline_id → pipelines,
stage_id → pipeline_stages,
contact_id → contacts,
organization_id → contacts,
owner_id → users,
value DECIMAL, currency VARCHAR,
expected_close_date DATE,
probability INT,
status VARCHAR, -- open|won|lost
lost_reason TEXT,
won_at TIMESTAMP, lost_at TIMESTAMP,
source VARCHAR,
tags JSON,
custom_fields JSON,
created_at, updated_at
)
-- Deal-Positionen
deal_items (
id, deal_id → deals,
product_name VARCHAR,
description TEXT,
quantity DECIMAL,
unit_price DECIMAL,
discount_percent DECIMAL,
total DECIMAL
)
-- Lead-Scores
lead_scores (
id, contact_id → contacts,
tenant_id,
score INT DEFAULT 0,
score_history JSON, -- [{date, delta, reason}]
updated_at
)
-- Lead-Score Regeln
lead_score_rules (
id, tenant_id,
name, condition JSON,
score_delta INT,
is_active BOOL
)
-- E-Mail Sequences
email_sequences (
id, tenant_id,
name, description,
is_active BOOL,
created_by → users
)
-- Sequence Steps
sequence_steps (
id, sequence_id → email_sequences,
step_order INT,
delay_hours INT,
action VARCHAR, -- send_email|wait|condition
template_id, config JSON
)
-- Sequence Enrollments
sequence_enrollments (
id, sequence_id → email_sequences,
contact_id → contacts,
current_step INT,
status VARCHAR, -- active|completed|paused|bounced
enrolled_at, completed_at
)
-- Angebote
quotes (
id, tenant_id, deal_id → deals,
contact_id → contacts,
quote_number VARCHAR UNIQUE,
status VARCHAR, -- draft|sent|viewed|accepted|declined|expired
items JSON,
subtotal DECIMAL, tax DECIMAL, total DECIMAL,
valid_until DATE,
sent_at, viewed_at, accepted_at,
pdf_file_id → files,
created_at, updated_at
)
-- Rechnungen
invoices (
id, tenant_id, deal_id, quote_id,
contact_id → contacts,
invoice_number VARCHAR UNIQUE,
status VARCHAR, -- draft|sent|paid|overdue|cancelled
items JSON,
subtotal DECIMAL, tax_rate DECIMAL, tax DECIMAL, total DECIMAL,
due_date DATE,
paid_at TIMESTAMP, paid_amount DECIMAL,
dunning_level INT DEFAULT 0, -- 0=keine, 1=Erinnerung, 2=Mahnung, 3=letzte
dunning_sent_at TIMESTAMP,
pdf_file_id → files,
zugferd_xml TEXT,
created_at, updated_at
)
-- SLA-Definitionen
sla_policies (
id, tenant_id,
name,
priority VARCHAR,
first_response_hours INT,
resolution_hours INT,
business_hours_only BOOL
)
-- CSAT-Bewertungen
csat_ratings (
id, tenant_id,
ticket_id, contact_id,
rating INT, -- 1-5
comment TEXT,
created_at
)
6.4 Webmailer tables¶
-- Mail-Identitaeten (pro User, mehrere Absender)
mail_identities (
id, tenant_id, user_id → users,
email VARCHAR,
display_name VARCHAR,
signature_html TEXT,
is_default BOOL,
mail_account_id → mail_accounts
)
-- Sieve-Filter
mail_filters (
id, tenant_id, user_id → users,
name, is_active BOOL,
priority INT,
conditions JSON, -- [{field, operator, value}]
actions JSON, -- [{type, target}]
stop_processing BOOL
)
-- Mail-Labels
mail_labels (
id, tenant_id, user_id → users,
name, color VARCHAR,
sort_order INT
)
-- E-Mail-Vorlagen
mail_templates (
id, tenant_id,
name, subject, body_html,
placeholders JSON, -- [{key, label, default}]
category VARCHAR,
is_shared BOOL,
created_by → users
)
7. Modul-Abhaengigkeiten & Shared-Component Matrix¶
contacts calendar files tasks workflows search
XyNaP.crm x x x x x x
XyNaP.cms x x
XyNaP.mail x x x x x x
XyNaP.cloud x x x x x
XyNaP.host x x
XyNaP.voice x x x x x
Regel:If a customer books at least one module, he automatically recovers all rated shared components. Contacts/calenders/files/tasks are never separately bookable — they come with each module.
8. Technical stack¶
| Layer | Technology |
|---|---|
| Frontend | Vue 3.5 + TypeScript + Vite + Tailwind 4 |
| Backend | FastAPI + SQLAlchemy 2.0 async + Alembic |
| Datenbank | MariaDB 11.4 (Multi-tenant, tenant id filter) |
| Cache | Redis 7 (sessions, tenant cache, mail cache, event bus) |
| Dateispeicher | Local Filesystem + S3 compatible (MinIO, Stretch Goal) |
| Postfix + Dovecot + Rspamd (existing) | |
| Kalender/Kontakte | Own CalDAV/CardDAV implementation (Radicale as reference) |
| Suche | MariaDB Fulltext (Start) → Meilisearch/ES (Scale) |
| Event-Bus | Redis Streams |
| Reverse-Proxy | Traefik v3 (Wildcard-SSL, Tenant routing) |
| Auth | JWT + RBAC (consisting, extended by tenant context) |
9. Implementation order¶
Phase 1: Foundation (M3)¶
- Tenant system (DB, Middleware, Subdomain routing)
- Shared Components: Contacts, Tasks, Notes, Assets, Tags
- XyNaP.mail (Webmailer — IMAP-Proxy, Composer, Filter)
- Module activation & permissions
Phase 2: CRM Core (M3-M4)¶
- Pipeline & Deals
- Lead Management & Scoring
- Offers & Invoices (PDF generator)
- CRM Workflows (Event Bus + Actions)
Phase 3: Groupware (M4)¶
- XyNaP.cloud (File Manager, WebDAV)
- Calendar (CalDAV, Event Management)
- Contacts (CardDAV server)
- Tasks (CalDAV VTODO)
Phase 4: CMS (M4-M5)¶
- Grid layout editor
- Block system & components
- Template engine & Themes
- Website import
- Publishing and Deploying
Phase 5: Integration (M5)¶
- Module-overlapping workflows
- Global search
- Reporting & Dashboards
- API & Webhooks (for third parties)
10. Delimitation: What xynap is NOT¶
- Kein ERP— No warehouse management, production, logistics
- Kein Buchhaltungsprogramm— DATEV export yes, but no financial accounting
- Kein Projektmanagement-Tool— Tasks yes, but not a Gantt/Agile Board (Stretch-Goal)
- Kein Social Media Tool— No social media planning/automatization
- No email address — Uses Postfix/Dovecot, no MTA