# Setup Guide

Follow this comprehensive, step-by-step master guide to compile, configure, and launch your very own instance of Razor from the source code.


# 1. 📦 Prerequisites


# 2. 📥 Environment Preparation

# Installing Node.js

  1. Download the LTS (Long Term Support) installer from nodejs.org.
  2. Run the executable. When prompted, ensure that "npm package manager" is selected for installation.
  3. Once completed, verify your installation by opening your terminal (or command prompt) and executing:

    node -v
    npm -v

    Both commands should return version numbers.

# Extracting the Razor Source

  1. Locate your downloaded Razor Source Code .zip file from your BuiltByBit purchase.
  2. Extract the archive contents into a dedicated project directory (e.g., C:\RazorBot).
  3. Open this folder within Visual Studio Code.

# 3. ⚙️ Dependency Compilation

To build the bot's architecture, you must install the required Node.js packages.

Open an integrated terminal right inside Visual Studio Code (Ctrl + ~ or Terminal -> New Terminal) and run:

npm install

# 4. 📝 Core Configuration

Razor requires two primary configuration files to boot successfully.

# System Configuration (config.js)

Locate config.js in the root directory. This dictates global variables:

module.exports = {
  prefix: '!',                        // Fallback prefix for legacy commands
  ownerID: '123456789012345678',      // Your personal Discord User ID
  // Additional module settings follow...
};

# Environment Variables (.env)

  1. In the root directory, locate the file named .env.example.
  2. Rename this file simply to .env (ensure there is no file extension like .txt).
  3. Populate it with your sensitive credentials strictly:
token=YOUR_SECURE_BOT_TOKEN
mongodbURL=mongodb+srv://user:pass@cluster.mongodb.net/?retryWrites=true&w=majority
clientId=YOUR_BOT_APPLICATION_ID
developerId=YOUR_DISCORD_USER_ID
licensekey=YOUR_RAZOR_LICENSE_KEY

# 5. 🚀 Launch Sequence

With dependencies installed and configurations saved, you are ready for ignition.

Run the launch command directly in your terminal:

npm start

Alternatively: node load.js

Watch the terminal. Once you see the successful initialization logs, Razor is online.