> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gosupersquad.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation Guide

> Setup instructions for the trip-page application

This guide will help you set up both the client and server components of the trip-page application.

## Prerequisites

* Node.js (LTS version recommended)
* npm or yarn
* Git

## Getting Started

First, clone the repository:

```bash theme={null}
git clone https://github.com/gosupersquad/trip-page
```

## Client Setup

1. Navigate to the client directory:

```bash theme={null}
cd client
```

2. Install dependencies:

```bash theme={null}
npm install
```

3. Create a `.env` file in the client directory with the following template:

```env theme={null}
# API and Frontend URLs
VITE_API_URL=
VITE_FRONTEND_URL=

# PostHog Analytics Configuration
VITE_PUBLIC_POSTHOG_KEY=
VITE_PUBLIC_POSTHOG_HOST=

# Payment Gateway Configuration
VITE_CASHFREE_MODE=
```

4. Available commands:

```bash theme={null}
# Start development server
npm run dev

# Build for production
npm run build

# Preview production build
npm run start
```

## Server Setup

1. Navigate to the server directory:

```bash theme={null}
cd server
```

2. Install dependencies:

```bash theme={null}
npm install
```

3. Create a `.env` file in the server directory with the following template:

```env theme={null}
# CORS Configuration
ALLOWED_ORIGINS=http://localhost:5173,http://localhost:5174,https://new.gosupersquad.com,https://gosupersquad.com,https://stage.gosupersquad.com

# Azure Storage Configuration
AZURE_STORAGE_CONNECTION_STRING=
AZURE_STORAGE_CONTAINER_NAME=

# Bookings API Configuration
BOOKINGS_CLIENT_ID=
BOOKINGS_CLIENT_SECRET=
BOOKINGS_REFRESH_TOKEN=

# Hello API Configuration
HELLO_CLIENT_ID=
HELLO_CLIENT_SECRET=
HELLO_REFRESH_TOKEN=

# Cashfree Payment Gateway
CASHFREE_API_ENDPOINT=https://sandbox.cashfree.com/pg
CASHFREE_APP_ID=
CASHFREE_SECRET_KEY=

# JWT Configuration
JWT_EXPIRES_IN=30d
JWT_SECRET=

# Database Configuration
MONGODB_URI=

# Environment Configuration
NODE_ENV=development
PORT=3002

# Analytics
POSTHOG_API_KEY=

# SMS Configuration
TWILIO_ACCOUNT_SID=
TWILIO_AUTH_TOKEN=
TWILIO_PHONE_NUMBER=

# Base URL Configuration
API_BASE_URL=

# OpenAI Configuration
OPENAI_API_KEY=

# Unsplash Configuration
UNSPLASH_ACCESS_KEY=
UNSPLASH_SECRET_KEY=
```

4. Start the development server:

```bash theme={null}
npm run dev
```

## Development

After setting up both client and server with their respective environment variables:

1. Start the server:

```bash theme={null}
cd server
npm run dev
```

2. In a new terminal, start the client:

```bash theme={null}
cd client
npm run dev
```

The application should now be running with:

* Frontend: [http://localhost:5173](http://localhost:5173)
* Backend: [http://localhost:3002](http://localhost:3002)
