Skip to main content
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:
git clone https://github.com/gosupersquad/trip-page

Client Setup

  1. Navigate to the client directory:
cd client
  1. Install dependencies:
npm install
  1. Create a .env file in the client directory with the following template:
# 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=
  1. Available commands:
# 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:
cd server
  1. Install dependencies:
npm install
  1. Create a .env file in the server directory with the following template:
# 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=
  1. Start the development server:
npm run dev

Development

After setting up both client and server with their respective environment variables:
  1. Start the server:
cd server
npm run dev
  1. In a new terminal, start the client:
cd client
npm run dev
The application should now be running with: