Skip to content

Installation Guide

Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js 18.x or later
  • npm 9.x or later
  • Git for version control
  • Supabase CLI (optional, for local development)

System Requirements

Component Minimum Recommended
RAM 4 GB 8 GB+
Disk Space 2 GB 5 GB+
CPU 2 cores 4 cores+
OS Linux, macOS, Windows Linux/macOS

Step 1: Clone the Repository

git clone https://github.com/abhishekmendiratta/novaqy-care-connect.git
cd novaqy-care-connect

Step 2: Install Dependencies

npm install

This will install all required dependencies including: - Next.js 15.0.3 - React 19 RC - Supabase client libraries - Razorpay SDK - UI component libraries

Step 3: Configure Environment Variables

Copy the example environment file:

cp .env.example .env.local

Edit .env.local and configure the following:

Supabase Configuration (India Region)

NEXT_PUBLIC_SUPABASE_URL=your_india_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_india_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_india_service_role_key
SUPABASE_PROJECT_ID=your_india_project_id

Supabase Configuration (US Region)

NEXT_PUBLIC_SUPABASE_US_URL=your_us_supabase_url
NEXT_PUBLIC_SUPABASE_US_ANON_KEY=your_us_anon_key
SUPABASE_US_SERVICE_ROLE_KEY=your_us_service_role_key
SUPABASE_US_PROJECT_ID=your_us_project_id

Payment Gateway

NEXT_PUBLIC_RAZORPAY_KEY_ID=your_razorpay_key_id
RAZORPAY_KEY_SECRET=your_razorpay_secret

Analytics

NEXT_PUBLIC_GA_MEASUREMENT_ID=your_ga_id
NEXT_PUBLIC_GOOGLE_ADS_ID=your_ads_id
NEXT_PUBLIC_FACEBOOK_PIXEL_ID=your_pixel_id

Cloudflare

CLOUDFLARE_PAGES_TOKEN=your_cloudflare_token
CLOUDFLARE_ACCOUNT_ID=your_account_id

Step 4: Set Up Database

Apply Migrations to India Database

npm run supabase:link:india
npm run supabase:migrate

Apply Migrations to US Database

npm run supabase:link:us
npm run supabase:migrate

This will create all 11 tables, RLS policies, and seed data.

Step 5: Run Development Server

npm run dev

Your application will be available at http://localhost:3000

Step 6: Build for Production

npm run build

This creates an optimized production build in .next/ directory.

Step 7: Deploy to Staging

npm run cf:deploy:staging

Step 8: Deploy to Production

npm run cf:deploy:production

Troubleshooting

Port Already in Use

# Kill process on port 3000
npx kill-port 3000
npm run dev

Database Connection Issues

  • Verify Supabase project IDs in .env.local
  • Check API keys are not expired
  • Ensure RLS policies are enabled

Build Failures

# Clear cache and rebuild
rm -rf .next
npm run build

Next Steps