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:
- Completed the Infrastructure Requirements setup
- Access to all required cloud services
- Development environment configured
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
- Create a new project in Supabase
- Run the database migrations:
npx supabase db push
- Configure Row Level Security (RLS) policies
- Set up authentication providers
Step 4: Configure Frappe Cloud
- Create a new site on Frappe Cloud
- Install the Healthcare module
- Generate API access tokens from Settings > API Access
- Configure the required DocTypes
Step 5: Set Up Firebase
- Create a project in Firebase Console
- Enable Cloud Messaging
- Download the service account key
- 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
| Configuration | Description |
|---|---|
| LLM Provider | Set OpenAI API key (or alternative LLM) |
| MCP Endpoint | Configure MCP server URL |
| Cube API | Set 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
| Verification | Action |
|---|---|
| Application | Access deployed URL |
| Authentication | Create test user |
| Database | Verify connectivity |
| APIs | Test REST endpoints |
| Analytics | Check Cube.dev playground |
| AI Agent | Test chatbot queries |
Configuration Checklist
| Component | Status |
|---|---|
| Environment variables | Configured |
| Supabase database | Initialized |
| Frappe Cloud site | Created |
| Firebase project | Configured |
| Web application | Deployed |
| dbt pipeline | Deployed |
| Cube.dev | Deployed |
| MCP server | Deployed |
| API gateway | Configured |
| LLM provider | Connected |
| SSL certificates | Active |