Skip to main content

Installation

This guide will help you set up the Infowebplus project on your local machine.

Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js 18.17 or later
  • npm, yarn, or pnpm package manager
  • Git for version control
  • Sanity.io account (for CMS)

Step 1: Clone the Repository

git clone https://github.com/yourusername/infowebplus.git
cd infowebplus

Step 2: Install Dependencies

npm install

Step 3: Set Up Environment Variables

Create a .env.local file in the root directory:

cp .env.local.example .env.local

Fill in your environment variables:

# Sanity Configuration
NEXT_PUBLIC_SANITY_PROJECT_ID=your_project_id
NEXT_PUBLIC_SANITY_DATASET=production
SANITY_API_TOKEN=your_api_token
NEXT_PUBLIC_SITE_URL=https://infowebplus.com

# Email (Optional)
RESEND_API_KEY=your_resend_api_key
CONTACT_EMAIL=contact@infowebplus.com

# Breezy HR (for careers page)
BREEZY_COMPANY_ID=infowebplus

# Google Tag Manager (Optional)
NEXT_PUBLIC_GTM_ID=GTM-XXXXXXX

# Caching (Optional but Recommended)
CACHE_PREFIX=infowebplus
CACHE_AUTH_TOKEN=your-secret-token-here

# Redis (Optional - Recommended for Production)
ENABLE_REDIS=false
# REDIS_URL=redis://localhost:6379
# Or for Redis Cloud/Upstash:
# REDIS_URL=rediss://default:password@host:port

# Sanity Webhook (for automatic cache invalidation)
SANITY_WEBHOOK_SECRET=your-webhook-secret

Step 4: Set Up Sanity

Navigate to the Sanity Studio folder:

cd studio
npm install

Create a new Sanity project (if needed):

npx sanity init

Deploy GraphQL API:

npx sanity graphql deploy

Step 5: Run the Development Server

From the root directory:

npm run dev

Open your browser:

Next Steps