# Connector Club – NestJS Backend

Welcome to the **Connector Club** backend project built with **NestJS**.

At **Connector Club**, our mission is simple: to bring **brands** and **content creators** together to create magic.  
We believe collaboration should be **easy**, **fun**, and **rewarding** for everyone involved.  
Whether you’re a brand looking to make an impact or a creator ready to shine, we’re here to make it happen.

---

# 🚀 Getting Started

These instructions will help you set up and run the project locally for development, staging, or production environments.

---

# 📦 Prerequisites

- Node.js (v20.8.1 recommended)
- npm (v10.1.0 recommended) 
- PostgreSQL
- NestJS CLI (`npm i -g @nestjs/cli`)
- `cross-env` for environment variable support

---

# 📁 Clone the Project

The repository has **three branches**:

- `main` → for production
- `staging` → for staging
- `development` → active development

# Clone the repository
git clone https://github.com/ags-niksadhu/connectorclub-backend.git
## and
cd connectorclub-backend

## Switch to the appropriate branch
git checkout development     # for local dev
## or
git checkout staging         # for staging
## or
git checkout main            # for production

# 📥 Install Dependencies
npm install

# ⚙️ Environment Setup
Create the following .env files based on the environment you're working with:

.env.development
## or
.env.staging
## or
.env.production

# 🔨 Build the Project
## Development
npm run build:development
## Staging
npm run build:staging
## Production
npm run build:production

# 🏃 Run the Project
## Live reload for development
npm run start:dev

# Compiled app
npm run start:development # for development server
## or
npm run start:staging # for staging server
## or
npm run start:production # for production server 

# 🛠️ Database Migrations (TypeORM)
## Run existing migrations
npm run migration:run
## Generate a new migration
npm run migration:generate

