The Care Nexus LogoCareNexus Docs

Quick Start

Get The Care Nexus running locally in under 10 minutes.

Updated June 2026 7 min read

This guide walks you through cloning the repository...

1. Clone and Install

terminal
git clone https://github.com/your-org/the-care-nexus.git
cd care-nexus

# Install backend dependencies
cd api && npm install

# Install frontend dependencies
cd ../client && npm install

2. Backend Environment Variables

Create api/.env...

api/.env
PORT=5000
MONGO_URI=mongodb+srv://<user>:<pass>@cluster.mongodb.net/carenexus
UPSTASH_REDIS_REST_URL=https://xxx.upstash.io
UPSTASH_REDIS_REST_TOKEN=your_token_here
JWT_SECRET=<64-char random hex>
JWT_REFRESH_SECRET=<64-char random hex>
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your@gmail.com
SMTP_PASS=your_app_password
FRONTEND_URL=http://localhost:3000
GEMINI_API_KEY=your_gemini_key
GROQ_API_KEY=your_groq_key
CLOUDINARY_CLOUD_NAME=your_cloud
CLOUDINARY_API_KEY=your_key
CLOUDINARY_API_SECRET=your_secret
GOOGLE_CLIENT_ID=your_client_id

Generate JWT secrets

terminal
node -e "console.log(require('crypto').randomBytes(64).toString('hex'))"

3. Frontend Environment Variables

client/.env.local
NEXT_PUBLIC_API_URL=http://localhost:5000/api
NEXT_PUBLIC_SOCKET_URL=http://localhost:5000
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=<32-char base64 string>

4. Start Development Servers

terminal
# Terminal 1 — Backend
cd api && npm run dev
# → Server running on port 5000

# Terminal 2 — Frontend
cd client && npm run dev
# → Ready at http://localhost:3000

Verify the setup

Open http://localhost:3000 — you should see the landing page...

5. Create Your First Accounts

  • Create a Patient account
  • Create a Clinic Admin account
  • Create a Doctor account
  • Book appointment and test workflow
  • Doctor sees appointment in queue

6. Google OAuth Setup

Configure Google OAuth credentials in Google Cloud Console...

  • Authorized JavaScript origin: http://localhost:3000
  • Authorized redirect URI: http://localhost:3000/api/auth/callback/google