Weblutions Documentation
Weblutions Main Site Contact Us Our Discord
Some pages are still pending proper formatting, if required refer to the legacy documentation website.
FaxStore IconFaxStore

Weblutions Documentation / FaxStore / Configuration File

Updated

Configuration File

By Josh M. 4 mins 9

The configuration file is one of the most important files in a FaxStore installation. Without it, FaxStore wouldn't even boot or come online in anyway. The configuration is where tokens and other non-dynamic information is stored and if the configuration file is edited a restart of the store is required to have the updates applied.

The config file (config.json) is a JavaScript Object Notation (JSON) file and requires specific formatting to properly function and load within FaxStore. The FaxStore config.json file consists of a 'section', 'key', and 'value' format to help with organising the file. For example:

{
    "section": {
        "key": "value",
        "key": "value"
    },
}

Configuration File Keys

Items marked in red are required. Items in orange are conditionally required.

Section

Key

Default Value

Description

siteInformation

processPort

3000

The port used to run FaxStore, this is referenced in Nginx.

siteInformation

domain

"http://localhost"

The protocol and domain used for the store.

siteInformation

ownerId

"USER_ID"

The master administrators for the store.

siteInformation

startDebug

false

Sets the console to log extra information on start up.

siteInformation

developerMode

false

Not recommended, sets the store to directly throw errors and not automate them into a report file.

siteInformation

blockCORS

false

Blocks the CORS policy that FaxStore uses on requests by default.

siteInformation

disableCfxCheck

false

Disables Cfx username checks on Tebex packages.

siteInformation

tebexCheckoutGame

"FiveM"

The game authentication link type to use. Optional.

payments

usePayPal

true

Sets PayPal as a checkout option.

payments

useStripe

true

Sets Stripe as a checkout option.

payments

useSquare

false

Sets Square as a checkout option.

payments

currency

"usd"

In lowercase, the currency code to be used.

payments

checkoutTOS

false

When 'true' a ToS checkbox will display on the Stripe checkout page.

payments

stripeAutomaticTax

false

When 'true' Stripe checkouts will use automatic tax. This must be setup on the Stripe account.

payments

stripePublishableKey

""

The 'Publishable Key' issued by Stripe.

payments

stripeSecretKey

""

The 'Secret Key' issued by Stripe.

payments

paypalClientId

""

The 'Client ID' issued by PayPal.

payments

paypalClientSecret

""

The 'Client Secret' issued by PayPal.

payments

squareAppId

""

The 'Application ID' provided by Square.

payments

squareAppToken

""

The 'Application Token' provided by Square.

payments

stripePaymentTypes

"card"

Stripe payment method override. Configure to add additional methods if needed

tokens

discordBotToken

""

A Discord bot token which is used for Discord related requests.

tokens

oAuth2ClientId

""

The 0Auth Client ID from a Discord application.

tokens

oAuth2ClientToken

""

The 0Auth Client Token from a Discord application.

tokens

googleClientId

""

Google 0Auth Client ID

tokens

googleClientSecret

""

Google 0Auth Client Secret

tokens

githubClientId

""

GitHub 0Auth Client ID

tokens

githubClientSecret

""

GitHub 0Auth Client Secret

tokens

tebexSecret

""

Tebex store secret used for Tebex related API calls.

tokens

faxesLicenseKey

""

The Weblutions license key issued by Weblutions.

SQLInformation

host

"localhost"

The host IP or domain for the database.

SQLInformation

username

"root"

The user of the MySQL account.

SQLInformation

password

""

The password corresponding to the username.

SQLInformation

database

"faxstore"

The database for FaxStore.

emails

useEmails

true

Whether to use emails in FaxStore. Emails are required for standard accounts.

emails

fromEmail

"store@weblutions.com"

The from address for emails that are sent.

emails

sendGridToken

""

The SendGrid token, required if the from address is changed.

emails

emailHeader

...

The header used in emails.

emails

emailFooter

...

The footer used in emails.

discordConfig

useDiscordChannelLogs

false

Whether to use a Discord channel for Audit logs.

discordConfig

botStatus

"idle"

The bot status override used for the Discord bot.

discordConfig

loggingChannelId

""

the log channel Id used if 'useDiscordChannelLogs' is enabled.

discordConfig

autoJoinUsers

true

Toggles the function to automatically join users into your Discord when they create their account.

discordConfig

useDiscordCommands

true

Enables Discord slash command usage.

discordConfig

activity

object

Overrides the default Discord bot activity. Requires object items to operate.

discordConfig.activity

status

"online"

The status the Discord bot will use. Must be one of: online, idle, invisible, or dnd

discordConfig.activity

name

null

The name for the status, if missing the domain is used.

discordConfig.activity

type

0

Must be a valid Discord Activity Type's number

redirects

[].name

"faxes"

The name of the link, this will be accessed by '/faxes'

redirects

[].link

"http://faxes.zip"

The link to redirect users to.

Default Configuration File

{
    "siteInformation": {
        "processPort": 3000,
        "domain": "http://localhost:3000",
        "ownerId": [],
        "startDebug": true,
        "developerMode": true,
        "blockCORS": true,
        "apiKeys": []
    },
    "payments": {
        "usePayPal": true,
        "useStripe": true,
        "useSquare": true,
        "currency": "aud",
        "stripePublishableKey": "",
        "stripeSecretKey": "",
        "paypalClientId": "",
        "paypalClientSecret": "",
        "squareAppId": "",
        "squareAppToken": "",
        "stripePaymentTypes": null
    },
    "tokens": {
        "discordBotToken": "",
        "oAuth2ClientId": "",
        "oAuth2ClientToken": "",
        "googleClientId": "",
        "googleClientSecret": "",
        "githubClientId": "",
        "githubClientSecret": "",
        "faxesLicenseKey": "",
        "tebexSecret": "",
        "tebexCheckoutGame": ""
    },
    "SQLInformation": {
        "host": "",
        "username": "",
        "password": "",
        "database": "faxstore"
    },
    "emails": {
        "useEmails": true,
        "fromEmail": "",
        "sendGridToken": "",
        "emailHeader": "",
        "emailFooter": ""
    },
    "discordConfig": {
        "useDiscordChannelLogs": true,
        "autoJoinUsers": true,
        "useDiscordCommands": true
    },
    "redirects": [
        {
            "name": "weblutions",
            "link": "http://weblutions.com"
        }
    ],
    "smtp": {
        "user": "",
        "password": "",
        "host": "",
        "port": 2525,
        "ssl": false,
        "email": ""
    }
}