Skip to main content

Initial Setup and Configuration

This guide walks you through the initial setup and configuration of the Zynomi platform.

Prerequisites

Before you begin, ensure you have:

Step 1: Clone the Repositories

Clone the necessary repositories from GitHub:

# Clone the main web application
git clone https://github.com/zynomilabs/hb-life-science-web.git

# Clone the mobile application
git clone https://github.com/zynomilabs/sublink-mobile-website.git

# Clone the Android shell (if needed)
git clone https://github.com/zynomilabs/sublink-android-shell.git

Step 2: Configure Environment Variables

Web Application

Create a .env.local file in the web application root:

cp sample.env .env.local

Update the following variables:

# Supabase Configuration
NEXT_PUBLIC_SUPABASE_URL=your-supabase-url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key

# Frappe Configuration
NEXT_PUBLIC_FRAPPE_URL=your-frappe-url
FRAPPE_API_KEY=your-frappe-api-key
FRAPPE_API_SECRET=your-frappe-api-secret

# Cube.dev Configuration
NEXT_PUBLIC_CUBE_API_URL=your-cube-api-url
CUBE_API_SECRET=your-cube-api-secret

# Firebase Configuration
NEXT_PUBLIC_FIREBASE_API_KEY=your-firebase-api-key
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your-firebase-project-id

Step 3: Set Up Supabase

  1. Create a new project in Supabase
  2. Run the database migrations:
npx supabase db push
  1. Configure Row Level Security (RLS) policies
  2. Set up authentication providers

Step 4: Configure Frappe Cloud

  1. Create a new site on Frappe Cloud
  2. Install the Healthcare module
  3. Generate API access tokens from Settings > API Access
  4. Configure the required DocTypes

Step 5: Set Up Firebase

  1. Create a project in Firebase Console
  2. Enable Cloud Messaging
  3. Download the service account key
  4. Configure push notification settings

Step 6: Deploy the Application

Deploy to Vercel

# Install Vercel CLI
npm i -g vercel

# Deploy
vercel --prod

Deploy Analytics Infrastructure

Deploy dbt and Cube.dev to Fly.io:

# Deploy dbt pipeline
cd ctms-lakehouse-dbt
fly deploy

# Deploy Cube.dev semantic layer
cd ctms-semantic-cube
fly deploy

Deploy MCP Server

# Deploy custom MCP server
cd ctms-mcp-server
fly deploy

Deploy KrakenD API Gateway

See Debugging and Troubleshooting for KrakenD deployment details.

Step 7: Configure AI Agent

ConfigurationDescription
LLM ProviderSet OpenAI API key (or alternative LLM)
MCP EndpointConfigure MCP server URL
Cube APISet Cube.dev REST API endpoint
# AI Configuration
OPENAI_API_KEY=your-openai-api-key
MCP_SERVER_URL=your-mcp-server-url
CUBE_API_URL=your-cube-api-url
CUBE_API_SECRET=your-cube-api-secret

Step 8: Verify Installation

VerificationAction
ApplicationAccess deployed URL
AuthenticationCreate test user
DatabaseVerify connectivity
APIsTest REST endpoints
AnalyticsCheck Cube.dev playground
AI AgentTest chatbot queries

Configuration Checklist

ComponentStatus
Environment variablesConfigured
Supabase databaseInitialized
Frappe Cloud siteCreated
Firebase projectConfigured
Web applicationDeployed
dbt pipelineDeployed
Cube.devDeployed
MCP serverDeployed
API gatewayConfigured
LLM providerConnected
SSL certificatesActive