Design Philosophy
Dilmach CRM is built on three core principles: serverless-first, real-time collaboration, and modular architecture. Unlike monolithic CRM systems, we isolate concerns into independent layers that communicate asynchronously.
Serverless Frontend
Next.js with React Server Components for instant page loads, optimal SEO, and zero-latency UX.
Real-time Backend
WebSocket infrastructure with Convex for instant data synchronization across all connected clients.
Modular Features
Contacts, deals, tasks, calendar, and chat operate as independent feature modules with shared data layer.
Frontend Layer
The frontend consists of two separate applications optimized for different use cases: web and mobile.
Web Application
- Built with Next.js 15.1 and React 19 for bleeding-edge performance
- Server Components for automatic code splitting and data fetching
- Framer Motion for fluid, GPU-accelerated animations
- Tailwind CSS with custom dark mode for consistent styling
- TypeScript for type-safe component development
Mobile Application
- Capacitor framework for native iOS and Android experience
- Same React codebase with platform-specific optimizations
- Service Worker for offline-first capabilities
- Progressive Web App (PWA) support for app-like experience
- Hardware APIs for camera, location, and notifications
Real-time Data Layer
Powered by Convex, Dilmach provides instant data synchronization across all connected clients without managing server infrastructure.
Why Convex?
- Automatic data subscriptions with zero setup
- ACID transactions across multiple documents
- Built-in authentication and authorization
- Instant deployment without DevOps overhead
- Real-time conflict-free synchronization
Data Flow
When a user updates a deal, the change flows through Convex with automatic propagation to all subscribers:
- Client sends mutation to Convex backend
- Transaction validated and committed
- Subscribers automatically notified via WebSocket
- UI updates optimistically before confirmation
- Offline changes sync when connection restored
Feature Modules
Each feature operates as an independent module sharing the same data layer and authentication system.
Contacts
Customer and contact management with 360-degree profiles, interaction history, and segmentation.
Deals
Pipeline management with customizable stages, probability forecasting, and revenue attribution rules.
Tasks
Activity tracking with calendar integration, reminders, team assignments, and automation rules.
Calendar
Shared calendar with event scheduling, meeting creation, reminders, and availability tracking.
Chat
Real-time team communication with message search, file sharing, and channel-based organization.
Reports
Analytics dashboard with custom reports, forecasting, and performance metrics visualization.
Scalability & Performance
Dilmach is designed to scale from startup to enterprise without architecture changes.
Caching Strategy
- Client-side React Query for request deduplication
- Convex automatic caching for frequently accessed data
- Service Worker caching for offline functionality
- CDN edge caching for static assets
Performance Optimizations
- Code splitting with Next.js dynamic imports
- Image optimization with next/image component
- Lazy loading for non-critical UI sections
- Database query optimization with pagination
- Real-time subscriptions with selective field subscriptions
Security Architecture
Security is built into every layer of Dilmach CRM with defense-in-depth approach.
Authentication
- OAuth 2.0 integration via Auth0
- JWT tokens with short expiration
- Refresh token rotation for enhanced security
- Multi-factor authentication support
Authorization
- Role-based access control (RBAC)
- Fine-grained permissions per resource
- Data isolation by organization
- Audit logging for compliance
Integration Points
Dilmach exposes multiple integration points for third-party developers and internal tools.
- REST API for CRUD operations
- Webhooks for event-driven workflows
- Convex backend for serverless functions
- GraphQL support for flexible queries
- Custom authentication schemes via middleware
Future Architecture Enhancements
- AI-powered insights using embeddings and LLMs
- Federated learning for privacy-preserving analytics
- GraphQL subscriptions for finer-grained real-time updates
- Multi-tenant deployments with custom domains
- Advanced workflow automation engine