Installation Guide
Step-by-step instructions for installing CareNova, setting up the environment, and running the application locally.
Written By Dev010
Last updated 17 days ago
This guide walks you through every step required to install CareNova, configure your environment, initialize the database, and run the application locally.
Follow each step in order for a successful installation.
Before you begin β make sure you have completed the System Requirements checklist. You will need your Supabase project, Resend account, and Envato purchase code ready before starting.
Step 1 β Download the Package
After purchasing CareNova on CodeCanyon, download the package from your Envato Downloads page.
Log in to your Envato account
Go to Downloads
Find CareNova and click Download
Select Main Files to download the full package
Extract the downloaded archive to a location on your computer.
The extracted package contains the following structure:
carenova/
βββ carenova-app/ β Main application (work here)
βββ documentation/ β CareNova documentation
βββ LICENSE.txt β License information
βββ README-FIRST.txt β Quick start instructions
βββ install-guide.txt β Basic installation notesAll setup steps are performed inside the
carenova-app/directory. Do not modify files outside this folder.
Step 2 β Open the Project
Open a terminal and navigate to the application directory:
cd carenova/carenova-appOpen the project in your code editor:
code .If you do not have VS Code installed, download it from code.visualstudio.com. It is the recommended editor for working with CareNova.
Step 3 β Install Dependencies
Install all required packages using npm:
npm installThis installs the complete dependency tree including:
Next.js 14 and React 18
Supabase client libraries
Drizzle ORM
Tailwind CSS and shadcn/ui components
React Hook Form and Zod validation
Framer Motion
Recharts and dnd-kit
next-intl for internationalization
All other required packages
Installation may take 2β5 minutes depending on your internet connection. Do not interrupt the process.
If you encounter permission errors on macOS or Linux, do not use sudo. Instead, fix npm permissions:
npm install --legacy-peer-depsHelpful resources:
Step 4 β Create Supabase Project
CareNova requires a Supabase project for authentication, database, and file storage.
Go to supabase.com and create a free account
Click New Project
Choose your organization
Enter a project name (e.g.
carenova)Set a strong database password β save this password, you will need it for your connection string
Select the region closest to your users
Click Create new project and wait for it to provision (approximately 1β2 minutes)
Once your project is ready, retrieve the following credentials:
From Settings β API:
Keep
SUPABASE_SERVICE_ROLE_KEYsecret. Never expose it in client code or commit it to a public repository.
From Settings β Database β Connection String:
Select Transaction mode (port 6543) and copy the connection string. Replace [YOUR-PASSWORD] with your database password.
postgresql://postgres.[ref]:[YOUR-PASSWORD]@aws-0-[region].pooler.supabase.com:6543/postgres?pgbouncer=trueThis becomes your DATABASE_URL.
The
?pgbouncer=trueparameter is required. CareNova uses pgBouncer transaction mode for all database queries.
For migrations only (optional), also copy the Session mode connection string (port 5432):
postgresql://postgres.[ref]:[YOUR-PASSWORD]@aws-0-[region].pooler.supabase.com:5432/postgresThis becomes your DIRECT_DATABASE_URL.
Helpful resources:
Step 5 β Configure Environment Variables
Create a new file named .env.local in the root of carenova-app/:
touch .env.localOpen .env.local and add the following variables:
# βββ Supabase (Auth + Database) βββββββββββββββββββββββββββββ
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
# βββ Database (Drizzle ORM) ββββββββββββββββββββββββββββββββββ
DATABASE_URL=postgresql://postgres.[ref]:[PASSWORD]@aws-0-[region].pooler.supabase.com:6543/postgres?pgbouncer=true
# Optional: Direct connection for migrations
# DIRECT_DATABASE_URL=postgresql://postgres.[ref]:[PASSWORD]@aws-0-[region].pooler.supabase.com:5432/postgres
# βββ Supabase Service Role βββββββββββββββββββββββββββββββββββ
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key
# βββ Site URL ββββββββββββββββββββββββββββββββββββββββββββββββ
NEXT_PUBLIC_SITE_URL=http://localhost:3000
# βββ Resend (Email) ββββββββββββββββββββββββββββββββββββββββββ
RESEND_API_KEY=re_xxxxxxxxxx
# βββ Cron Protection βββββββββββββββββββββββββββββββββββββββββ
CRON_SECRET=your-random-secret-string
# βββ Envato License ββββββββββββββββββββββββββββββββββββββββββ
ENVATO_PERSONAL_TOKEN=your-envato-personal-token
ENVATO_ITEM_ID=your-codecanyon-item-id
# βββ Demo Data (optional) ββββββββββββββββββββββββββββββββββββ
# DEMO_PASSWORD=Demo123!
# βββ Debug Logs (development only) ββββββββββββββββββββββββββ
# CARENOVA_DEBUG=1Replace all placeholder values with your actual credentials. Never commit
.env.localto a public repository. The.gitignorefile already excludes it by default.
Generating CRON_SECRET:
You can generate a secure random string using:
openssl rand -base64 32Or use any random string generator. This value protects your cleanup endpoint from unauthorized access.
Full environment variable reference is available in the Environment Variables section.
Step 6 β Configure Supabase Auth
Before initializing the database, configure your Supabase authentication settings.
In Supabase Dashboard β Authentication β URL Configuration:
Set the following URLs:
In Supabase Dashboard β Authentication β Email Templates:
Update the Confirm signup email template to use your CareNova branding. The confirmation link must use {{ .ConfirmationURL }}.
In Supabase Dashboard β Authentication β SMTP Settings (if using Resend):
Step 7 β Initialize the Database
CareNova provides a master SQL installation file that creates all required tables, indexes, enums, and seed data in a single operation.
Option A β Using INSTALL.sql (Recommended)
Open your Supabase project dashboard
Go to SQL Editor
Click New query
Open
INSTALL.sqlfrom yourcarenova-app/folderCopy the entire contents and paste into the SQL Editor
Click Run
The script will create all 35+ tables and confirm installation with a table list at the end.
INSTALL.sqlis idempotent β it is safe to run multiple times. Running it again will not duplicate or overwrite existing data.
Option B β Using Drizzle push
If you prefer to use Drizzle ORM to push the schema:
npm run db:pushOption A (INSTALL.sql) is recommended for first-time setup as it includes all indexes, enums, and constraints in the correct order.
Helpful resources:
Step 8 β Create Storage Buckets
CareNova includes a command that automatically creates and configures all required storage buckets in your Supabase project.
Run: bash
npm run db:bucketsThis will create the following buckets:
You should see:
β avatars bucket ready β logos bucket ready β medical-attachments bucket ready β landing-assets bucket readyβ οΈ SUPABASE_SERVICE_ROLE_KEY must be set in your .env.local before running this command.
Step 9 β Seed Demo Data (Optional)
CareNova includes a comprehensive demo dataset with realistic data across all modules.
Run the seed command:
npm run db:seedThis will populate your database with:
It also creates four demo user accounts:
The seed script is idempotent β running it multiple times will not create duplicate records. You can customize the demo password by setting
DEMO_PASSWORDin your.env.localbefore seeding.
Note: Demo accounts require Supabase Auth users to be created separately. See the Demo Accounts guide for full instructions.
Step 10 β Start the Development Server
Start the local development server:
npm run devThe application will start and display:
β² Next.js 14.2.35 (turbo)
- Local: http://localhost:3000
β Ready in ~1sOpen your browser and visit:
http://localhost:3000If this is a fresh installation with no license row in the database, you will be redirected to:
http://localhost:3000/setupEnter your Envato purchase code to activate the platform. Once activated, you will be redirected to the dashboard.
For local development without an Envato purchase code, you can insert a test license row directly into your Supabase database. See the License Activation guide for instructions.
Step 11 β Verify the Installation
Confirm the installation is working correctly:
[ ]
http://localhost:3000loads the landing page[ ] The clinic type switches correctly with
?clinic=dental,?clinic=general,?clinic=ophthalmology[ ] The login page loads at
/login[ ] You can log in with a demo account
[ ] The dashboard loads with data visible
[ ] Patient, Appointment, and Invoice modules are accessible
[ ] No errors appear in the terminal
If everything loads correctly, your installation is complete. β
Troubleshooting
Application won't start:
Confirm Node.js 18+ is installed:
node --versionDelete
.next/andnode_modules/and reinstall:
npm run clean && npm installDatabase connection error:
Confirm
DATABASE_URLuses port 6543 with?pgbouncer=trueappendedConfirm your Supabase project is active and not paused
Check that the database password in the connection string is correct and URL-encoded if it contains special characters
Login not working:
Confirm
NEXT_PUBLIC_SUPABASE_URLandNEXT_PUBLIC_SUPABASE_ANON_KEYare correctConfirm the Supabase Auth redirect URLs are configured
Check that the user exists in Supabase Auth β Users
Email confirmation not sending:
Confirm
RESEND_API_KEYis set and validConfirm your sending domain is verified in Resend
Check Supabase Auth β SMTP Settings are configured
Setup screen appears on every load:
A valid license row must exist in the
licensetableSee the License Activation guide
Seed command fails:
Confirm
SUPABASE_SERVICE_ROLE_KEYis set in.env.localConfirm the database tables exist (run
INSTALL.sqlfirst)Check the terminal for specific error messages
Useful Commands Reference
Next Step
Once your local installation is running successfully, continue to the Supabase Setup guide for detailed storage bucket configuration and auth settings, or proceed directly to Deployment if you are ready to take CareNova to production.