Zynomi is a comprehensive clinical trial platform with a modern architecture spanning user applications, REST APIs, and an analytics lakehouse with AI integration.

The platform consists of three main pillars:
| Pillar | Components |
|---|
| Applications | CTMS Web Portal, Sublink Mobile App |
| REST API | 100+ endpoints for integrations |
| Analytics Lakehouse | Data pipeline, transformation, semantic layer, AI agents |
End-to-End Architecture

Applications
CTMS (Web)
The Clinical Trial Management System web portal for study designers, coordinators, and investigators.
| Capability | Description |
|---|
| Study Design | Protocol configuration but management |
| Site Management | Multi-site setup with personnel |
| Subject Enrollment | Registration and tracking |
| eCRF Data Capture | Real-time form completion |
| Adverse Events | Safety monitoring and reporting |
Sublink (Mobile)
Patient-facing mobile application for trial participants built with Ionic and native iOS/Android shells.
| Capability | Description |
|---|
| Medication Reminders | Push notifications for doses |
| Health Tracking | Vitals and symptom logging |
| ePRO Collection | Patient-reported outcomes |
| Visit Notifications | Appointment reminders |
Backend and REST API
Frappe Health / ERPNext
Core backend platform providing 100+ REST API endpoints.
| Capability | Description |
|---|
| Patient Management | Demographics, history, records |
| Study Configuration | Protocols, sites, personnel |
| eCRF Builder | Form design and data capture |
| Prescriptions | Medications, vitals, lab results |
Supporting Services
| Service | Purpose |
|---|
| Supabase (PostgreSQL) | Real-time database, authentication |
| Object Store (S3) | Document and file storage |
| Redis (Upstash) | Caching and session management |
| KrakenD | API gateway, unified endpoint |
Infrastructure
| Component | Provider |
|---|
| DNS/Ingress | AWS Route 53, Cloudflare |
| Hosting | Vercel, Frappe Cloud, Fly.io |
| Telemetry | Logs, Traces, Metrics |
Analytics Lakehouse
Out-of-the-box analytics infrastructure powered by modern data stack.
Data Ingestion (dlthub)
Python-based data loading toolkit extracting from Frappe REST APIs.
| Feature | Description |
|---|
| Sync Modes | Full and incremental |
| Schema | Auto-detection and evolution |
| Reliability | Retry logic with backoff |
| Destinations | PostgreSQL, MotherDuck, DuckDB |
SQL-based transformation following the Medallion Architecture. Uses OSS Core edition; dbt Cloud available for enterprise scaling.
| Layer | Purpose |
|---|
| Raw | 1:1 copy from source with audit trail |
| Staging | Cleaned and validated data |
| Intermediate | Business logic and enrichment |
| Mart | Star schema (Dimensions + Facts) |
Includes data quality tests, documentation, and lineage tracking.
Semantic Layer (Cube.dev)
Unified metrics layer for consistent analytics. Uses OSS edition deployed on Fly.io; Cube Cloud available for enterprise scaling.
| Feature | Description |
|---|
| Measures and Dimensions | Pre-defined metric definitions |
| Pre-aggregations | Performance optimization |
| APIs | REST API and SQL API access |
| BI Integration | Looker, Metabase, Tableau, PowerBI |
AI Agents (MCP)
Model Context Protocol server enabling AI assistants to query clinical data with zero hallucination.
| Component | Description |
|---|
| MCP Server | Custom-built server exposing Semantic Layer as MCP tools |
| MCP-REST Bridge | Configurable LLM gateway (default: GPT-4.0 Mini) |
| AI Agent / Chatbot | Custom-built conversational interface |
The MCP Server and AI Agent are custom-built solutions adhering to Cube.dev API/SDK standards. This approach provides flexibility with any LLM provider while avoiding enterprise-only dependencies.
| Consumer | Capability |
|---|
| Claude | Natural language queries via MCP |
| GitHub Copilot | Code-aware data exploration |
| Cursor | Embedded analytics assistance |
| Embedded Chatbot | In-app conversational analytics |
Technology Stack
Zynomi is built on a modern, widely-adopted technology stack. The architecture is loosely coupled and plugin-based, enabling horizontal scaling and rapid feature development.
Languages and Frameworks
| Category | Technologies | Coverage |
|---|
| Primary | TypeScript, JavaScript | 70% of codebase |
| Backend | Python, SQL | Data pipelines, analytics |
| Scripting | Shell/Bash | Automation |
| Frontend | React, Next.js 14 | Web application |
| Mobile | React Native | Mobile app |
| Styling | Tailwind CSS, shadcn/ui | Components |
| Layer | Technologies |
|---|
| Web Application | Next.js 14, TypeScript, React |
| Mobile Application | React Native |
| Backend | Frappe Health, ERPNext, Python |
| Database | PostgreSQL (Supabase), MariaDB |
| Data Lake | PostgreSQL (swappable to Snowflake, Iceberg, Databricks) |
| Caching | Redis (Upstash) |
| Storage | S3-compatible Object Store |
| API Gateway | KrakenD |
| Data Ingestion | dlthub (Python) |
| Transformation | dbt (OSS Core) |
| Semantic Layer | Cube.dev (OSS) |
| MCP Server | Custom Node.js |
| AI Agent | Custom microfrontend widget |
| LLM | GPT-4.0 Mini (configurable) |
| Infrastructure | Vercel, Frappe Cloud, Fly.io |
| Containerization | Docker |
Architecture Principles
| Principle | Description |
|---|
| Loosely Coupled | Components are independent and replaceable |
| Plugin-Based | Features added without modifying core |
| Horizontal Scaling | New capabilities added alongside existing |
| Microfrontend | AI Chatbot installs as standalone widget |
Security and Compliance
| Capability | Description |
|---|
| Audit Trail | Complete activity logging |
| Data at Rest | Encrypted storage |
| Data in Transit | TLS 1.3 encryption |
| HIPAA | Healthcare compliance |
| GDPR | Data privacy compliance |